Best Social Media Data APIs for AI Agents (2026): Structured JSON vs Scraping vs Official OAuth
Best social media data API for AI agents: structured JSON vs scraping vs official OAuth for Douyin, Xiaohongshu, Weibo, TikTok, and X.

The search for the best social media data API for AI agents usually ends on a Western list: TikTok, Instagram, X, and a scraper with an MCP server. That list goes quiet when the agent also has to read Douyin, Xiaohongshu, and Weibo. The other tabs are an Actor for a page no endpoint covers, and an official OAuth app the competitor will never authorize. Those are different jobs. This page picks among the three.
On 2026-11-08 the SandBase API catalog spanned 113 platforms. Social Media was 31 of them. The first row shows Twitter at 47 endpoints and TikTok at 166. Douyin, Xiaohongshu, and Weibo are in that catalog, not in the first six. Totals below are that day’s hub headers. Search volume was not measured.
SandBase /apis Social Media catalog — Twitter, TikTok and peers on one prepaid balance (China hubs live deeper in the catalog).
Sync JSON versus a scrape job, including Apify, Bright Data, RapidAPI, and official APIs, is already Top 5 Social Media Data APIs for AI Agents (2026). This page does not redo that matrix. The wider platform list is Best Social Media Data APIs for AI Agents (2026).
Key takeaway
- For public posts, profiles, comments, or trends inside one agent turn, start with a structured JSON catalog. Use a scraper or Actor when no endpoint covers the field. Use official OAuth when you post, send DMs, or read data the account owner authorized.
- On 2026-11-08 one SandBase key reached Douyin (319 endpoints), Xiaohongshu (67), Weibo (63), TikTok (166), and X (47). Search and inspect were $0. Eligible data APIs shared 100 free calls per organization per day.
- SandBase is not an official partner of those platforms. Cookie, device-registration, and “open the app to message” routes are out of scope here.
- TikHub, ScrapeCreators, SocialToAI, SocialiQ, Apify, and X-only APIs still win specific jobs. No rank is claimed.
What the best social media data API for AI agents has to return
An agent that listens for a trend or screens a creator needs JSON in the same turn, field names it inspected, a price it saw first, and no OAuth screen from the account it is watching. Dashboards fail the first test. Official analytics fail the last: the token belongs to whoever granted it. A scrape job can pass all four and still miss the window because the run is queued.
“No platform OAuth” means the vendor key is enough for a public read. It does not mean the platform endorsed the vendor, or that every catalog route is a public read.
Three access modes
Pick the mode before the vendor.
| Mode | Setup | In one agent turn | China and global | Choose it when | Walk away when |
|---|---|---|---|---|---|
| Structured JSON catalog | One vendor key. Named endpoints. Schema and price readable first | A completed call returns JSON. Ordinary reads do not need a job id | Depends on the catalog. SandBase’s hubs include all five platforms below | Public monitoring, and an endpoint already covers the field | You must post, DM, or read a field no endpoint lists |
| Scraping / Actors | One Actor or scraper per site. The schema is that Actor’s | Often start, poll, then fetch a dataset | Whatever the Actor store covers, including sites with no catalog row | The page or field is missing from every catalog you trust | You need a known price and a named schema before the first run |
| Official OAuth | A developer app, review, and a token per platform | That platform’s scopes and rate limits. Not a competitor feed | A separate app for each of Douyin, Xiaohongshu, Weibo, TikTok, and X | Posting, DMs, member actions, partner commerce, account-owner analytics | You are reading public posts from accounts that will not install your app |
Structured JSON catalog
SandBase’s data route is POST https://api.sandbase.ai/v1/api/<vendor>/<path>. The body is that endpoint’s parameters. A completed call puts the payload on outputs[0].data. Hub pages are a catalog, not the request URL. Pricing, retrieved 2026-11-08: catalog search and reading a schema or price cost $0. Eligible data APIs share 100 free calls per organization per day, reset at 00:00 UTC. Failed calls are not charged. Models are priced apart from that allowance. Sandboxes were $0 for now, with fair-use caps, and any change is announced first.
TikHub and SocialToAI sell this shape as data vendors. SandBase also bills models and a code sandbox on the same key. That stack is One-Key Agent Stack.
Scraping and Actor runtimes
Apify is a marketplace of ready-to-run tools. Use an Actor when no named endpoint covers the site or the field. The schema belongs to that Actor, and the runtime shows up when the run finishes. The sync-versus-job trade-off is in the Top 5 article.
Official platform OAuth
Use official access when the account owner is your user.
Douyin’s open platform documents an MCP service plaza. The service description, retrieved 2026-11-08, says you log into a Douyin open-platform account, open a mobile or web app, and apply. Official capabilities wait on approval. That page states a five-business-day review and gives the MCP URL https://open.douyin.com/sse. That is an app-review path, not a way to read a public hot list your competitor did not authorize.
The X API introduction is the official pay-per-use API for apps and authenticated actions. TikTok for Developers and Weibo Open are that front door for those platforms. Xiaohongshu posting and partner commerce go through its own review program. This article does not invent a public endpoint list on those sites.
Five platforms buyers actually ask for
Douyin
The Douyin hub read “319 of 319 endpoints”: search, profiles, comments, live rooms, billboards, and Xingtu research. A display name, a numeric user id, and a video URL are not sec_user_id, and a missing count is not zero. The call-level walkthrough is Douyin Data API on SandBase.
SandBase Douyin hub — public search, profiles, comments and related read-only endpoints without Douyin OAuth for public reads.
douyin/app-v3/hot-search-list is the small first read. Its reference, retrieved 2026-11-08, is $0.001 with no required input. Optional board_type and board_sub_type select other boards. An empty body is the hot search list. This article did not run the call.
Do not use web/web-guest-cookie, app-v3/register-device, or app-v3/open-app-to-send-private-message for this job. A public monitor does not need a guest cookie or a private-message deep link.
Xiaohongshu
The Xiaohongshu hub read “67 of 67 endpoints”: hot lists, note search, profiles, comments, product search, product details, recommendations, and creator growth data. Notes and product discussion are why commerce teams ask for this hub instead of a Douyin billboard.
xiaohongshu/app-v2/search-notes is the keyword entry. Its reference, retrieved 2026-11-08, is $0.01 and requires keyword. Later pages pass search_id and search_session_id from the first response. The page describes titles, authors, covers, and engagement counts. Confirm live field names before you score on one. This article did not run it.
The Weibo hub read “63 of 63 endpoints”: hot search, channel trends, profiles, posts, comments, likes, followers, articles, videos, and audio metadata.
weibo/web-v2/hot-search-summary needs no input. Its reference, retrieved 2026-11-08, is $0.0015. The reference’s field table names keyword, rank, tag, is_top, and heat, and its sample leaves heat empty. That is the page’s sample, not a parser this article ran. An empty heat value is missing, not zero.
TikTok
The TikTok hub read “166 of 166 endpoints,” the same number as the catalog card that day. It describes users, videos, sounds, search, comments, followers, hashtags, and profile histories, plus shop-adjacent product search. The walkthrough is TikTok Data API on SandBase.
tiktok/app-v3/general-search-result requires keyword. Its reference, retrieved 2026-11-08, is $0.001, with optional count, offset, publish_time, and sort_type. The example payload is nested. Do not copy a field path from it. Leave web/web-guest-cookie and app-v3/open-app-to-send-private-message out of a public-read agent.
X / Twitter
The Twitter hub read “47 of 47 endpoints,” matching the catalog card: search, timelines, followers, following, lists, and profile metadata. Public reads use the SandBase key, not an X developer app. The walkthrough is Twitter Data API on SandBase.
twitter/web/search-timeline requires keyword. Optional search_type is Top, Latest, Media, People, or Lists (default Top), and cursor comes from the previous page. The reference, retrieved 2026-11-08, is $0.001 and shows the 100-free-call line. The playground example for “AI agents” / Top includes a timeline and a next_cursor. Read a real call from outputs[0].data with .get(). This article did not press Run. twitter/web/user-profile was also $0.001, with optional screen_name or rest_id. Pass the handle the search payload actually returned.
Live X/Twitter search-timeline reference — inspect schema and price before run (public reads without X developer OAuth).
X-only vendors stop here. TwitterAPI.io, retrieved 2026-11-08, is a public X API with a key and up to $1 in free credits, no card. This article did not measure the throughput they advertise. Sorsa is another X-for-agents page. Use either when the agent never leaves X.
China Social Media search is one endpoint, cn-social/search, not a sixth hub. On 2026-11-08 the price was $0.028571 per call, and the page did not show the 100-free-call line. Do not assume the daily allowance covers it.
Where specialists still win
There is no universal best social media data API for AI agents. The split is the job.
| Vendor | What their page said on 2026-11-08 | Still the better fit when |
|---|---|---|
| SandBase | The five hubs above, plus models and a sandbox, on one key. Discover and inspect at $0. Eligible data calls share 100 free per organization per day | The loop needs China and global public reads on the same balance as the model and the sandbox |
| TikHub | Douyin page: videos, profiles, comments, search, billboards, Xingtu. From $0.001/request, no open-platform approval. API reference: 1,000+ endpoints, 16 platforms. One creator example sends a cookie | Their Douyin or Xingtu surface, or you already pay them |
| ScrapeCreators | Homepage: TikTok, Instagram, YouTube, Facebook, X, Reddit, ad libraries, “20+ social platforms.” Douyin, Xiaohongshu, and Weibo were not named | Western social and ad libraries |
| SocialToAI | Docs, updated 2026-11-01: REST and MCP, 18 platforms including Douyin, Xiaohongshu, Weibo, TikTok, and X. Prepaid credits | You already hold their credits. Data API, not a model gateway |
| SocialiQ | 2026 roundup names TikTok, X, Instagram, Reddit, and LinkedIn. It does not name Douyin, Xiaohongshu, or Weibo | A Western social API is the whole requirement |
| Apify | Actor marketplace | No catalog endpoint covers the site or the field |
| TwitterAPI.io / Sorsa | Public X only | The agent never leaves X |
A minimal discover, inspect, run loop
This writing pass had no SandBase key, so the samples are documented shapes, not captured responses. In Claude Code, Cursor, or Codex, do not rebuild three MCP files. Set Up SandBase Skill / MCP is the install. After it, sandbase_discover searches, sandbase_inspect returns schema and price without spending, and sandbase_run executes. Poll with sandbase_run_get. A second sandbase_run bills again. The paste-in line lives in that article, on SKILL.md, and on the AI tools page.
From your own process, call the Model API route, not a catalog GET:
import os
import requests
def call_api(vendor_path: str, payload: dict) -> dict:
response = requests.post(
f"https://api.sandbase.ai/v1/api/{vendor_path}",
headers={
"Authorization": f"Bearer {os.environ['SANDBASE_API_KEY']}",
"Content-Type": "application/json",
},
json=payload,
timeout=90,
)
response.raise_for_status()
body = response.json()
outputs = body.get("outputs") or []
if body.get("status") != "completed" or not outputs or outputs[0].get("data") is None:
raise RuntimeError(
f"SandBase call did not complete: {body.get('status')} {body.get('error')}"
)
return outputs[0]["data"]# Documented 2026-11-08. Not executed in this article.
hot = call_api("douyin/app-v3/hot-search-list", {})
posts = call_api(
"twitter/web/search-timeline",
{"keyword": "AI agents", "search_type": "Latest"},
)If the brief needs deduped rows, the same key opens a sandbox. The homepage demo is “Turn X posts into a research brief.” Sandbox setup stays in the one-key article. A run id is not the payload. If outputs[0].data is missing, the helper raises.
Boundaries
Public and read-only. No posting, follows, likes, or DMs, and no claim of an official partnership. Respect each platform’s terms. Cookie, guest-session, device-registration, and “open app to message” routes are a different product. The docs promise the envelope, not a stable heat field. Re-open the hub before you treat 319 or 47 as fixed.
FAQ
What is the best social media data API for AI agents?
For public JSON in one turn, use a structured catalog. Use an Actor for a missing field, and official OAuth for publishing or account-owner data. Douyin, Xiaohongshu, Weibo, TikTok, and X together match SandBase’s catalog: free inspect, then per-call pricing after the shared daily allowance on eligible data APIs. Confirm the live price. SocialToAI, TikHub, and an X-only API still win the jobs in the table. This is a fit, not a rank.
Can an agent read Douyin or Xiaohongshu without official OAuth?
Yes for many public reads, with the SandBase key rather than the creator’s token. Official open platforms stay the path for posting, member actions, and partner commerce. Payloads are best-effort. Cookie and login tools that operate an account are out of scope.
How does an agent get X data without scraping and without an X developer account?
Use a read-only public X API. twitter/web/search-timeline was $0.001 on 2026-11-08 with the vendor key. TwitterAPI.io is the X-only version of that idea. Keep post and DM on the official X API.
What is free, and what is paid?
Search and inspect are $0. Eligible data APIs share 100 free calls per organization per UTC day, then the endpoint price. The five examples above showed that line on 2026-11-08. cn-social/search did not. Models are separate. Sandboxes were free for now. Failed calls are not charged. There is no subscription. The Start plan is $0 plus starter credits. This article does not invent the credit amount.
When should the agent not use these social APIs?
When you publish or act as a logged-in user, when the field is missing, when another vendor’s MCP is already the product you pay for, when you need a licensed firehose, or when the route is a cookie or an app deep link.
What to do next
Open the hub the brief names, inspect one endpoint, and run one small call only if that page says it is inside the free allowance. If the field is missing, pick an Actor or the official API. Architecture stays in the Top 5 article, the wider list in the market map, Skill setup in the Skill post, and models plus the sandbox in the one-key post.