TypeScript SDK
A zero-dependency, single-file TypeScript SDK for the Ranked AI REST API v1. Works anywherefetch is available — Node 18+, Deno, Bun, and modern browsers.
Installation
The SDK is a single file with no external dependencies. Copy it directly into your project:Quick start
Configuration
Error handling
Every failed request throws aRankedAIError with the HTTP status, error code, and request ID:
Pagination
All list endpoints return paginated responses. Themeta.pagination object tells you whether more data is available:
Manual pagination
Auto-pagination iterator
The SDK provides a built-inpaginate helper that yields every item across all pages:
Endpoints
Projects
Keywords (Rankings)
AI Prompts
Audits
Backlinks
Content
Reports
Webhooks
Webhook signature verification
When your server receives a webhook, verify the signature to confirm it was sent by Ranked AI. The signature is in theX-Webhook-Signature header as sha256=<hex>.