Sand AISand AI MAGI-2MAGI-2 现已上线 SandBase:支持原生音频的 1080p 视频立即试用

Zhihu Answer Comments

API 文档
https://api.sandbase.ai/v1/api/zhihu/web/comment-v5

Get the comments on a Zhihu answer: comment text, author, time, like and reply counts, with sorting and pagination.

价格
$0.001美元 / 次调用
方法
POST
响应
JSON
参数
1 个必填 · 3 个可选

Playground

输入
Answer ID
Number of comments per page
Offset/Page Number
Sort
输出示例
响应outputs · 28.7 KB · 752 行
[
  {
    "data": {
      "ad_plugin_infos": [],
      "atmosphere_voting_config": {
        "daily_frequency": 1,
        "detail": [
          {
            "emoji_level": "dissatisfied",
            "normal_icon": "https://picx.zhimg.com/v2-1d5d094f0cd71f7da08e7e54d037c0b5.png",
            "selected_icon": "https://picx.zhimg.com/v2-9af3c8aa46b63f2f840138b0ee6b0a99.png",
            "title": "不满"
          },
          {
            "emoji_level": "fair",
            "normal_icon": "https://pica.zhimg.com/v2-706985b9364429bc4842b1027a8217ed.png",
            "selected_icon": "https://picx.zhimg.com/v2-1e8b3f0e735d3f2a98d4b43bfe793118.png",
            "title": "一般"
          },
          {
            "emoji_level": "satisfied",
            "normal_icon": "https://pic1.zhimg.com/v2-b376d3b93058da535fbd47a79eb37d14.png",
            "selected_icon": "https://pic1.zhimg.com/v2-626660f8a645e0a9af99e6b2ab7a1d44.png",
            "title": "满意"
          }
        ],
        "frequency_interval": 3,
        "location": 3,
        "min_num_of_root_comment": 10,
        "title": "你对该内容下的评论氛围是否满意?"
      },
      "comment_status": {
        "induce_text": "",
        "text": "",
        "type": 0
      },
      "counts": {
        "collapsed_counts": 0,
        "reviewing_counts": 0,
        "segment_comment_counts": 0,
        "total_counts": 241
      },
      "data": [
        {
          "_": null,
          "author": {
            "avatar_url": "https://pic1.zhimg.com/v2-27bc715d780ecfc2402e01ada9c0e98f_l.jpg?source=06d4cd63",
            "avatar_url_template": "https://pic1.zhimg.com/v2-27bc715d780ecfc2402e01ada9c0e98f_l.jpg?source=06d4cd63",
            "badge_v2": {
              "detail_badges": null,
              "merged_badges": null,
              "title": ""
            },
            "exposed_medal": {
              "avatar_url": "https://pic1.zhimg.com/v2-0cbfd5688630e180e5732c71b9935608_r.jpg?source=06d4cd63",
              "can_click": true,
              "description": "赞同 30 次",
              "medal_avatar_frame": "",
              "medal_id": "972460827463282688",
              "medal_name": "表示赞同",
              "mini_avatar_url": "https://pic1.zhimg.com/v2-0cbfd5688630e180e5732c71b9935608_r.jpg?source=06d4cd63"
            },
            "gender": 1,
            "headline": "",
            "id": "318f3f9198703cf6aff20e05b75ca635",
            "is_advertiser": false,
            "is_anonymous": false,
            "is_org": false,
            "kvip_info": {
              "is_vip": false,
              "target_url": null
            },
            "level_info": null,
            "name": "改个名字也收费",
            "ring_info": null,
            "type": "people",
            "url": "https://www.zhihu.com/api/v4/comment_v5/people/318f3f9198703cf6aff20e05b75ca635",
            "url_token": "ma-nong-yi-mei-76",
            "user_type": "people",
            "vip_info": {
              "is_vip": true,
              "target_url": null,
              "vip_icon": {
                "night_mode_url": "https://picx.zhimg.com/v2-c9686ff064ea3579730756ac6c289978.jpg?source=88ceefae",
                "url": "https://picx.zhimg.com/v2-4812630bc27d642f7cafcd6cdeca3d7a.jpg?source=88ceefae"
              }
            }
          },
          "author_tag": [],
          "can_author_top": false,
          "can_collapse": false,
          "can_delete": false,
          "can_dislike": true,
          "can_hot": false,
          "can_like": true,
          "can_more": true,
          "can_reply": true,
          "can_share": true,
          "can_truncate": false,
          "can_unfold": false,
          "child_comment_count": 60,
          "child_comment_next_offset": "1775451613_11455252749_0",
          "child_comments": [
            {
              "_": null,
              "author": {
                "avatar_url": "https://pic1.zhimg.com/1b215b61f_l.jpg?source=06d4cd63",
                "avatar_url_template": "https://pica.zhimg.com/1b215b61f_l.jpg?source=06d4cd63",
                "badge_v2": {
                  "detail_badges": null,
                  "merged_badges": null,
                  "title": ""
                },
                "exposed_medal": {
                  "avatar_url": "https://picx.zhimg.com/v2-eb56655cce39587eedeacb2824f6a116_r.jpg?source=06d4cd63",
                  "can_click": true,
                  "description": "获得 50 个赞同",
                  "medal_avatar_frame": "",
                  "medal_id": "972475023013875712",
                  "medal_name": "有口皆碑",
                  "mini_avatar_url": "https://picx.zhimg.com/v2-eb56655cce39587eedeacb2824f6a116_r.jpg?source=06d4cd63"
                },
                "gender": 2,
                "headline": "初次见面的感觉",
                "id": "4af6cd69234d800fdc8b3158746931ea",
                "is_advertiser": false,
                "is_anonymous": false,
                "is_org": false,
                "kvip_info": {
                  "is_vip": false,
                  "target_url": null
                },
                "level_info": null,
                "name": "周晨晓",
                "ring_info": null,
                "type": "people",
                "url": "https://www.zhihu.com/api/v4/comment_v5/people/4af6cd69234d800fdc8b3158746931ea",
                "url_token": "zhou-yu-meng-45",
                "user_type": "people",
                "vip_info": {
                  "is_vip": false,
                  "target_url": null
                }
              },
              "author_tag": [],
              "can_author_top": false,
              "can_collapse": false,
              "can_delete": false,
              "can_dislike": true,
              "can_hot": false,
              "can_like": true,
              "can_more": true,
              "can_reply": true,
              "can_share": true,
              "can_truncate": false,
              "can_unfold": false,
              "child_comment_count": 0,
              "child_comment_next_offset": null,
              "collapsed": false,
              "comment_tag": [
                {
                  "color": "#999999",
                  "has_border": false,
                  "night_color": "#999999",
                  "text": "四川",
                  "type": "ip_info"
                }
              ],
              "comment_type": 0,
              "content": "人和人的理解力差距已经很大了,你和爱因斯坦、钱学森比这里面的鸿沟差不多跟跨物种没什么区别。至于你感觉大模型算不算理解,就看你定义智能是什么了。很遗憾按主流的定义,和大众的期望它远远达不到。",
              "content_tag": [],
              "created_time": 1775410085,
              "disclaimer_info": null,
              "dislike_count": 0,
              "disliked": false,
              "hot": false,
              "id": "11455071967",
              "is_author": false,
              "is_author_top": false,
              "is_delete": false,
              "is_gift": false,
              "is_visible_only_to_myself": false,
              "level_tag": 3,
              "like_count": 90,
              "liked": false,
              "member_id": 4728658,
              "reply_author_tag": [],
              "reply_comment_id": "11454716173",
              "reply_root_comment_id": "11454716173",
              "resource_type": "answer",
              "reviewing": false,
              "score": 0,
              "top": false,
              "type": "comment",
              "url": "https://www.zhihu.com/api/v4/comment_v5/comments/11455071967"
            },
            {
              "_": null,
              "author": {
                "avatar_url": "https://picx.zhimg.com/v2-e9a2b85a0e23effcb5c54feb44bcd351_l.jpg?source=06d4cd63",
                "avatar_url_template": "https://picx.zhimg.com/v2-e9a2b85a0e23effcb5c54feb44bcd351_l.jpg?source=06d4cd63",
                "badge_v2": {
                  "detail_badges": null,
                  "merged_badges": null,
                  "title": ""
                },
                "exposed_medal": {
                  "avatar_url": "",
                  "can_click": false,
                  "description": "",
                  "medal_avatar_frame": "",
                  "medal_id": "",
                  "medal_name": ""
                },
                "gender": 2,
                "headline": "",
                "id": "e00d5ae52b341e835bc07681c722f5ec",
                "is_advertiser": false,
                "is_anonymous": false,
                "is_org": false,
                "kvip_info": {
                  "is_vip": false,
                  "target_url": null
                },
                "level_info": null,
                "name": "j10jkol",
                "ring_info": null,
                "type": "people",
                "url": "https://www.zhihu.com/api/v4/comment_v5/people/e00d5ae52b341e835bc07681c722f5ec",
                "url_token": "yin-dan-6-67",
                "user_type": "people",
                "vip_info": {
                  "is_vip": false,
                  "target_url": null
                }
              },
              "author_tag": [],
              "can_author_top": false,
              "can_collapse": false,
              "can_delete": false,
              "can_dislike": true,
              "can_hot": false,
              "can_like": true,
              "can_more": true,
              "can_reply": true,
              "can_share": true,
              "can_truncate": false,
              "can_unfold": false,
              "child_comment_count": 0,
              "child_comment_next_offset": null,
              "collapsed": false,
              "comment_tag": [
                {
                  "color": "#999999",
                  "has_border": false,
                  "night_color": "#999999",
                  "text": "浙江",
                  "type": "ip_info"
                }
              ],
              "comment_type": 0,
              "content": "开始自定义理解了[大笑]",
              "content_tag": [],
              "created_time": 1775451613,
              "disclaimer_info": null,
              "dislike_count": 1,
              "disliked": false,
              "hot": false,
              "id": "11455252749",
              "is_author": false,
              "is_author_top": false,
              "is_delete": false,
              "is_gift": false,
              "is_visible_only_to_myself": false,
              "level_tag": 2,
              "like_count": 42,
              "liked": false,
              "member_id": 16530177,
              "reply_author_tag": [],
              "reply_comment_id": "11454716173",
              "reply_root_comment_id": "11454716173",
              "resource_type": "answer",
              "reviewing": false,
              "score": 0,
              "top": false,
              "type": "comment",
              "url": "https://www.zhihu.com/api/v4/comment_v5/comments/11455252749"
            }
          ],
          "collapsed": false,
          "comment_tag": [
            {
              "color": "#999999",
              "has_border": false,
              "night_color": "#999999",
              "text": "上海",
              "type": "ip_info"
            }
          ],
          "comment_type": 0,

示例

选择一个示例,将其输入和结果加载到 playground 中。

API README

Zhihu Answer Comments API

Returns the top-level comments on a Zhihu answer, each with its text, author, creation time, like and dislike counts, and a few preview replies. It needs an answer_id. Paging and sort order are optional.

Use cases

  • Pull the most liked comments on an answer to see which views the readers agree with.
  • Track how the comment count on an answer changes by reading counts.total_counts over time.
  • Collect comment text with the author's city tag for a study of how opinions differ by region.
  • Find comments with many replies, then fetch their full reply threads.

Request

curl -X POST "https://api.sandbase.ai/v1/api/zhihu/web/comment-v5" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"answer_id": "2023560406912770519"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
answer_idstringYesAnswer ID
limitstringNoNumber of comments per page
offsetstringNoOffset/Page Number
order_bystringNoSort

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "ad_plugin_infos": [],
  "atmosphere_voting_config": {
    "daily_frequency": 1,
    "detail": [
      {
        "emoji_level": "dissatisfied",
        "normal_icon": "https://picx.zhimg.com/v2-1d5d094f0cd71f7da08e7e54d037c0b5.png",
        "selected_icon": "https://picx.zhimg.com/v2-9af3c8aa46b63f2f840138b0ee6b0a99.png",
        "title": "不满"
      }
    ],
    "frequency_interval": 3,
    "location": 3,
    "min_num_of_root_comment": 10,
    "title": "你对该内容下的评论氛围是否满意?"
  },
  "comment_status": {
    "induce_text": "",
    "text": "",
    "type": 0
  },
  "counts": {
    "collapsed_counts": 0,
    "reviewing_counts": 0,
    "segment_comment_counts": 0,
    "total_counts": 269
  },
  "data": [
    {
      "_": null,
      "author": {
        "avatar_url": "https://picx.zhimg.com/v2-27bc715d780ecfc2402e01ada9c0e98f_l.jpg?source=06d4cd63",
        "avatar_url_template": "https://pic1.zhimg.com/v2-27bc715d780ecfc2402e01ada9c0e98f_l.jpg?source=06d4cd63",
        "badge_v2": {
          "detail_badges": null,
          "merged_badges": null,
          "title": ""
        },
        "exposed_medal": {
          "avatar_url": "https://pica.zhimg.com/v2-0cbfd5688630e180e5732c71b9935608_r.jpg?source=06d4cd63",
          "can_click": true,
          "description": "赞同 30 次",
          "medal_avatar_frame": "",
          "medal_id": "972460827463282688",
          "medal_name": "表示赞同",
          "mini_avatar_url": "https://pica.zhimg.com/v2-0cbfd5688630e180e5732c71b9935608_r.jpg?source=06d4cd63"
        },
        "gender": 1,
        "headline": "",
        "id": "318f3f9198703cf6aff20e05b75ca635",
        "is_advertiser": false
      },
      "author_tag": [],
      "can_annotation": false,
      "can_author_top": false,
      "can_collapse": false,
      "can_delete": false,
      "can_dislike": true,
      "can_hot": false,
      "can_like": true,
      "can_more": true,
      "can_reply": true
    }
  ],
  "edit_status": {
    "can_reply": true,
    "toast": "彼此欣赏让讨论更加充实"
  },
  "header": [],
  "is_content_author": false,
  "is_content_rewardable": true,
  "paging": {
    "is_end": false,
    "is_start": true,
    "next": "https://www.zhihu.com/api/v4/comment_v5/answers/2023560406912770519/root_comment…",
    "previous": "https://www.zhihu.com/api/v4/comment_v5/answers/2023560406912770519/root_comment…",
    "totals": 269
  },
  "sorter": [
    {
      "text": "默认",
      "type": "score"
    }
  ]
}

Response fields

FieldMeaning
counts.total_countsTotal number of comments on the answer.
data[].idID of the comment, as a string.
data[].contentComment text. Some comments contain HTML such as <p> and <a> tags.
data[].created_timeTime the comment was created, as a Unix timestamp in seconds.
data[].like_count / dislike_countNumber of likes and dislikes on the comment.
data[].child_comment_countNumber of replies under the comment.
data[].child_comments[]A short preview of replies to the comment. Each item has the same shape as a top-level comment.
data[].child_comment_next_offsetCursor value for the next page of replies to this comment.
data[].author.id / author.headlineID and profile headline of the comment author.
data[].comment_tag[].textTag shown on the comment. Tags with type set to ip_info hold a place name such as 上海.
paging.is_endfalse when more pages of comments are available.

Notes

  • Get the answer_id from a Zhihu answer URL, or from Zhihu Question Answers.
  • Use limit and offset to page through comments. paging.is_end shows whether you have reached the last page.
  • To read all replies under one comment, call Zhihu Sub Comments.

Pricing

$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

探索更多

相关 APIs

全部 APIs
API价格响应
Zhihu$0.001 每次调用JSON
Zhihu$0.005 每次调用JSON
Zhihu$0.001 每次调用JSON
Zhihu$0.001 每次调用JSON
Zhihu$0.001 每次调用JSON
Zhihu$0.001 每次调用JSON

指南:Best Zhihu API in 2026: Pricing Compared

问题

常见问题

如何使用 Zhihu Answer Comments API?

向 https://api.sandbase.ai/v1/api/zhihu/web/comment-v5 发送 POST 请求,在 Authorization 请求头中使用您的 SandBase API key(Bearer),并将参数作为 JSON 请求体传入。您也可以直接在本页的 Playground 中试用,无需编写代码。

Zhihu Answer Comments API 的价格是多少?

每次调用 $0.001,从您的 SandBase 余额中扣费。您只需为实际调用付费;无需订阅。

Zhihu Answer Comments API 接受哪些参数?

必填:answer_id (string)。 可选:limit (string), offset (string) 和 order_by (string)。 Parameters 表和本页的 Playground 列出了每个字段。

Zhihu Answer Comments API 返回什么?

在同一个 HTTP 请求中返回的 JSON 响应(同步)。 本页的 README 包含一个示例响应。

我需要 Zhihu 开发者账户或 API key 吗?

不需要。Zhihu Answer Comments 通过 SandBase 运行,因此一个 SandBase API key 即可覆盖此端点以及目录中的其他所有 API 和模型。您无需单独申请 Zhihu API 访问权限。