Zhihu Content comments API
API health
- 24h health
- Normal
- 24h average time
- —
- Healthy / normal
- Available
- Limited
- Mostly down
Last 24 hours
Last 30 days
Collect top-level comments on a Zhihu answer, article or video, up to 100 per call, with text, likes, reply count, time and commenter. A non-zero reply_count means replies exist, which comment_replies lists; the thread is not guaranteed to be exhaustive.
Zhihu Content comments reads the discussion under one answer, article or video, given the link to it in url. Every row holds a comment's full text, likes, reply count, publish time and the commenter's name and ID. It shows how readers respond to a piece of content, whether they agree, push back or add corrections, which matters to brand teams watching answers about their products and to researchers studying debate on Zhihu.
Pass the link of the specific piece, such as a zhuanlan.zhihu.com/p/ article link or the address of one answer. A row with a reply_count above zero has replies under it, which the Zhihu Comment replies capability lists. author_id lets you count how often the same people comment across pieces, and a null like_count means Zhihu did not disclose the number, not that nobody liked the comment.
Price $0.56 per 1,000 requests ($0.000556 per call). Failed calls and empty results are not charged. Synchronous. For slow jobs add "mode": "async" to the body, take the job_id and poll.
AI prompt
Paste this into your AI assistant. It already holds this endpoint's parameters, response fields and an example request, so the assistant can ask what you need and then write the scraper.
Please help me write a data collection script with the EveryInfra Zhihu Content comments endpoint (zhihu/content_comments).
Endpoint contract:
- Request: POST https://api.everyinfra.com/api/v1/social with the header Authorization: Bearer <API key>. Read the key from the EVERYINFRA_API_KEY environment variable and never hard-code it.
- In the request body, set platform to zhihu and action to content_comments, and put the parameters inside params.
- Required parameters:
- url: The content URL or profile URL required by content-oriented actions. content_detail and content_comments accept answer, article, or video links (question pages are not supported).
- Optional parameters:
- limit: The most rows to return in this call, an integer from 1 to 100. The default applies when you leave it out, and a call can return fewer rows. Larger values return 422 before any charge. (default: 20)
- Returns a list of records. Main fields of each record: id, text, like_count, posted_at, reply_count, author_id, author_name, author_avatar_url (Author avatar URL).
- Example request body:
{
"platform": "zhihu",
"action": "content_comments",
"params": {
"url": "https://zhuanlan.zhihu.com/p/2032860336215307118"
}
}
- Price: $0.56 per 1,000 requests; failed and empty results are not charged.
- For dozens or hundreds of targets, add "mode": "async" to the body: you get a job_id at once and poll GET https://api.everyinfra.com/api/v1/jobs/{job_id} for the result.
- On 422, fix the request using the suggested parameter names and allowed values in the error; on 429 or 503, wait for Retry-After and try again.
Before writing code, ask me which targets I need, how many, which fields, and what output format I want; then confirm the plan and the rough cost with me.Request parameters
| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
Authorization | header | string | Yes | - | Bearer followed by your API key. Create it in the console; never put it in a URL or a code repository. |
platform | body | string | Yes | zhihu | Platform identifier, fixed value. |
action | body | string | Yes | content_comments | Capability identifier, fixed value. |
url | body.params | Not declared | Yes | - | The content URL or profile URL required by content-oriented actions. content_detail and content_comments accept answer, article, or video links (question pages are not supported); profile and user_articles accept zhihu.com/people/ profile links. |
limit | body.params | integer (1–100) | No | 20 | The most rows to return in this call, an integer from 1 to 100. The default applies when you leave it out, and a call can return fewer rows. Larger values return 422 before any charge. |
Code samples
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
-H "Authorization: Bearer $EVERYINFRA_API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{
"platform": "zhihu",
"action": "content_comments",
"params": {
"url": "https://zhuanlan.zhihu.com/p/2032860336215307118"
}
}'[OpenAPI definition (JSON)]Samples read the key from the EVERYINFRA_API_KEY environment variable; copied code never contains your key.
Response example
Captured September 26, 2026 at 08:56 (UTC) by calling this API with the parameters in the code sample above. results and count are that call's real response with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2. id, billing and quota differ on every call, so only their shape is shown.
{
"id": "req_…",
"platform": "zhihu",
"action": "content_comments",
"results": [
{
"id": "(已隐去)",
"text": "看错了,以为他又发明了一遍python,惊恐地进来一看原来是这样[尴尬]",
"like_count": 22,
"reply_count": 3,
"author_id": "(已隐去)",
"author_name": "(已隐去)",
"author_avatar_url": "https://picx.zhimg.com/(已隐去)",
"platform": "zhihu"
},
{
"id": "(已隐去)",
"text": "很有意思,所以有没有人试试训练数据截断至1900年训练llm,看看能不能独立推出广义相对论[思考]这就是Demis Hassabis的AGI标准",
"like_count": 10,
"reply_count": 3,
"author_id": "(已隐去)",
"author_name": "(已隐去)",
"author_avatar_url": "https://pic1.zhimg.com/(已隐去)",
"platform": "zhihu"
}
],
"count": 20,
"billing": {
"charged": …,
"charged_usd": …,
"balance_after_usd": …,
…
},
"quota": { … }
}Response fields
Business data is in results. The table lists the fields a record can contain; values the platform does not show are never made up.
| Field | Meaning |
|---|---|
id | The record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms. |
text | Body text with HTML removed, returned in full and never cut short (on a few platforms the list results themselves carry only an excerpt; the platform's field notes say so). |
like_count | Likes. null means the platform or this capability does not disclose it; it is not 0. |
posted_at | Publish time in ISO 8601, UTC (for example 2026-08-07T12:34:56+00:00). Non-standard strings from the platform are passed through as is, so parse defensively. null means the platform does not disclose it. |
reply_count | Replies, usually replies to a comment. null means not disclosed. |
author_id | Author's unique ID on the platform. |
author_name | Author's display name. |
author_avatar_url | Author avatar URL; on comment results, the commenter's avatar. |
platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |
FAQ
Can I pass a Zhihu question link?
No. Question pages are not supported. A question gathers many answers, each with its own comment section, so pass the link of each answer you care about, one per call. Zhihu Search, filtered to answers, is one way to collect those answer links for a topic.
How do I read the replies under a comment?
Pick rows where reply_count is greater than zero. Pass the same content link and the row's id to the Zhihu Comment replies capability, which lists the replies to that comment. Threads with many replies are often where an argument or a correction took place, so they are worth expanding first.
In what order do the comments arrive?
Zhihu decides the order, since there is no sorting option here. To rank comments by popularity or time, sort them after the call on like_count or posted_at; the latter is an ISO 8601 timestamp in UTC, so convert it before reading dates in China time.
Errors and billing
- 401
- Missing or invalid key. Authentication runs before parameter checks, so unauthenticated requests never see the parameter schema.
- 422
- Wrong parameter name or value. The error lists the parameters and allowed values this capability accepts and the closest match; it happens before any charge.
- 402
- Insufficient balance. Top up first.
- 429
- The account's per-minute request limit was reached (all of its API keys count together; a key's own lower limit applies first). Wait for Retry-After and try again; a rate package in the console raises the limit.
- 503
- Could not complete right now. Any charge for the call goes back to your balance automatically, and the billing receipt in the response states the actual outcome, including when it is not yet known. Do not resend blindly.
- 200 empty
- The request completed without data and is not charged (billing.reason = empty_result_refunded).