# 知乎 问题详情 API (zhihu.question_detail)

- Canonical page: [https://everyinfra.com/zhihu-api/question_detail](https://everyinfra.com/zhihu-api/question_detail?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "zhihu", "action": "question_detail", "params": {...}}
- Price: $0.000792 per call ($0.79 per 1,000 requests); failed calls and empty results are not charged
- Returns: single object
- 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=question_detail

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | 知乎问题链接（https://www.zhihu.com/question/<问题ID>），也可以是这个问题下的回答链接或纯数字问题 ID。认不出的链接返回 422，问题不存在返回 503，都不扣费。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| type | 内容类型（answer 回答 / article 文章 / video 视频；hot_list 上是 question 问题；user_pins 是 pin 想法；column_search 是 column 专栏；salt_search 是盐选商品类型，如 paid_column_chapter 付费专栏的一篇；scholar_search 是 paper 论文；ebook_search 是 publication 整本书 / publication_chapter 书里的一章；question_detail 是 question 问题；pin_detail 是 pin 想法；column_articles 是 article 文章 / answer 回答 / pin 想法 / video 视频；related_articles 是 article 文章；article_relationship 是那一行提示的种类，如 reaction_endorse 赞同）。 |
| url | 该记录在原平台上的可访问链接。 |
| title | 标题。平台无标题概念时（如纯文本帖）为 null。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| topics | 问题所属的话题名（question_detail），按知乎给的顺序。 |
| answer_count | 回答数：profile、user_search 是这个账号写过的回答总数；hot_list、question_detail 是这个问题下的回答数。 |
| follower_count | 关注人数：hot_list、question_detail 是关注这个问题的人数；user_search 是账号粉丝数；column_search 是关注这个专栏的人数；topic_search 是关注这个话题的人数。 |
| visit_count | 浏览量：topic_search 是话题的浏览量，question_detail 是问题的浏览量。 |
| comment_count | 评论数。null 表示不公开，不等于 0。 |
| like_count | 点赞数。null 表示该平台或该接口不公开此数据，不等于 0。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| updated_at | 回答最后编辑时间（question_answers、user_answers），ISO 8601、UTC；没改过时和 posted_at 相同。 |
| author_id | 作者在原平台的唯一 ID。 |
| author_name | 作者昵称（显示名）。 |
| author_url | 作者主页链接。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 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": "question_detail",
  "params": {
    "url": "https://www.zhihu.com/question/265808959"
  }
}'
```

```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": "question_detail",
        "params": {
            "url": "https://www.zhihu.com/question/265808959",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-11-21T07:25:12Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "zhihu",
  "action": "question_detail",
  "results": {
    "id": "265808959",
    "type": "question",
    "url": "https://www.zhihu.com/question/265808959",
    "title": "为什么网上Python爬虫教程这么多，但是做爬虫的这么少呢？爬虫发展又该是如何呢？",
    "text": "很多人学习Python进阶可能都写过几个爬虫，但是最终做爬虫的人却比较少呢？是因为真的像别人说的那样，爬虫真的没“技术含量”，还是爬虫随着反爬的不断提升，做爬虫的代价越来越高难以维持成本？还希望能谈一谈爬虫的发展该是怎样的？可能做到双赢吗？请指教",
    "topics": [
      "Python",
      "爬虫 (计算机网络)",
      "Python 入门"
    ],
    "answer_count": 291,
    "follower_count": 2895,
    "visit_count": 1995333,
    "comment_count": 10,
    "like_count": 151,
    "posted_at": "2018-01-18T15:44:12+00:00",
    "updated_at": "2018-01-19T02:34:45+00:00",
    "author_id": "•••",
    "author_name": "苏•••",
    "author_url": "https://www.zhihu.com/•••",
    "platform": "zhihu"
  },
  "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
