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.001JSON
Toutiao每次呼叫 $0.001JSON
Toutiao每次呼叫 $0.001JSON
Toutiao每次呼叫 $0.001JSON
Toutiao每次呼叫 $0.001JSON
Toutiao每次呼叫 $0.071429JSON

問題

常見問題

我要如何使用 Toutiao Post Comments API?

使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/toutiao/app/comments。您也可以直接在本頁的 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 金鑰嗎?

不需要。Toutiao Post Comments 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 Toutiao API 存取權。