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.001USD / вызов
Метод
POST
Ответ
JSON
Параметры
1 обязательных · 3 необязательных

Песочница

Ввод
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.

README по API

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

Вопросы

FAQ

Как использовать API Zhihu Answer Comments?

Отправьте POST-запрос на https://api.sandbase.ai/v1/api/zhihu/web/comment-v5, указав ключ SandBase API в заголовке Authorization (Bearer), а параметры — в теле JSON. Вы также можете попробовать это в Playground на этой странице без написания кода.

Сколько стоит API Zhihu Answer Comments?

$0.001 за вызов, списывается с баланса SandBase. Оплата взимается только за сделанные вызовы; подписка не требуется.

Какие параметры принимает API Zhihu Answer Comments?

Обязательные: answer_id (string). Необязательные: limit (string), offset (string) и order_by (string). В таблице Parameters и в Playground на этой странице перечислены все поля.

Что возвращает API Zhihu Answer Comments?

JSON-ответ, возвращаемый в том же HTTP-запросе (синхронно). В README на этой странице приведен пример ответа.

Нужен ли мне аккаунт разработчика Zhihu или API key?

Нет. Zhihu Answer Comments работает через SandBase, поэтому один API key SandBase покрывает этот endpoint и все остальные API и модели в каталоге. Вам не нужно отдельно запрашивать доступ к API Zhihu.