How to choose a social media data API (2026)
Check five things before you commit: who pays when a call fails, whether you need a platform login or cookie, how far the Chinese platforms go, whether an AI agent can use it over MCP, and how you can pay. okdata has 214 endpoints on 17 platforms from $0.0001 a call, charges nothing for a failed call and needs no platform account; the other options were checked on 2026-11-12.
Updated · Other options checked on
There are four broad ways to get public social media data into your code: the platform's own API, a crawler you run yourself, a general-purpose scraping service where you rent someone else's scraper, and a per-call data API that hands back ready-made JSON. Which one fits depends less on the headline price than on what happens around each call: the failures, the logins, the platforms you actually need and who will be making the calls. The five criteria below are the ones that usually decide it.
What to compare first
Who pays for a failed call. Calls fail. A post gets deleted, a platform blocks a request, an upstream times out. Find out whether you are billed for those, and whether a retry after a dropped connection can bill you twice. A low price per 1,000 items means little if a fifth of the calls come back empty and still cost money.
Login and cookie needs. Some routes need a platform account of your own: a QR login, a cookie pasted into a config file, or a browser profile that has to stay signed in. That account can expire, get logged out by another session or be restricted. Other routes need only an API key.
Chinese platform coverage. Douyin, Xiaohongshu, WeChat Official Accounts, WeChat Channels, Bilibili, Weibo, Kuaishou and Zhihu each have their own IDs, signatures and login rules. Check which of them a source covers and how deep it goes: search only, or also comments, profiles and an account's full history.
AI and MCP readiness. If an agent will do the calling, check whether there is an MCP server, whether it runs on your machine or at a hosted URL, and whether the agent can learn the price of a call before it spends anything. MCP is an open standard for connecting AI applications to outside tools and data, so one server works in many clients. Machine-readable docs, such as an OpenAPI file or Markdown copies of the pages, help an agent too.
How you pay. Subscription or prepaid balance, the smallest top-up, the currency, and whether card, Alipay or WeChat Pay work. For a team in China, or a researcher outside it, this alone can rule an option in or out.
Side by side
The table compares approaches, not products. The official APIs are named because each platform has exactly one; their facts come from the official pages under Sources, read on 2026-11-12, and where a page does not say, the cell says so. The other rows are categories: check the specific tool or provider against its own pages.
| Option | A failed call | Platform login | Douyin, Xiaohongshu, WeChat | AI and MCP | How you pay |
|---|---|---|---|---|---|
| X API (official) | Reads are charged per resource returned; the same resource is not charged again within one UTC day | A developer account, with credits bought in the Developer Console | X only | Not stated on its pricing page as of 2026-11-12 | Prepaid credits, pay per use: $5 per 1,000 posts read, capped at 3 million post reads a month |
| YouTube Data API (official) | Every request, invalid ones included, costs at least one quota unit | A Google Cloud project; caption downloads need permission to edit the video | YouTube only | Not stated on its quota page as of 2026-11-12 | A free daily quota: 100 search.list calls, 100 uploads and 10,000 units for everything else; more by request |
| Open-source crawler you run | Your server, proxies and accounts cost the same whether a run works or not | Usually a QR or cookie login with your own account, kept in a browser | Depends on the project; each platform needs its own login and its own fixes when it changes | Depends on the project | Free; licences vary, and some forbid commercial use |
| General-purpose scraping APIs and actor marketplaces | Depends on the provider and on each scraper's own terms; read both | Depends on the scraper; check whether it asks for your cookies | Depends on the scraper | Check the provider's docs | Check the provider's pricing page |
| Other per-call social data APIs | Read each provider's billing terms | Usually an API key | Coverage differs most on WeChat; compare endpoint lists | Check the provider's docs | Check the provider's pricing page |
| okdata | Not charged, timeouts included; on most endpoints a deleted or private item (not_found) is free too |
None: one API key | Douyin, Xiaohongshu, WeChat Official Accounts and Channels, Bilibili, Weibo, Kuaishou, Zhihu | Hosted MCP server at https://api.okdata.online/mcp; find and describe are free |
A US-dollar balance, $0.10 trial credit, top-ups from $10 by card, Alipay or WeChat Pay |
Where okdata differs
- One response shape across platforms. A Douyin video and an X post both come back as a post with
text,author,published_atandmetrics. Swapping Douyin video search for TikTok video search changes the path, not your parser. - Prices before the call. Every endpoint page and prices.json list the price, and through MCP the free
describetool tells an agent what a call will cost. A page of Xiaohongshu note search is $0.02, a page of X post search $0.002, and a YouTube transcript $0.004, for any public video that has captions. - Failures cost nothing, and retries are safe. Send an
Idempotency-Keyheader; the same request with the same key within 24 hours returns the stored answer withmeta.replayed: trueand no new charge. - No account of yours is involved. There is no QR code to scan, no cookie to refresh and no account to get restricted.
- Payment from inside or outside China. Card through Stripe, or Alipay and WeChat Pay through XorPay.
When okdata is the wrong choice
- You need to post, reply, like or send messages. okdata reads public data only. Use the platform's official API or its own tools.
- You need private numbers about accounts you own, such as your X bookmarks or your WeChat account's daily follower changes. The official APIs give you those under your own credentials, and X prices reads of your own data at $1 per 1,000 resources.
- You need only a little YouTube metadata. The YouTube Data API's free daily quota covers small jobs at no cost.
- The platform is not in the catalog, for example Baidu Tieba or Douban. An open-source crawler or a general-purpose scraper is the way there.
- You run very high volumes and have engineers to spare. At some scale your own crawlers can cost less per item; self-hosted scraper vs API cost works through the numbers, and scraping it yourself vs a per-call API compares the upkeep.
How to try it
Sign up and you get $0.10 of credit with no card, enough for a few searches and comment pages. Each endpoint page and the pricing page show what a call costs. The quickstart walks through the first request:
curl -G "https://api.okdata.online/v1/douyin/videos/search" \
-H "Authorization: Bearer $OKDATA_API_KEY" \
--data-urlencode 'query=露营' \
--data-urlencode 'fields=id,text,author.name,metrics.likes'
To let an agent do the work, add the MCP server to Claude, Cursor, Codex or ChatGPT and ask it to state the cost of a task before it starts.
Questions
Is a failed call charged on okdata?
No. Errors and timeouts cost nothing, and on most endpoints so does an item that no longer exists (not_found); prices.json lists what each endpoint charges in that case. The error body says whether you were charged and, for rate_limited, how many seconds to wait. See failed calls and refunds.
Do I need a Douyin or Xiaohongshu account?
No. Every call is an HTTPS request with your okdata key. You never hand over a cookie, scan a QR code or run signature code.
Is the official API always the safer choice?
For your own accounts and for anything that writes, yes. For public data about accounts you do not control, official routes are often narrower: YouTube's captions download, for example, works only for videos you have permission to edit. Official APIs vs third-party data APIs goes platform by platform.
Can an AI agent use it without code?
Yes. Connect https://api.okdata.online/mcp in an MCP client with your key in the Authorization header. The agent finds an endpoint, reads its price for free and calls it; only the call is charged.
Can I pay with Alipay or WeChat Pay?
Yes. Top-ups start at $10 and can be paid by card, Alipay or WeChat Pay. Top-ups are final, so start with the trial credit and a small top-up. See paying with Alipay or WeChat Pay.