Authentication

Every call carries one header, Authorization: Bearer with your key. An account holds up to 50 keys, each with its own spending limit, expiry and scope.

Updated 2026-10-13 · Works with API v1Open in ChatGPTOpen in Claude

The header

The credential goes in Authorization: Bearer. It is an API key, or the sign-in token the Console uses. It is not accepted in the address or in any other header.

bash
curl "https://api.dataxapi.com/v1/account" \
  -H "Authorization: Bearer $DATAXAPI_API_KEY"

Keep the key in the environment variable DATAXAPI_API_KEY: the SDKs, the command line and the MCP entries all read it from there.

Keys

A key is dx_ followed by 32 characters. It is shown once, when it is created, and cannot be read back later: the service keeps only its first characters, to tell keys apart. A lost key is replaced by a new one. An account holds up to 50 keys; make and manage them on the Keys page of the Console.

Each key hasWhat it does
NameWhat you call it.
Spending limitBy day, by month or in total, in US dollars. Days and months are UTC. A call the limit does not cover is refused before it runs.
ExpiryAfter it the key answers 401.
ScopeA list of endpoints the key may call; none means all. An endpoint added to the service later is not in an existing list.
Disable, enableSwitch a key off and on again.
RevokeFor good: a revoked key cannot be brought back.
A key holds no money. All keys of an account draw on one balance and share one rate limit.

What a key may do

GET /v1/account answers for the key that asks. It is free.

balance

What the account can spend now, in US dollars.

key.budget

daily, monthly and total, each with limit, spent and remaining.

key.scopes

The endpoints this key may call; null means all.

key.expires_at

When the key expires; null means never.

rate

The rate limit in force for the account: see Rate limits.

The same from the SDKs is dx.account(), and from the command line dataxapi balance.

Without a key

The catalog needs no key: what there is, what each endpoint takes and returns, and every price.

GET /v1/catalog

The whole catalog.

GET /v1/catalog/capabilities/{id}

One endpoint's whole contract, and whether it is up now.

GET /v1/catalog/search

Finds the endpoint for a need put in words, in English or Chinese: query, platform, category.

GET /v1/catalog/status

What is up now: the data of the status page.

bash
curl -G "https://api.dataxapi.com/v1/catalog/search" --data-urlencode "query=tiktok video search"

Errors

CodeStatusWhenWhat to do
unauthorized401No credential was sent, or it is invalid, disabled or expiredCheck the header and the key's state on the Keys page.
key_scope_denied403This key may not call this endpointAdd the endpoint to the key's scope, or use another key.
key_budget_exceeded402This key's spending limit does not cover the callRaise the limit, or wait for the day or the month to turn (reason says which limit).

None of these is charged.