# Zhihu Account search API (zhihu.user_search)

- Canonical page: https://everyinfra.com/en/zhihu-api/user_search
- Endpoint: POST /api/v1/social with {"platform": "zhihu", "action": "user_search", "params": {...}}
- Price: $0.000806 per call ($0.81 per 1,000 requests); failed and empty results are not charged
- Returns: list, one page of 20 per call (limit is ignored; pass the top-level next_page_token from the response as page_token for the next page)
- Pagination: pass next_page_token back as page_token for the next page, other params unchanged; one call per page, tokens last 24 hours
- Mode: sync; add "mode": "async" for slow tasks

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | A nickname or keyword to find Zhihu users; each returned `username` works in `profile`, `user_answers` and `user_pins`. |
| page_token | not declared | no | not declared | Page token. Leave it out for the first page, then pass back the previous response's `next_page_token` exactly as received. 20 users per page; each page is one call. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| user_id | User's unique ID on the platform. |
| username | Zhihu profile ID (user_search), the part after zhihu.com/people/; pass it as `url` to profile, user_answers or user_pins. |
| display_name | Display name; can differ from username. |
| url | Link to the record on the platform. |
| bio | Profile bio written by the account; may contain line breaks and emoji. |
| avatar_url | Avatar image link. Some platforms return sized CDN links that can expire. |
| gender | Gender (user_search): male or female; absent when the user does not show it. |
| follower_count | Followers: on hot_list, people following the question; on user_search, the user's followers; on column_search, people following the column. |
| answer_count | Answer count: on profile, the answers the author has written; on hot_list, the answers under the question. |
| article_count | platform-native meaning |
| received_upvote_count | platform-native meaning |
| verification_label | Recognition Zhihu shows for the account (user_search), such as an excellent-answerer badge or an organisation verification; absent when there is none. |
| platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |

## 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": "user_search",
  "params": {
    "keyword": "python"
  }
}'
```

```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": "user_search",
        "params": {
            "keyword": "python",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "zhihu",
  "action": "user_search",
  "results": [
    {
      "user_id": …,
      "username": …,
      "display_name": …,
      "url": …,
      "bio": …,
      "avatar_url": …,
      "gender": …,
      "follower_count": …,
      "answer_count": …,
      "article_count": …,
      "received_upvote_count": …,
      "verification_label": …,
      "platform": …
    }
  ],
  "next_page_token": …,
  "pagination": { … },
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

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