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

Toutiao Post Comments

API 文档
https://api.sandbase.ai/v1/api/toutiao/app/comments

Returns user comments and interaction metrics for a specific Toutiao post. Results can be paginated through comment batches using an offset index.

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

Playground

输入
Post ID, can be obtained from the link
Offset, used for pagination, default is 0, then add 20 each time
输出示例
响应outputs · 11.4 KB · 356 行
[
  {
    "data": {
      "at_user_guide_info": null,
      "ban_audio_comment": true,
      "ban_comment": false,
      "ban_comment_reason": "写评论",
      "ban_comment_toast": "",
      "ban_face": false,
      "ban_gif_suggest": 0,
      "ban_pic_comment": 0,
      "bottom_tips": null,
      "comment_activity": null,
      "comment_classify_detail": null,
      "comment_share_enabled": false,
      "data": [
        {
          "ad": null,
          "cell_type": 1,
          "comment": {
            "aid": 13,
            "auth_verified_info": "",
            "author_act_badge": null,
            "author_badge": [],
            "author_badge_night": [],
            "band_name": "",
            "band_url": "",
            "bury_count": 9,
            "comment_badge": null,
            "comment_badge_night": null,
            "comment_tag_url": "",
            "content_rich_span": "{\"links\":[]}",
            "couplet_sticker": null,
            "create_time": 1735386148,
            "digg_bury_style": 2,
            "digg_count": 557,
            "digg_prompt": {
              "enable": true,
              "reply_box_placeholder": "发评不易,快回复鼓励下TA吧"
            },
            "dislike_style": 0,
            "extra": null,
            "extra_tips": "",
            "forward_count": 0,
            "has_author_digg": 0,
            "has_author_replied": 0,
            "has_multi_media": false,
            "id": 7453426669643630000,
            "id_str": "7453426669643629364",
            "interact_style": 0,
            "is_blocked": 0,
            "is_blocking": 0,
            "is_first_comment": 0,
            "is_followed": 0,
            "is_following": 0,
            "is_loyal_fan": 0,
            "is_pgc_author": 0,
            "is_repost": false,
            "large_image_list": [],
            "log_pb_string": "{\"has_author_replied\":0,\"with_hot_fans\":0}",
            "media_info": {
              "avatar_url": "",
              "name": ""
            },
            "membership_status": 0,
            "multi_media": null,
            "new_reply_list": [],
            "pendants": null,
            "platform": "feifei",
            "publish_loc_info": "安徽",
            "reaction_info": null,
            "remark_name": "",
            "reply_count": 71,
            "reply_list": [],
            "resource_url": "",
            "score": 0,
            "show_tags": 0,
            "source": null,
            "star_comment_info": {
              "has_recommend": false,
              "is_open": false,
              "is_star_comment": false
            },
            "support_react_list": null,
            "tags": null,
            "text": "这是全球首发,不会在有喷子了吧",
            "thumb_image_list": [],
            "user_auth_info": "",
            "user_bury": 0,
            "user_decoration": "",
            "user_digg": 0,
            "user_id": 2123875039058317,
            "user_name": "行云流水",
            "user_profile_image_url": "https://p3-sign.toutiaoimg.com/user-avatar/d5d554f2b46866499828b5ae7c2641f1~300x300.image?_iz=112761&from=tt_user.tab_comments_comment&lk3s=a67912db&x-expires=1791936000&x-signature=M9Gq5vTOntxfimeWHEbUEkgMqWI%3D",
            "user_relation": 0,
            "user_super_digg": 0,
            "user_verified": false,
            "verified_reason": "",
            "vote_info": null,
            "xg_badge_type": 0
          },
          "comment_resource_banner": null,
          "embedded_data": null,
          "forum_card": null,
          "id": 7453426669643630000,
          "pk_forum": null
        },
        {
          "ad": null,
          "cell_type": 1,
          "comment": {
            "aid": 13,
            "auth_verified_info": "",
            "author_act_badge": null,
            "author_badge": [],
            "author_badge_night": [],
            "band_name": "",
            "band_url": "",
            "bury_count": 6,
            "comment_badge": null,
            "comment_badge_night": null,
            "comment_tag_url": "",
            "content_rich_span": "{\"links\":[]}",
            "couplet_sticker": null,
            "create_time": 1735442128,
            "digg_bury_style": 2,
            "digg_count": 418,
            "digg_prompt": {
              "enable": true,
              "reply_box_placeholder": "有共鸣?一起讨论下吧"
            },
            "dislike_style": 0,
            "extra": null,
            "extra_tips": "",
            "forward_count": 0,
            "has_author_digg": 0,
            "has_author_replied": 0,
            "has_multi_media": false,
            "id": 7453667090147313000,
            "id_str": "7453667090147312447",
            "interact_style": 0,
            "is_blocked": 0,
            "is_blocking": 0,
            "is_first_comment": 0,
            "is_followed": 0,
            "is_following": 0,
            "is_loyal_fan": 0,
            "is_pgc_author": 0,
            "is_repost": false,
            "large_image_list": [],
            "log_pb_string": "{\"has_author_replied\":0,\"with_hot_fans\":0}",
            "media_info": {
              "avatar_url": "",
              "name": ""
            },
            "membership_status": 0,
            "multi_media": null,
            "new_reply_list": [],
            "pendants": null,
            "platform": "feifei",
            "publish_loc_info": "山西",
            "reaction_info": null,
            "remark_name": "",
            "reply_count": 22,
            "reply_list": [],
            "resource_url": "",
            "score": 0,
            "show_tags": 0,
            "source": null,
            "star_comment_info": {
              "has_recommend": false,
              "is_open": false,
              "is_star_comment": false
            },
            "support_react_list": null,
            "tags": null,
            "text": "我虽然是一位特别普通的打工仔,一个月工资4000。信用卡欠账一堆。父母都是70岁的农民。我也有很多委屈。可,对于国防,我不会有任何一句抱怨。因为没有一个强大的国防,你连这些都可能失去。",
            "thumb_image_list": [],
            "user_auth_info": "",
            "user_bury": 0,
            "user_decoration": "",
            "user_digg": 0,
            "user_id": 6931721159,
            "user_name": "糟老头子j",
            "user_profile_image_url": "https://p3-sign.toutiaoimg.com/user-avatar/fa45cc75efa17b2622d464050df7d382~300x300.image?_iz=112761&from=tt_user.tab_comments_comment&lk3s=a67912db&x-expires=1791936000&x-signature=HTuidRquj2NGzZyY8M%2FbPoiCIX8%3D",
            "user_relation": 0,
            "user_super_digg": 0,
            "user_verified": false,
            "verified_reason": "",
            "vote_info": null,
            "xg_badge_type": 0
          },
          "comment_resource_banner": null,
          "embedded_data": null,
          "forum_card": null,
          "id": 7453667090147313000,
          "pk_forum": null
        },
        {
          "ad": null,
          "cell_type": 1,
          "comment": {
            "aid": 13,
            "auth_verified_info": "",
            "author_act_badge": null,
            "author_badge": [],
            "author_badge_night": [],
            "band_name": "",
            "band_url": "",
            "bury_count": 0,
            "comment_badge": null,
            "comment_badge_night": null,
            "comment_tag_url": "",
            "content_rich_span": "{\"links\":[]}",
            "couplet_sticker": null,
            "create_time": 1735390776,
            "digg_bury_style": 2,
            "digg_count": 345,
            "digg_prompt": {
              "enable": true,
              "reply_box_placeholder": "有共鸣?一起讨论下吧"
            },
            "dislike_style": 0,
            "extra": null,
            "extra_tips": "",
            "forward_count": 0,
            "has_author_digg": 0,
            "has_author_replied": 0,
            "has_multi_media": false,
            "id": 7453446542591411000,
            "id_str": "7453446542591410980",
            "interact_style": 0,
            "is_blocked": 0,
            "is_blocking": 0,
            "is_first_comment": 0,
            "is_followed": 0,
            "is_following": 0,
            "is_loyal_fan": 0,
            "is_pgc_author": 0,
            "is_repost": false,
            "large_image_list": [],
            "log_pb_string": "{\"has_author_replied\":0,\"with_hot_fans\":0}",
            "media_info": {
              "avatar_url": "",
              "name": ""
            },
            "membership_status": 0,
            "multi_media": null,
            "new_reply_list": [],
            "pendants": null,
            "platform": "feifei",
            "publish_loc_info": "安徽",
            "reaction_info": null,
            "remark_name": "",
            "reply_count": 1,
            "reply_list": [],
            "resource_url": "",
            "score": 0,
            "show_tags": 0,
            "source": null,
            "star_comment_info": {
              "has_recommend": false,
              "is_open": false,
              "is_star_comment": false
            },
            "support_react_list": null,
            "tags": null,
            "text": "向最敬爱的中国军事科学家技术专家致以最崇高的敬礼!你们是最可爱的人!!![赞][赞][赞][赞][赞][赞][玫瑰][玫瑰][玫瑰][玫瑰][玫瑰][玫瑰]",
            "thumb_image_list": [],
            "user_auth_info": "",
            "user_bury": 0,
            "user_decoration": "",
            "user_digg": 0,
            "user_id": 14593625568,
            "user_name": "冬去兮春来",
            "user_profile_image_url": "https://p11-sign.toutiaoimg.com/mosaic-legacy/3e81000d94cec5d46aba~300x300.image?_iz=112761&from=tt_user.tab_comments_comment&lk3s=a67912db&x-expires=1791936000&x-signature=dSuMyE1aLZt27JZbY759Y259BDc%3D",
            "user_relation": 0,
            "user_super_digg": 0,
            "user_verified": false,
            "verified_reason": "",
            "vote_info": null,
            "xg_badge_type": 0
          },
          "comment_resource_banner": null,
          "embedded_data": null,
          "forum_card": null,
          "id": 7453446542591411000,
          "pk_forum": null
        },
        "… 17 more items in the full response"
      ],
      "detail_no_comment": 0,
      "enter_comment_info": {
        "err_no": 0,
        "toast_text": ""
      },
      "err_no": 0,
      "exempt": false,
      "extensions": null,
      "fold_comment_count": 0,

示例

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

API README

Toutiao Post Comments API

Returns a page of comments for a Toutiao post, plus paging data and post-level comment settings. It needs the post's group_id and an offset value.

Use cases

  • Collect the first pages of comments on a Toutiao post to review reader feedback.
  • Track how many bury_count votes each comment on a post receives.
  • Page through all comments of a post by repeating the call until has_more is false.
  • Check whether commenting is turned off on a post using ban_comment.

Request

curl -X POST "https://api.sandbase.ai/v1/api/toutiao/app/comments" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"group_id": "7453372680222523931", "offset": "0"}'

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

Parameters

NameTypeRequiredDescription
group_idstringYesPost ID, can be obtained from the link
offsetstringYesOffset, used for pagination, default is 0, then add 20 each time

Example response

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

{
  "at_user_guide_info": null,
  "ban_ai_polish": true,
  "ban_audio_comment": true,
  "ban_comment": false,
  "ban_comment_reason": "写评论",
  "ban_comment_toast": "",
  "ban_face": false,
  "ban_gif_suggest": 0,
  "ban_pic_comment": 0,
  "bottom_tips": null,
  "comment_activity": null,
  "comment_classify_detail": null
}

Response fields

FieldMeaning
data[]List of comment cells. Each item holds one comment and its id.
data[].idID of the comment cell. It is a long number.
data[].comment.bury_countNumber of bury votes on the comment.
data[].comment.aidApp ID value attached to the comment. The response does not explain its meaning.
data[].cell_typeType code of the list item. Items in this response all have the value 1.
has_moretrue when more comments are available after this page.
offsetOffset value for the next page. The sample response returns 20 after a request with 0.
next_comment_since_tsUnix-style timestamp number returned for the next comment batch.
ban_comment / ban_pic_comment / ban_audio_commentFlags that show whether commenting, picture comments or audio comments are blocked on this post.
group.group_idID of the post the comments belong to.

Notes

  • Take group_id from the Toutiao post link.
  • Start with offset set to 0, then add 20 for each next page, as the parameter description states.
  • Stop paging when has_more is false.
  • To get details about the post itself, call Toutiao Article Details (App).

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价格响应
Toutiao$0.001 每次调用JSON
Toutiao$0.001 每次调用JSON
Toutiao$0.001 每次调用JSON
Toutiao$0.001 每次调用JSON
Toutiao$0.001 每次调用JSON
Toutiao$0.071429 每次调用JSON

问题

常见问题

如何使用 Toutiao Post Comments API?

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

Toutiao Post Comments API 的价格是多少?

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

Toutiao Post Comments API 接受哪些参数?

必填:group_id (string) 和 offset (string)。 Parameters 表和本页的 Playground 列出了每个字段。

Toutiao Post Comments API 返回什么?

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

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

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