Skip to content
data-x-apiPublic

About

小红书、抖音、公众号、视频号数据 API · Market data API for AI agents: Douyin, Xiaohongshu (RedNote), WeChat, TikTok, X and more. Pay per call, errors not charged. SDKs and agent docs.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

26 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DataXAPI:小红书、抖音、公众号数据 API · Market data API for AI agents

小红书数据接口、抖音数据 API、公众号和视频号接口,以及微博、B站、知乎、快手、TikTok、X、YouTube:给 AI 和代码用的公开数据接口。一个 Key、一种返回格式,按次付费,出错不收费;新账户免费试用最多 333 次,不用绑卡。每个接口一页中文说明:docs/zh/apis.md;全部接口和价格:dataxapi.com/zh/apis。

DataXAPI is the market data layer for AI: public data from Douyin, Xiaohongshu (RedNote), TikTok, WeChat, X, YouTube and more, read live by your AI and your code with one key and one response shape. Paid per call from $0.0003; failed calls are free. New accounts can try it free: up to 333 calls, no card. Social media is the largest category; creator rate cards (星图, 蒲公英), keyword indexes (巨量算数), ad libraries and shop products are the others. The live catalog is at dataxapi.com/apis.

This repository holds the source of the two SDKs and the documents agents read. It is a mirror: it is overwritten from our main repository at every release. Questions and bugs: open an issue.

Install Source here
TypeScript SDK npm install @dataxapi/sdk typescript/
Python SDK pip install dataxapi python/
Command line npx dataxapi --help published on npm as one file
MCP server https://api.dataxapi.com/mcp hosted
MCP server on stdio npx -y @dataxapi/mcp or uvx dataxapi-mcp data-x-api/dataxapi-mcp
Agent Skills npx skills add data-x-api/skills data-x-api/skills
Dify plugin In Dify: Install plugin → GitHub → data-x-api/dify-plugin-dataxapi (Marketplace listing in review) data-x-api/dify-plugin-dataxapi
n8n node n8n-nodes-dataxapi data-x-api/n8n-nodes-dataxapi
LangChain tools pip install langchain-dataxapi data-x-api/langchain-dataxapi
Codex plugin codex plugin marketplace add data-x-api/codex-dataxapi, then codex plugin add dataxapi@dataxapi data-x-api/codex-dataxapi
DeepSeek Harness plugin dsh plugin --profile web add @dataxapi/dsh data-x-api/dsh-dataxapi

Quick start

TypeScript:

import { DataXAPI } from "@dataxapi/sdk";
const dx = new DataXAPI(); // reads DATAXAPI_API_KEY
const result = await dx.douyin.videos.comments.list({ id: "7694940173372575014" });

Python:

from dataxapi import DataXAPI
dx = DataXAPI()  # reads DATAXAPI_API_KEY
result = dx.douyin.videos.comments.list(id="7694940173372575014")

HTTP: GET https://api.dataxapi.com/v1/douyin/videos/comments/list?id=7694940173372575014 with Authorization: Bearer $DATAXAPI_API_KEY. An endpoint's path is its ID with the dots as slashes, under /v1.

Make a key in the console. Every result carries what the call was charged (meta.billing.amount, in US dollars). One call is one page; a next page is a new call.

Connect an AI agent

Paste this into your agent, 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: https://api.dataxapi.com/mcp (streamable HTTP), header Authorization: Bearer <your key>; ChatGPT and Claude connect by OAuth with the address alone. Five tools: find and describe (free, no key), call (charged), read_more and account (free). Guides for each client: dataxapi.com/mcp.

Download a video, or get what is said in it (下载无水印视频、视频转文字)

The command line does both from a post's link, or the whole share text the app copies. Node 20 or later; the key is read from DATAXAPI_API_KEY, or npx dataxapi login saves one.

npx dataxapi download "https://www.douyin.com/video/7694940173372575014" --out ./files
npx dataxapi download "<share text copied from the app>" --audio      # only the audio
npx dataxapi transcript "https://www.douyin.com/video/7694940173372575014" --srt subs.srt --txt words.txt
npx dataxapi transcript "<a long video's link>" --wait 0              # prints the job, to fetch its text later

What these printed on 2026-12-04:

$ npx dataxapi download "https://www.douyin.com/video/7694940173372575014" --out ./files
Saved 2 files to ./files (douyin.videos.media.get):
  7694940173372575014.mp4         637.0 KB
  7694940173372575014.cover.webp  23.1 KB
Charged $0.002 in all (1 call)

$ npx dataxapi transcript "https://www.douyin.com/video/7694940173372575014" --srt subs.srt
Written to ./subs.srt
Charged $0.0058 in all (1 call)

