fetch available in Node 22+ — no dependencies. It sets the bearer header and
base URL once, exposes an async generator that follows cursor pagination, and
throws a typed error from RFC 9457
problem documents, including the request id.
Create a key on the API keys page and
pass it as a bearer token. These snippets are ESM (
.ts / .mts) and run on Node 22+
without a transport library.Types and client
client.ts
Identify your key
GET /whoami confirms the key works and returns its organization.
Paginate any list endpoint
This async generator follows the cursor: it passes the previous response’snext_cursor back as cursor and stops once has_next is false.
Treat
next_cursor as opaque — pass back the exact value you received. See
Pagination for the full contract.Track an account
POST /accounts requires platform (instagram or tiktok) and username.
POST /videos takes platform and an identifier
(a full URL, a numeric id, or — for Instagram — a bare shortcode):
Organization overview
GET /overview accepts a period of 7d, 30d, or 90d.
Handling errors
Any non-2xx response throwsCreatorAuditError with the parsed problem fields
and the X-Request-ID, so you can branch on code and report the request id.
Next steps
- Introduction — auth, base URL, and conventions
- Pagination — the cursor contract in detail
- Quickstart — your first request end to end