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

# SDKs

> Official RankRaft AI clients for JavaScript/TypeScript and Python.

RankRaft AI publishes two official clients for the [REST API](/api-reference/introduction). Both are open source, MIT licensed, and built from the same OpenAPI specification the API serves, so they cover every endpoint.

> **[JavaScript / TypeScript](/sdks/javascript)**
>
> `npm install rankraft-js` — Node 20+, Cloudflare Workers, Deno and Bun. Zero dependencies.

> **[Python](/sdks/python)**
>
> `pip install rankraft-py` — Python 3.10+. Optional `.to_pandas()`.

## Why use an SDK

You can call the API with plain `fetch` or `requests`, but the SDKs handle the parts that are easy to get wrong:

* **Pagination** — one call gives you the first page; iterate to get every row. The client re-sends the exact query with each cursor, so you never hit `invalid_cursor`.
* **Retries** — a `429` is retried after exactly the `Retry-After` time, and only safe operations are retried on other errors.
* **Typed errors** — one error class per API error code, each carrying the `request_id` for support.
* **Filters** — a small builder for the [filter tree](/api-reference/filtering) that sends values in the format the API expects.
* **Same numbers as the dashboard** — the API scores with the same code as your dashboard, and the SDKs pass results through unchanged.

## Before you start

**1. Enterprise plan**

The REST API, and so the SDKs, are part of the Enterprise plan.

**2. Create an API key**

An owner creates one under **Settings → API & AI assistants**. It starts with `rr_api_` and is shown once. See [API keys](/configuration/api-keys).

**3. Set it as an environment variable**

```bash theme={"system"}
export RANKRAFT_API_KEY=rr_api_…
```

Both SDKs read `RANKRAFT_API_KEY` automatically.

> [!WARNING]
>
> Use the SDKs on a server only — route handlers, background jobs, Workers, notebooks. A key reads every site in your organization, and the API deliberately sends no CORS headers. The JavaScript client refuses to start in a browser.

## SDK, MCP server or skill?

| You want to… | Use |
| - | - |
| Pull data into a dashboard, warehouse or script, or manage prompts in code | An **SDK** (Enterprise) |
| Ask questions about your data in Claude, ChatGPT, Cursor or Codex | The [MCP server](/mcp/introduction) (every paid plan, read-only) |
| Have a coding agent write correct RankRaft code for you | The [RankRaft skill](/skills/rankraft-skill) |

## Packages

* JavaScript / TypeScript: [rankraft-js on npm](https://www.npmjs.com/package/rankraft-js)
* Python: [rankraft-py on PyPI](https://pypi.org/project/rankraft-py/)
* Claude Code plugin: [github.com/RankRaft/rankraft-claude-plugin](https://github.com/RankRaft/rankraft-claude-plugin) · [setup](/skills/claude-code-plugin)
* Agent skill for other coding agents: [github.com/RankRaft/rankraft-skill](https://github.com/RankRaft/rankraft-skill)


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