Zhihu Search API
API health
- 24h health
- 66%
- 24h average time
- 20.96 s
- Healthy / normal
- Available
- Limited
- Mostly down
Last 24 hours
Last 30 days
Find what Zhihu users write about a topic, up to 100 per call. Results include answers, articles and videos with upvotes, comments, favorites and author credentials. Narrow with content_type, and order with sort by relevance, most upvoted or newest. type tells the kind of each row.
Send POST https://api.everyinfra.com/api/v1/social with platform set to zhihu and action set to search. Price $0.79 per 1,000 requests ($0.000792 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.
Zhihu Search finds answers, articles and videos on Zhihu by keyword and returns each item's type, title, text, upvote, comment and favorite counts, publish time, and the author's nickname, bio, follower count and verification label. Use it to see what people on Zhihu say about a question and whose views carry weight: user research, product reputation studies, topic planning and finding domain experts.
Keep only answers, articles or videos with content_type, and order results with sort (overall, most upvoted or newest). type tells you whether each row is an answer, article or video, which use different link formats, and author_verification_label describes the author's verified credentials, useful for picking expert answers.
AI prompt
#Please help me write a data collection script with the EveryInfra Zhihu Search endpoint (zhihu/search).
How the endpoint works:
- 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 search, and put the parameters inside params.
- Required parameters:
- keyword: The content search term for the Zhihu search action. Do not pass content URLs, author handles, or profile links to this parameter.
- Optional parameters:
- content_type: Filters the content type for the search action. Allowed values are all (default), answer, article, and video. This parameter narrows matching content and does not change the response schema. (allowed: all / answer / article / video)
- sort: Orders search results. Allowed values are general (default), upvote_count_descending for most-upvoted, and time_descending for newest publish. (allowed: general / time_descending / upvote_count_descending)
- 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, type, url, title, text, like_count, comment_count, collect_count, posted_at, cover_image_url (Cover image URL), author_id, author_name; 18 fields in total, full list at https://api.everyinfra.com/api/v1/social/catalog?platform=zhihu.
- Example request body:
{
"platform": "zhihu",
"action": "search",
"params": {
"keyword": "如何学习摄影"
}
}
- Price: $0.79 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 | search | Capability identifier, fixed value. |
keyword | body.params | string | Yes | - | The content search term for the Zhihu search action. Do not pass content URLs, author handles, or profile links to this parameter. |
content_type | body.params | string (enum) | No | - | Filters the content type for the search action. Allowed values are all (default), answer, article, and video. This parameter narrows matching content and does not change the response schema.Allowed valuesallanswerarticlevideo |
sort | body.params | string (enum) | No | - | Orders search results. Allowed values are general (default), upvote_count_descending for most-upvoted, and time_descending for newest publish.Allowed valuesgeneraltime_descendingupvote_count_descending |
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": "search",
"params": {
"keyword": "如何学习摄影"
}
}'OpenAPI definition (JSON)Samples read the key from the EVERYINFRA_API_KEY environment variable; copied code never contains your key.
Response example
#{ "id": "req_…", "platform": "zhihu", "action": "search", "results": [ { "id": "•••", "type": "answer", "url": "https://www.zhihu.com/question/1920106849895679845/answer/2031448129422218730", "title": "新手小白如何系统的学习摄影?", "text": "也最有效。至于课程,先学《摄影基础》,再补《大学摄影基础》或《新闻摄影》,边学边拍,别把自己学成一个只会收藏课程的摄影旁观者", "like_count": 208, "comment_count": 12, "collect_count": 599, "posted_at": "2026-04-25T11:02:56+00:00", "cover_image_url": "https://picx.zhimg.com/80/v2-c4ec584ba597667997b8c2cde7c6616d_qhd.jpg?source=4e949a73", "platform": "zhihu", "author_id": "•••", "author_name": "•••", "author_url": "https://www.zhihu.com/•••", "author_avatar_url": "https://picx.zhimg.com/•••", "author_bio": "•••", "author_follower_count": 1703, "author_verified": true, "author_verification_label": "视觉中国500px总经理、国家地理摄影大赛评委" }, { "id": "•••", "type": "answer", "url": "https://www.zhihu.com/question/36095338/answer/1982462290939880115", "title": "新手如何系统性地学习摄影?", "text": "除非你干婚庆,爱好者不需要“系统性”学习摄影。 第二,提升摄影水平的最好的方式就是去拍那些你能在社交媒体(微信朋友圈/微博/小红书)获得夸奖的图", "like_count": 49, "comment_count": 16, "collect_count": 35, "posted_at": "2025-12-11T06:50:42+00:00", "platform": "zhihu", "author_id": "•••", "author_name": "•••", "author_url": "https://www.zhihu.com/•••", "author_avatar_url": "https://picx.zhimg.com/•••", "author_bio": "•••", "author_follower_count": 259, "author_verified": false, "author_verification_label": "" } ], "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. |
type | Record type; values depend on the capability (for example video / image / text). |
url | Link to the record on the platform. |
title | Title. null when the platform has no titles (for example text-only posts). |
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. |
comment_count | Comments. null means not disclosed, not 0. |
collect_count | Saves or favorites. null means not disclosed, 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. |
cover_image_url | Cover image URL. |
platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |
author_id | Author's unique ID on the platform. |
author_name | Author's display name. |
author_url | Link to the author's profile on the platform. |
author_avatar_url | Author avatar URL; on comment results, the commenter's avatar. |
author_bio | Author bio as written on Zhihu. |
author_follower_count | Author's follower count. null means not disclosed. |
author_verified | Whether the author is verified. |
author_verification_label | Verification description of the author, such as a profession or institution. |
FAQ
#How do I get only the most upvoted answers?
#Set content_type to answer for answers only and sort to upvote_count_descending to rank by upvotes; like_count on each row is the upvote count. Read it next to comment_count to spot answers that drew debate.
Can keyword be a question link?
#No. keyword is a search term, not a content link, an author handle or a profile link. When you already have a link to an answer, article or video, read it with the Zhihu Content detail capability; it does not accept question pages.
How do I find authors whose views carry weight?
#Check author_verified and the credentials in author_verification_label, then weigh author_follower_count and the upvotes on their answers. Authors verified in the topic's field whose answers draw many upvotes are the ones to follow.
Errors and billing
#- 401
- Missing or invalid key.
- 402
- Insufficient balance. Top up first.
- 422
- Invalid parameter name or value. Fix it using the suggestions in the error. No charge.
- 429
- Per-minute request limit reached. Wait for Retry-After, then try again.
- 503
- Could not complete. The held charge is returned to your balance. If the outcome is unknown, verify it before you retry.
- 200 empty
- No data. No charge.
Official references
#Used only to check objects and terms. They do not imply authorization or endorsement of EveryInfra by the platform.
- Zhihu: Rights and Usage Rules for Answers and Articles ↗
The Zhihu agreement distinguishes original user content like answers and articles, requiring separate author authorization for off-site republication; it also restricts automated collection and content usage. Reading content through this API does not constitute receiving platform permission or content usage rights.
Checked 2026-09-04