DataXAPI for Python
DataXAPI is market data infrastructure for developers and AI agents: 224 endpoints across 20 platforms (Douyin, Xiaohongshu (RedNote), TikTok, WeChat, X, YouTube and more) behind one key and one response shape, paid per call from $0.0003, with failed calls free and $0.10 of free credit on sign-up. Social media is the largest category; creator rate cards, ad libraries and shop products are the others. Figures as of version 1.1.0 (October 2026); the live catalog is at dataxapi.com/apis.
dataxapi is the Python client: every endpoint is a method, generated from the catalog, with its price in its
docstring.
Install
pip install dataxapi
Python 3.9 or later; standard library only.
Version 1 is a new client for the new interface. Code written for dataxapi 0.x does not carry over: see the
guide.
Quick start
Make a key in the console and put it in the environment variable
DATAXAPI_API_KEY.
from dataxapi import DataXAPI
dx = DataXAPI() # reads DATAXAPI_API_KEY
result = dx.douyin.videos.comments.list(id="7694940173372575014")
result["data"]["items"] is the page of comments; result["meta"]["billing"]["amount"] is what the call was charged.
One call is one page, charged on its own. Every call goes out under an idempotency key the SDK makes, so its own
retries are never charged twice. dx.call(id, params, options={"max_price": ...}) calls by ID and is refused before
it runs if it could cost more. dx.pages(…) and dx.items(…) walk pages within limits on pages, items and money.
Connect an AI agent
Paste this into Claude Code, Codex, Cursor or any agent that can read a web page, with your own key in it:
Read https://dataxapi.com/agents.md and set up DataXAPI in this agent. My API key is dx_…; use it for every DataXAPI call.
Or add the MCP server yourself: https://api.dataxapi.com/mcp (streamable HTTP), with the header
Authorization: Bearer <your key>; clients that sign in by OAuth (ChatGPT, Claude) need only the address. Five tools:
find, describe, call, read_more, account. npx dataxapi setup writes the MCP entry and the base skill for
Claude Code, Codex and Cursor. Setup guides: dataxapi.com/mcp.
Platforms and example endpoints
| Platform | Example endpoints |
|---|---|
| Douyin API (抖音) | douyin.videos.search, douyin.videos.comments.list, douyin.users.get; 巨量算数 keyword index douyin.index.keywords.history; 星图 rate card douyin.xingtu.creators.rates.get |
| Xiaohongshu (RedNote) API (小红书) | xiaohongshu.notes.search, xiaohongshu.notes.comments.list, xiaohongshu.users.get; 蒲公英 creators xiaohongshu.pgy.creators.get |
| TikTok API | tiktok.videos.search, tiktok.videos.transcript.get, tiktok.shop.products.reviews.list, tiktok.creative_center.ads.search |
| WeChat (微信公众号, 视频号) | wechat_mp.accounts.articles.list, wechat_mp.articles.metrics, wechat_channels.videos.comments.list |
| Kuaishou, Bilibili, Weibo, Zhihu | kuaishou.videos.search, bilibili.videos.get, weibo.trends.list, zhihu.questions.answers.list |
| X, YouTube, Instagram, Reddit | x.posts.search, youtube.videos.transcript.get, instagram.users.posts.list, reddit.posts.comments.list |
| Facebook, Threads, LinkedIn, Telegram, Pinterest | facebook.pages.posts.list, threads.posts.search, linkedin.companies.posts.list, telegram.channels.messages.list, pinterest.pins.search |
| Ad libraries | meta.ads.search, google.advertisers.ads.list, linkedin.ads.search, tiktok.ads.search |
Every platform answers in the same shape: the same parameters, paging, errors and fields. A field a platform cannot give is listed as missing, not silently dropped.
Links
- Pricing: dataxapi.com/pricing (every endpoint's price, as a file: prices.json)
- Docs: dataxapi.com/docs; this SDK: dataxapi.com/docs/sdk
- All endpoints: dataxapi.com/apis; for agents: llms.txt, openapi.json
- MCP server: dataxapi.com/mcp; Skills: dataxapi.com/skills
- The TypeScript SDK is
@dataxapi/sdkon npm; the command line isdataxapion npm (npx dataxapi --help). - 中文:dataxapi.com/zh
Licence
MIT
Metadata
Release files for dataxapi 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dataxapi-1.1.1.tar.gz | 60.1 kB | Without provenance | Details for dataxapi-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dataxapi-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for dataxapi-1.1.1-py3-none-any.whl |
Total release size: 119.5 kB
Release files / dataxapi-1.1.1.tar.gz
| Download URL | dataxapi-1.1.1.tar.gz |
|---|---|
| Size | 60.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd99c9f79c35697dbbf5523c290c8ea9c2a3dba79979748d3727fe31a1f28921
|
|
BLAKE2b-256 checksum How to use checksums |
525e027638a138fabc797a381bed6fbfe366e23e66ac8f7db16c355c04269af0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.12
|
Release files / dataxapi-1.1.1-py3-none-any.whl
| Download URL | dataxapi-1.1.1-py3-none-any.whl |
|---|---|
| Size | 59.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a5545e35d0f0f81c38eea18fc8e2c912e72aea4382d08a909e5cc342d66a70f3
|
|
BLAKE2b-256 checksum How to use checksums |
f6c5dbb7f5d9905826b2205561f4a3dc8ea374529ec969aac3831d53b775f955
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.12
|
Security for dataxapi 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.