The fastest path: hand it to your coding agent
If you use a coding agent (Claude Code, Cursor, Codex, or any MCP-capable assistant), paste this line into it:Prerequisites
- An AnyAPI account. Sign up at getanyapi.com.
- A terminal with
curl(or any HTTP client).
Get started
1
Create an API key
In the dashboard, open API Keys and create a new
key. Copy it now: it is shown only once.New accounts start with about 100 free requests.
2
Make your first call
Every API is a single
POST to /v1/run/{sku}. Pass your key with the
X-API-Key header (or Authorization: Bearer) and the SKU’s normalized input
as the JSON body.The example uses tiktok.profile. For any other SKU, fetch GET /v1/apis/{sku} first
and build the body from its inputSchema. Do not copy fields from another API or retry
invalid input with guessed aliases./v1/run/{sku} accepts optional query parameters that shrink the response, for
example to keep it out of an agent’s context window: fields (keep only these keys),
max_items (cap the rows), and summary (outline only). They trim what is returned,
not what you are billed. See MCP server.3
Read the response
output is the result, costUsd is what this call cost you in USD, and items is the
number of results you were charged for (on per-result APIs).A legitimate “not found” is a success:
output is
{ "found": false, "data": null, "reason": "not_found" }. You get it when the
account, post, video, or page you named does not exist, has been removed, or a search
matched nothing; a suspended account says "reason": "suspended" on an API whose source
can tell. Each API’s output schema lists the reasons it can return. A miss is billed
only when a source charged AnyAPI for the lookup; see Pricing.
costUsd is always what this call cost you, 0 when nothing was charged. See
Not found vs error for every outcome.Find an API
To browse by eye, start at the full catalog or a platform page such as Instagram, TikTok, LinkedIn, or Google Maps. From code, browse by category or use the dedicated ranked search endpoint:/catalog/search, q is optional. Name any combination of q, category, and
platform; only a request naming none of them is rejected. Both endpoints are free and
need no key.
Send only properties the selected inputSchema declares. A field one API accepts, such as
limit, cursor, page, or sort, may be invalid for another.
Browse and search results report provider: "AnyAPI", nested USD pricing, and
failover, which says whether AnyAPI currently has an alternate route. The
pricing fields are explained on the introduction page. Do not infer failover
from the number of lanes or recompute pricing.from from lane prices.
Most endpoints are served by established providers such as Apify and ScrapeCreators,
under volume contracts whose lower prices reach you, plus smaller specialist sources that
failover makes safe to use. The providers page lists
every source and the traffic it served.
If you build a discovery wrapper, treat response objects as extensible: read the fields
you need, ignore additions, and pass input and output JSON Schemas through as opaque
objects.
The full catalog with typed schemas also lives in the API Reference.
Choose request deadlines from observed latency
Set your HTTP client timeout per SKU, from its observed latency:latency reports trailing-30-day p50Ms, p95Ms, p99Ms, and sample values from
successful end-to-end requests after AnyAPI failover. Its basis is
service_time_excludes_caller_requested_delay. If excludesCallerDelay is true, your
wall-clock time also includes the waiting requested in your input.
latency is null when there are no successful observations or metrics could not be
read. A p99 value is an observation, not a maximum or a recommended timeout. Browse and
search responses omit latency.
Retry safely after a disconnect
Wallet-funded REST calls support an optionalIdempotency-Key header. Generate one key for a
logical call and keep it until you receive a terminal response:
409 idempotency_in_progressmeans the original run is still working. Wait a few seconds and retry the same request.200withIdempotency-Replayed: truereturns the originaloutput,costUsd, anditemswithout another provider run or charge.- Reusing the key with different request semantics returns
409 idempotency_conflict.
Idempotency-Key stay tied to the caller and are canceled on disconnect.