Toutiao Public Data API | SandBase
Read public Toutiao authors, articles, videos, and comments with one REST API. No Toutiao login, no SDK — one SandBase key, built for agents.

Toutiao (今日头条) is one of China’s largest content-recommendation platforms — a feed of articles, videos, and creator accounts that maps directly onto media monitoring, author research, and content analytics. Reading it programmatically usually means reverse-engineering the app, juggling tokens, and rebuilding a scraper each time the app shifts.
The SandBase Toutiao public data API removes that setup tax. It reads public Toutiao author profiles, articles, videos, and comments through plain REST endpoints — one SandBase API key, no Toutiao login and no SDK. The endpoint API reference is the source of truth for each parameter and for the response envelope (id/status/model/outputs[0].data); the business-payload field names shown below are an illustrative shape, not a guaranteed schema, so confirm them against a live response.
This is not Toutiao’s official open platform. Use Toutiao’s official channels when you need authenticated member actions or a licensed data agreement. Use SandBase when your workflow needs public, read-only data for research and monitoring. Ready to try it? Get a SandBase API key and browse the Toutiao endpoints.
Key takeaway
- One API reads public Toutiao author profiles, articles, videos, and comments.
- The Model API endpoints in this guide are called with
POST /v1/api/toutiao/<path>— pass only that endpoint’s params, no SDK, oneSANDBASE_API_KEY.- Endpoints key off natural identifiers: a
user_idfor an author, or agroup_idfor an article, video, or its comments.- It returns public, read-only data only. There is no posting, no platform login or OAuth on your side, and no private data; authenticate with a SandBase API key.
Which Toutiao API do you need?
| Your need | Choose | Why |
|---|---|---|
| Post, act as a member, or use account-authorized data | Toutiao’s official channels | Member and account operations run through Toutiao directly. |
| Read public authors, articles, videos, or comments | SandBase Toutiao public-data API | Plain REST, one SandBase key, structured JSON for read-only workflows. |
| Private or account-only data | Neither public workflow | That data is out of scope for this public-data guide. |
What you can get from the Toutiao API
The catalog groups by job:
- Authors — a public author profile by
user_id. - Articles — an article’s detail by
group_id. - Videos — a video’s detail by
group_id. - Comments — a content item’s comment thread by
group_id.
Check each endpoint’s live API reference for the exact surface and parameters before you build; availability differs by endpoint.
The Toutiao API page on SandBase — a tagged overview and the endpoint list, each with its path.
What Toutiao provides vs. what SandBase adds
Public data comes from Toutiao. SandBase does not own or operate Toutiao; it provides a uniform API layer for eligible public-data workflows. Each capability becomes one stable endpoint, auth collapses to a single key, and responses come back as predictable JSON — so an agent can chain “read an author → read an article → read its comments” along one convention instead of maintaining a scraper.
Quick start: your first call
SandBase exposes more than one API surface. The catalog may show GET paths under /apis/v1/...; this guide uses the vendor-qualified Model API path on each endpoint’s API reference. Do not swap the HTTP method or URL — follow the reference for the endpoint you choose.
Read an author profile:
import os
import requests
resp = requests.post(
"https://api.sandbase.ai/v1/api/toutiao/app/user-info",
headers={
"Authorization": f"Bearer {os.environ['SANDBASE_API_KEY']}",
"Content-Type": "application/json",
},
json={"user_id": "6457199476"},
)
resp.raise_for_status()
body = resp.json()
if body.get("status") != "completed":
error = body.get("error", {})
raise RuntimeError(error.get("message", "Toutiao request did not complete"))
# The reference guarantees the envelope and the upstream code; business fields vary by endpoint — confirm against a live response.
payload = body["outputs"][0]["data"]
if payload.get("errno") != 0:
raise RuntimeError(payload.get("message", "upstream error"))
author = payload.get("data", {})
print(author.get("name"), author.get("followers_count"), author.get("publish_count"))
curl -X POST https://api.sandbase.ai/v1/api/toutiao/app/user-info \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"user_id": "6457199476"}'
Every response uses the same envelope: an id, a status, the model name, and an outputs array whose single item carries the payload under data. Several Toutiao endpoints wrap their result again in an upstream status field — user-info uses errno (0 means success) with the profile under data.data, while others use err_no. So branch on the SandBase status first, then check the upstream code before reading the inner object, and check each endpoint’s reference for its run mode. The block below is an illustrative response shape — the field names are not a guaranteed schema, so confirm them against a live response, since payloads vary and change over time:
{
"id": "79661704-523a-455e-bd9b-c57be210ca1a",
"status": "completed",
"model": "toutiao/app/user-info",
"outputs": [
{
"data": {
"errno": 0,
"message": "success",
"data": {
"user_id": "…",
"name": "…",
"description": "…",
"followers_count": 0,
"followings_count": 0,
"publish_count": 0,
"digg_count": 0,
"avatar_url": "…"
}
}
}
]
}
A failed or timeout run carries error and never outputs. Response shapes differ by endpoint — inspect one real response and map the exact path per endpoint.
The endpoint API reference is the source of truth for each parameter name and response path.
Capability map
| Capability cluster | Representative endpoint | Typical use |
|---|---|---|
| Author profile | toutiao/app/user-info | Creator research and audience sizing |
| Article detail | toutiao/app/article-info | Content analysis by group_id |
| Video detail | toutiao/app/video-info | Read a video item by group_id |
| Comments | toutiao/app/comments | Engagement and sentiment inputs |
Paging differs by endpoint — the comment endpoint accepts an offset (passed as a string) to walk the thread. Read each endpoint’s schema.
A slice of the Toutiao endpoint list across the app surface.
Chaining calls in an agent workflow
Because every endpoint shares the same auth and the same response envelope, an agent can walk from an author to a comment thread without special-casing each surface. A common media-research pattern looks like this:
- Read the author. Call
toutiao/app/user-infowith auser_idto get name, description, and follower/publish counts. - Read the content. Call
toutiao/app/article-infoortoutiao/app/video-infowith agroup_idfor the item’s detail. - Read the comments. Call
toutiao/app/commentswith the samegroup_idand anoffsetstring for engagement inputs.
Each step returns the same { id, status, model, outputs } shape, so your agent branches on status once, checks the upstream code (errno/err_no), and reuses the same JSON-reading code across every step.
Common use cases
Toutiao author API for creator research
Call toutiao/app/user-info with a user_id to read an author’s profile — name, description, and follower/publish counts. Input: a user_id. Output: a profile object. Endpoint: user-info.
Toutiao article API for content analysis
Read toutiao/app/article-info with a group_id for an article’s detail. Input: a group_id. Output: an article detail object. Endpoint: article-info.
Toutiao comments API for engagement signals
Run toutiao/app/comments with a group_id and an offset string to walk a comment thread. Input: a group_id plus offset. Output: a comment payload. Endpoint: comments.
Why run this at the API layer
You could point a headless browser at Toutiao and parse the app’s payloads, but that path is fragile: the app changes, tokens rotate, and you maintain a scraper instead of shipping features. Reading through one uniform API means your code depends on named JSON fields and a single response envelope rather than an app internal. Auth is one key, and because every endpoint returns the same { id, status, model, outputs } shape, retries, logging, and error handling live in one helper you write once and reuse everywhere.
That uniformity is what makes the workflow composable for an agent. Swap one user_id for another, swap one group_id for the next, and the code path is identical. Add a fourth read — a video’s detail, say — and it slots in behind the same status-checking helper, with the same upstream-code check for errno or err_no. The practical payoff is that your time goes to what the data means for your research, not to keeping a scraper alive against a moving target. When you need more than single reads, check the live listing for the endpoint that fits and confirm its parameters before wiring it in.
Limitations and boundaries
- Public, read-only data only. No posting, following, or private/account-only data.
- Rate and volume. Treat responses as best-effort reads; as a client-side resilience measure, retry with backoff on transient errors such as HTTP 429.
- Parameters and shapes follow the upstream surface. Identifiers vary (
user_id,group_id); the commentoffsetis a string; upstream success codes vary (errnovserr_no). Inspect a real response and read the schema first. - Verify endpoints against the live reference. Availability and fields can change; confirm before building on a specific endpoint.
- This is not an official Toutiao partnership. SandBase provides uniform access to public data; respect Toutiao’s terms and applicable rules for your use case.
FAQ
Do I need a Toutiao developer app or login?
No. You authenticate to SandBase with your SANDBASE_API_KEY. These read endpoints do not require a Toutiao account or OAuth on your side.
What identifies an author or an article?
A user_id identifies an author. A group_id identifies an article, video, or the comment thread on that item.
Why do responses have a code inside data?
Toutiao endpoints wrap their result in an upstream status field — user-info uses errno (0 is success) with the profile under data.data; others use err_no. Check it before reading the inner object.
Can I read private or account-only data? No. The API returns public data only. Private and account-authorized content are out of scope.
Start with an author profile
Create a SandBase API key, call user-info, and inspect the returned schema before you expand to articles, videos, or comments. When you are ready: