> ## Documentation Index
> Fetch the complete documentation index at: https://figranium.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Figranium SDKs: JavaScript, Python, Swift, and Kotlin

> Choose an official Figranium SDK for JavaScript, Python, Swift, or Kotlin. Compare runtimes, install commands, and shared features for automating browser tasks.

Figranium's official SDKs connect your code to a running Figranium server. Use them to save and run tasks, stream execution events, and manage schedules, captures, and Cabinets from JavaScript, Python, Swift, or Kotlin, without hand-writing HTTP requests.

## Choose an SDK

Every SDK wraps the same Figranium REST and Server-Sent Events API, so features match across languages. Pick the one that fits your stack.

> [card] [JavaScript SDK](https://figranium.dev/docs/sdk/js/overview.md)
>
> `@figranium/sdk` for Node.js 18+ and modern browsers. TypeScript first, ESM and CommonJS, no runtime dependencies.

> [card] [Python SDK](https://figranium.dev/docs/sdk/python/overview.md)
>
> `figranium-sdk` for Python 3.9+. Sync and async clients built on `httpx`, with `TypedDict` types.

> [card] [Swift SDK](https://figranium.dev/docs/sdk/swift/overview.md)
>
> `Figranium` package for macOS, iOS, tvOS, watchOS, and server-side Swift. Native `async`/`await`, zero dependencies.

> [card] [Kotlin SDK](https://figranium.dev/docs/sdk/kotlin/overview.md)
>
> `dev.figranium:figranium` for Kotlin and Android API 23+. Coroutines on OkHttp, `Flow` streams, optional Android AppFunctions.

## Compare SDKs

| | JavaScript | Python | Swift | Kotlin |
| :- | :- | :- | :- | :- |
| Package | `@figranium/sdk` | `figranium-sdk` | `Figranium` | `dev.figranium:figranium` |
| Runtime | Node.js 18+, browsers | Python 3.9+ | Swift 6.0, macOS 13, iOS 16, tvOS 16, watchOS 9 | Kotlin 2.2+, Android API 23+ |
| Dependencies | None | `httpx>=0.27,<1` | None (Foundation only) | OkHttp, kotlinx.serialization, kotlinx.coroutines |
| Async model | Promises, `AsyncIterable` streams | Sync `Figranium` and async `AsyncFigranium` | `async throws`, `AsyncThrowingStream` | `suspend` functions, `Flow` streams |
| License | Apache-2.0 | Apache-2.0 | Apache-2.0 | Apache-2.0 |
| Repository | [figranium-js](https://github.com/figranium/figranium-js) | [figranium-py](https://github.com/figranium/figranium-py) | [figranium-swift](https://github.com/figranium/figranium-swift) | [figranium-kotlin](https://github.com/figranium/figranium-kotlin) |

## Install an SDK

```bash npm (JavaScript) theme={null}
npm install @figranium/sdk
```

```bash pip (Python) theme={null}
pip install figranium-sdk
```

```swift Package.swift (Swift) theme={null}
.package(url: "https://github.com/figranium/figranium-swift.git", branch: "main")
```

```kotlin build.gradle.kts (Kotlin) theme={null}
implementation("dev.figranium:figranium:0.1.0")
```

## What every SDK can do

* Save, update, version, and roll back tasks.
* Run tasks with runtime variables, or call `scrape`, `agent`, and `headful` directly.
* Stream live execution and selector events over Server-Sent Events.
* Manage schedules, captures, cookies, and Cabinets.
* Open and inspect headful browser sessions.

## Before you start

**1. Run a Figranium server**

Every SDK talks to a running Figranium instance. Local installs listen on `http://localhost:11345` by default. See [Docker Compose](https://figranium.dev/docs/docker-compose.md) to set one up.

**2. Create an API key**

Generate a key so the SDK can authenticate requests. See [API key](https://figranium.dev/docs/api-key.md).

**3. Follow your SDK's quickstart**

Build and run your first task with the [JavaScript](https://figranium.dev/docs/sdk/js/quickstart.md), [Python](https://figranium.dev/docs/sdk/python/quickstart.md), [Swift](https://figranium.dev/docs/sdk/swift/quickstart.md), or [Kotlin](https://figranium.dev/docs/sdk/kotlin/quickstart.md) quickstart.

> [!TIP]
>
> Prefer calling HTTP directly? The [REST API](https://figranium.dev/docs/rest-api.md) exposes the same endpoints the SDKs wrap.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.