JavaScript / TypeScript
npm install rankraft-js — Node 20+, Cloudflare Workers, Deno and Bun. Zero dependencies.Python
pip install rankraft-py — Python 3.10+. Optional .to_pandas().Why use an SDK
You can call the API with plainfetch 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
429is retried after exactly theRetry-Aftertime, and only safe operations are retried on other errors. - Typed errors — one error class per API error code, each carrying the
request_idfor support. - Filters — a small builder for the filter tree 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.3
Set it as an environment variable
RANKRAFT_API_KEY automatically.SDK, MCP server or skill?
Packages
- JavaScript / TypeScript: rankraft-js on npm
- Python: rankraft-py on PyPI
- Claude Code plugin: github.com/RankRaft/rankraft-claude-plugin · setup
- Agent skill for other coding agents: github.com/RankRaft/rankraft-skill