DataXAPI docs
207 endpoints on 21 platforms, from $0.0003 a call, take the same parameters and answer in one envelope. Learn it once in the 10 guides below, then look any endpoint up in the API reference.
Quickstart in three steps
Get a key
Sign in with a 6-digit code sent to your email, or with Google. There is no password. A new account can try it free ($0.10 of credit), once per email: enough for 50 calls at $0.0020.
Your first key is shown once, right after sign-up. Copy it then: it cannot be read back later. Keep it in the environment variable DATAXAPI_API_KEY, never in code.
export DATAXAPI_API_KEY="<your key>"Make a call
This calls tiktok.videos.search, TikTok video search. Every other endpoint is called the same way.
curl -G "https://api.dataxapi.com/v1/tiktok/videos/search" \ --data-urlencode "query=space station" \ -H "Authorization: Bearer $DATAXAPI_API_KEY"
from dataxapi import DataXAPI dx = DataXAPI() # reads DATAXAPI_API_KEY result = dx.tiktok.videos.search(query="space station") print(result["data"]["items"])
import { DataXAPI } from "@dataxapi/sdk";
const dx = new DataXAPI(); // reads DATAXAPI_API_KEY
const result = await dx.tiktok.videos.search({ query: "space station" });
console.log(result.data.items);dataxapi call tiktok.videos.search 'query=space station'The Python and TypeScript forms use the SDK; the last one uses the command line.
The price is $0.0020 a call. A call that fails costs nothing. Run it in the Playground: it needs a sign-in and runs on your own balance.
Four things to know:
The data: a list of standard objects, here post. The same object has the same fields on every platform.
Pass it back as cursor to get the next page; null when there is none. Each page is a call of its own.
The fields this endpoint cannot give, each with the reason. A field that is absent from data.items and listed here is not a fault.
What this call was charged (amount) and the balance after it (balance_after).
code, message, charged, retry. Too little balance, for one, is insufficient_balance with charged false: nothing was taken. Every code is on the error codes page.Connect your AI
No code needed: copy this sentence into an AI that can act, such as Claude Code, Cursor or Codex. It reads the setup page and connects the MCP server; from then on you ask in plain words.
Read https://dataxapi.com/agents.md and set up DataXAPI in this agent. My API key is dx_…; use it for every DataXAPI call.
dx_… is. The Console's connect page copies the same sentence with a key made for that agent.To set it up by hand, the MCP address is https://api.dataxapi.com/mcp. Once connected, your AI gets 5 tools:
findFinds the endpoint for a question.describeReads up to 5 endpoints in full: parameters, fields, price.callRuns one endpoint and returns one page of data.read_moreRe-reads a result for 24 hours.accountBalance, usage and receipts.The guides
Quickstart
Get a key, make one call and read the answer. A new account can try it free with $0.10 of credit, and the same three steps work on all 21 platforms.
Authentication
How a call is authenticated: one Authorization header with your key. An account holds up to 50 keys, each with a spending limit, an expiry and a scope; a key is shown once, when it is made.
Requests and responses
One path per endpoint under /v1, the same parameter names on all 207 endpoints, and one envelope for every answer: code, request_id, data, page, warnings, meta.
Pagination
One call returns 1 page. Pass page.next_cursor back as cursor for the next one; each page is charged as a call of its own, and a cursor says when it expires.
Billing
What a call costs ($0.0003 to $0.0400), when it is charged and when it is not, how an Idempotency-Key keeps a retry from being charged twice, and how the prepaid balance works.
Errors
All 34 error codes of the API on one page, each with its HTTP status, what it means, what to do, whether you were charged and whether to retry.
Rate limits
Every answer carries 3 rate-limit headers that say the limit, what is left and when it resets. A request over the limit gets 429 at once, is not charged, and says how long to wait.
SDKs
The TypeScript and Python SDKs: 207 typed methods, an idempotency key on every call, retries as the service allows, paging with limits on items and spend, and one role across platforms.
Command line
The dataxapi command line: 8 commands to find an endpoint, see its price, call it, read on, check the balance, run a task and set up your agents. Exit codes 0 to 5 tell a script what to do next.
MCP server
One remote MCP endpoint with 5 tools gives an agent all 207 endpoints: the address, the entry for Claude Code, Codex and Cursor, what each tool does and what it costs.
API reference
207 endpoints on 21 platforms. Each has a page with its parameters, its fields, a recorded response and its price.
For AI agents and machines
The same facts as files. Every page of this site also has a Markdown version at its address ending in .md.
The index an agent reads first
What an agent reads to set itself up
The interface description
Every price, for a machine