$ head -3 subs.srt
1
00:00:00,120 --> 00:00:01,880
将与你相逢。
Command Platforms
download: the video without watermark, its cover and pictures; --all every quality, the audio, subtitles and live photos Douyin, Xiaohongshu (video and image notes), Bilibili, Kuaishou, Weibo, WeChat Channels, TikTok, Instagram
transcript: the words with each sentence timed; --srt, --txt write files; --speakers tells speakers apart Douyin, Xiaohongshu, Bilibili, Kuaishou, Weibo, WeChat Channels, TikTok, YouTube, Instagram, X, LinkedIn, Reddit, Meta ads
  • Files go from the platform's own addresses straight to your disk, written as they arrive. An address that has expired is asked for again once.
  • A video of up to 5 minutes comes back as text at once. One up to 2 hours is answered with a job and recognised meanwhile: transcript waits for it (--wait, 1800 seconds unless said), or --wait 0 prints the command that fetches it later, within 24 hours.
  • A transcript is charged a call plus each minute of speech recognised, a part minute counted as one; asking with the job is free until the text is there. A video in which nobody speaks, a post that is gone and a failed call cost nothing. Every price: dataxapi.com/pricing.
  • The same from code: dx.douyin.videos.media.get({ url }) and dx.douyin.videos.transcript.get({ url }); each platform's are <platform>.….media.get and ….transcript.get in docs/apis.md.

中文:命令行一条命令下载无水印视频、封面和图片(download),或把视频里说的话转成文字和 SRT 字幕(transcript),给作品链接或 App 复制的整段分享文案都行。抖音、小红书、B站、快手、微博、视频号都支持,TikTok、YouTube、Instagram 等也有。5 分钟以内的视频当场出文字; 2 小时以内的长视频先提交,命令会等它识别完(--wait 0 只打印凭证,24 小时内再取)。转文字按次收费、识别的语音另按分钟收,不足一分钟按一分钟; 没人说话、作品已删除、调用失败都不收费。文件从平台地址直接下载到你的电脑,不经过我们。

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 endpoint, with its parameters, fields, price and a recorded example answer: docs/apis/ here, or dataxapi.com/apis.

What is in docs/

File What it is
docs/agents.md What an agent reads to set itself up
docs/llms.txt, docs/llms-full.txt The index for language models; every endpoint on a line
docs/openapi.json The interface description
docs/apis.md, docs/apis/ Every platform and every endpoint, one Markdown page each
docs/docs/objects/ The shared objects: post, comment, account, creator, ad, product…
docs/mcp.md, docs/mcp/, docs/mcp-tools.json The MCP server, per platform, and its tool list
docs/prices.json Every endpoint's unit and price
docs/zh/ The same documents in Chinese (中文): docs/zh/apis.md and docs/zh/apis/, one page per endpoint

By platform

平台 / Platform Every endpoint, scripts and recorded answers
抖音(视频、评论、播放量、巨量算数、星图)/ Douyin data-x-api/douyin-api
微信(公众号、视频号、搜一搜、微信指数)/ WeChat data-x-api/wechat-api
视频号(账号搜索、作品、评论、互动数据、直播回放)/ WeChat Channels data-x-api/wechat-channels-api
小红书(笔记、评论、博主、蒲公英)/ Xiaohongshu (RedNote) data-x-api/xiaohongshu-api
知乎 / Zhihu data-x-api/zhihu-api
微博 / Weibo data-x-api/weibo-api
B站 / Bilibili data-x-api/bilibili-api
快手 / Kuaishou data-x-api/kuaishou-api
TikTok data-x-api/tiktok-api
X (Twitter) data-x-api/x-twitter-api
YouTube data-x-api/youtube-api
Reddit data-x-api/reddit-api
Instagram data-x-api/instagram-api
广告库 / Ad libraries (Meta, Google, TikTok, LinkedIn) data-x-api/ad-library-api

Ready-to-run projects

Small projects, one task each: one script or one file, no dependencies, with the output of a real run in the README.

要办的事 / Task Project
公众号历史文章批量导出 / Export a WeChat Official Account's articles wechat-article-export
把公众号变成 RSS 订阅 / WeChat Official Accounts as RSS feeds wechat-rss
不用登录的小红书 MCP / Xiaohongshu MCP with no login xiaohongshu-mcp-no-login
查蒲公英达人的报价和数据 / Xiaohongshu PGY creator rates and data pugongying-api
查抖音指数和巨量算数 / Douyin index keyword trends douyin-index-api
自媒体数据技能合集:找爆款选题、导评论、视频转文字、盯同行 / Skills for Chinese social media data zimeiti-skills

Links

Pricing · Docs · All endpoints · MCP · Skills · Status · Changelog · 中文

中文

DataXAPI 是给 AI 的市场数据层:抖音、小红书、TikTok、微信公众号和视频号、快手、B站、微博、知乎、X、YouTube 等平台的公开市场数据,你的 AI 和代码用一把 Key、同一种返回结构实时取回,按次付费,一次 $0.0003 起;调用失败不收费。新账户免费试用,最多 333 次,不用绑卡。社媒是最大的品类,另有星图和蒲公英的达人报价、巨量算数的关键词指数、广告库和电商商品。接进 AI:把上面那段提示词(换成你自己的 Key)贴给你的 agent。中文文档:dataxapi.com/zh/docs。

每个接口的中文文档在这个仓库里也有一份:目录是 docs/zh/apis.md,每个接口一页在 docs/zh/apis/,写明参数、返回字段、价格和一段录下来的真实返回。给模型读的索引是 docs/zh/llms.txt。

Licence

MIT

About

小红书、抖音、公众号、视频号数据 API · Market data API for AI agents: Douyin, Xiaohongshu (RedNote), WeChat, TikTok, X and more. Pay per call, errors not charged. SDKs and agent docs.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages