# 知乎 文章评论区设置 API (zhihu.article_comment_config)

- Canonical page: [https://everyinfra.com/zhihu-api/article_comment_config](https://everyinfra.com/zhihu-api/article_comment_config?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "zhihu", "action": "article_comment_config", "params": {...}}
- Price: $0.000556 per call ($0.56 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=article_comment_config

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | 知乎专栏文章链接（https://zhuanlan.zhihu.com/p/<文章ID>），也可以只填数字文章 ID。知乎对任何文章 ID 都返回同一份评论区设置，不能用它判断文章在不在；文章不存在也照常扣费。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| url | 该记录在原平台上的可访问链接。 |
| can_reply | 能不能评论（article_comment_config）：知乎给没登录的访客看的那一份。 |
| can_segment_reply | 能不能对文章里的一段评论（article_comment_config）。 |
| is_anonymous | 评论框是不是匿名状态（article_comment_config）。 |
| input_placeholder | 评论框里的提示字（article_comment_config）。 |
| picture_max_count | 一条评论最多能带几张图（article_comment_config）。 |
| 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": "article_comment_config",
  "params": {
    "url": "https://zhuanlan.zhihu.com/p/2032860336215307118"
  }
}'
```

```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": "article_comment_config",
        "params": {
            "url": "https://zhuanlan.zhihu.com/p/2032860336215307118",
        },
    },
    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": "article_comment_config",
  "results": {
    "id": "2032860336215307118",
    "url": "https://zhuanlan.zhihu.com/p/2032860336215307118",
    "can_reply": false,
    "can_segment_reply": false,
    "is_anonymous": true,
    "input_placeholder": "未登录用户",
    "picture_max_count": 1,
    "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
