# Zhihu Search API (zhihu.search)

- Canonical page: https://everyinfra.com/en/zhihu-api/search
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "zhihu", "action": "search", "params": {...}}
- Price: $0.000792 per call ($0.79 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, default 20, max 100 per call
- Mode: sync; add "mode": "async" for slow tasks

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.

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=zhihu&action=search

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | The content search term for the Zhihu search action. Do not pass content URLs, author handles, or profile links to this parameter. |
| content_type | enum: all / answer / article / video | no | not declared | 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. |
| sort | enum: general / time_descending / upvote_count_descending | no | not declared | Orders search results. Allowed values are general (default), upvote_count_descending for most-upvoted, and time_descending for newest publish. |
| limit | 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. |

## Response fields (items in `results`)

| 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. |

## Example

```bash
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": "如何学习摄影"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "zhihu",
        "action": "search",
        "params": {
            "keyword": "如何学习摄影",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-09-26T08:56:04Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2 of 20. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "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": { … }
}
```

## 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.

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=zhihu
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
