Quickstart
Get a key (a free trial with $0.10 of credit), make one call, read the answer: about 2 minutes, and each of the 21 platforms after this works the same way.
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.
This is a recorded response, cut to its first item. Names, text, IDs and links are examples, not the recorded ones; the figures are as recorded, and the request ID, the cursor and the balance are made up.
Response · 200 · 30 items · charged $0.0020
{
"code": "ok",
"request_id": "eecdbf3f-64ce-4b11-b396-ee190d7ff728",
"data": {
"items": [
{
"id": "7566364515678793552",
"url": "https://www.tiktok.com/@trail_and_lens/video/7566364515678793552",
"type": "video",
"text": "My honest take on space station, a month in.",
"lang": "en",
"published_at": "2026-10-11T23:17:34.000Z",
"author": {
"id": "6279025233109159764",
"username": "trail_and_lens",
"name": "Maya Chen",
"avatar_url": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/fff322a0d982cccf1e82~c5_100x100.jpeg",
"followers": 92601
},
"metrics": {
"likes": 353,
"comments": 11,
"shares": 19,
"favorites": 40,
"views": 7561
},
"hashtags": [
"weekendvibes",
"gearreview"
],
"mentions": []
}
]
},
"page": {
"next_cursor": "c1.bGY_kn5Dxsgl6MN3VXHyMcLAdlxPxQw-FwjswIlE",
"cursor_expires_at": "2026-10-12T20:17:24.000Z",
"has_more": true,
"returned": 30
},
"warnings": [],
"meta": {
"capability": "tiktok.videos.search",
"result_status": "complete",
"fetched_at": "2026-10-12T19:17:24.000Z",
"cached": false,
"replayed": false,
"unavailable": {
"title": "platform",
"images": "capability",
"author.verified": "capability",
"metrics.reposts": "capability",
"mentions.username": "capability",
"mentions.name": "capability",
"post_id": "platform",
"parent_id": "platform",
"root_id": "platform",
"is_pinned": "capability"
},
"billing": {
"amount": "0.002",
"currency": "USD",
"balance_after": "9.998"
}
}
}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.Next
- Authentication: more keys, each with its own limit, expiry and scope.
- Requests and responses: the parameter names and the envelope, the same on all 21 platforms.
- Pagination and billing: what the next page is and what it costs.
- Rate limits and error codes: when to wait and when to stop.
- SDKs, the command line and the MCP server.
- All 207 endpoints, each on a page with its price.