Sand AISand AI MAGI-2MAGI-2 現已登上 SandBase:支援原生音訊的 1080p 影片立即試用

Instagram Post Comments (V3)

API 文件
https://api.sandbase.ai/v1/api/instagram/v3/post-comments

Returns a list of comments for an Instagram post specified by its shortcode. Supports pagination and ordering by popular or newest comments.

價格
$0.008美元/次呼叫
方法
POST
回應
JSON
參數
1 個必填 · 2 個選填

Playground

輸入
Post shortcode (e.g., DUajw4YkorV, required)
Pagination cursor, omit for first request, get from previous response `data.next_min_id`
Sort order
輸出範例
回應outputs · 10.2 KB · 243 行
[
  {
    "data": {
      "_rid": "11a4b5642b474",
      "ai_topic_filters": [],
      "can_view_more_preview_comments": false,
      "caption": {
        "bit_flags": 0,
        "content_type": "comment",
        "created_at": 1770377722,
        "created_at_for_fb_app": 1770377722,
        "created_at_utc": 1770377722,
        "did_report_as_spam": false,
        "is_covered": false,
        "is_created_by_media_owner": true,
        "is_ranked_comment": true,
        "media_id": "3826528124109228757",
        "pk": "18066362081641928",
        "private_reply_status": 0,
        "share_enabled": true,
        "status": "Active",
        "strong_id__": "18066362081641928",
        "text": "breeze breeze breeze 🌀🌀🌀",
        "type": 1,
        "user": {
          "fbid_v2": "17841464450204076",
          "full_name": "Gigi",
          "id": "64352612340",
          "is_private": false,
          "is_unpublished": false,
          "is_verified": false,
          "pk": "64352612340",
          "pk_id": "64352612340",
          "profile_pic_id": "3946880307500807853_64352612340",
          "profile_pic_url": "https://instagram.flas1-2.fna.fbcdn.net/v/t51.82787-19/754250350_17963106291148341_7483633330144180762_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=102&_nc_map=urlgen_bucketless&ccb=7-5&_nc_sid=f7ccc5&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLnd3dy42NTkuQzMifQ%3D%3D&_nc_ohc=J6aAV0S8ML8Q7kNvwFrs-ti&_nc_oc=Adpm3yfygp2Gcjq2O1h35n-LQ7tgPi1IudtE1WsulkHufWBjACXSs0UCPcQfKADbqvM&_nc_zt=24&_nc_ht=instagram.flas1-2.fna&_nc_gid=nQJf45D2JYiEKHycO4yC6A&_nc_ss=72aaf&oh=00_AQNtSTBFot8U_ELGPpqCanYAoDVyplLE0kN4j2nNMOhOtQ&oe=6ACAC23F",
          "strong_id__": "64352612340",
          "username": "hiyroze"
        },
        "user_id": "64352612340"
      },
      "caption_is_edited": false,
      "comment_count": 49,
      "comment_cover_pos": "bottom",
      "comment_filter_param": "no_filter",
      "comment_likes_enabled": true,
      "comments": [
        {
          "bit_flags": 0,
          "child_comment_count": 0,
          "comment_index": 0,
          "comment_like_count": 1,
          "content_type": "comment",
          "created_at": 1770465430,
          "created_at_for_fb_app": 1770465430,
          "created_at_utc": 1770465430,
          "did_report_as_spam": false,
          "has_disliked_comment": false,
          "has_liked_comment": false,
          "inline_composer_display_condition": "never",
          "is_covered": false,
          "is_edited": false,
          "is_photo_comments_enabled_for_comment_author": false,
          "is_ranked_comment": true,
          "is_text_editable": false,
          "keywords_data": [],
          "liked_by_media_coauthors": [],
          "media_id": "3826528124109228757",
          "meta_ai_comment_type": "NONE",
          "other_preview_users": [],
          "pk": "18020751824801830",
          "preview_child_comments": [],
          "private_reply_status": 0,
          "share_enabled": true,
          "status": "Active",
          "strong_id__": "18020751824801830",
          "text": "So incredibly beautiful ❤️",
          "type": 0,
          "user": {
            "aigm_account_label_info": {
              "is_auto_detected": false,
              "is_enabled": false,
              "is_manually_enabled": false
            },
            "fbid_v2": "17841478113898658",
            "full_name": "jim blaze",
            "id": "78149267796",
            "is_mentionable": true,
            "is_private": false,
            "is_verified": false,
            "latest_reel_media": 0,
            "pk": "78149267796",
            "pk_id": "78149267796",
            "profile_pic_id": "3764395301835210036_78149267796",
            "profile_pic_url": "https://instagram.flas1-1.fna.fbcdn.net/v/t51.82787-19/581679422_17846129121603797_59515419485813003_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=106&_nc_map=urlgen_bucketless&ccb=7-5&_nc_sid=f7ccc5&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLnd3dy45NjAuQzMifQ%3D%3D&_nc_ohc=vMKlccx1yKYQ7kNvwErgi-r&_nc_oc=AdrWUHXE6atAPVw91PFUMGvB2H-vUOey6ra6TOIfypQi_QnG3MCYPzsZxhctLkCAd5g&_nc_zt=24&_nc_ht=instagram.flas1-1.fna&_nc_gid=nQJf45D2JYiEKHycO4yC6A&_nc_ss=72aaf&oh=00_AQOghZUzmqiSBX4-b6_jjzIpzMguhLEv__hiVxBewjnijQ&oe=6ACACEA1",
            "qe_use_smaller_comment_like_tap_target": false,
            "strong_id__": "78149267796",
            "username": "sockmonkey79"
          },
          "user_id": "78149267796"
        },
        {
          "bit_flags": 0,
          "child_comment_count": 0,
          "comment_index": 1,
          "comment_like_count": 2,
          "content_type": "comment",
          "created_at": 1770378260,
          "created_at_for_fb_app": 1770378260,
          "created_at_utc": 1770378260,
          "did_report_as_spam": false,
          "has_disliked_comment": false,
          "has_liked_comment": false,
          "inline_composer_display_condition": "never",
          "is_covered": false,
          "is_edited": false,
          "is_photo_comments_enabled_for_comment_author": false,
          "is_ranked_comment": true,
          "is_text_editable": false,
          "keywords_data": [],
          "liked_by_media_coauthors": [],
          "media_id": "3826528124109228757",
          "meta_ai_comment_type": "NONE",
          "other_preview_users": [],
          "pk": "17970092114852855",
          "preview_child_comments": [],
          "private_reply_status": 0,
          "share_enabled": true,
          "status": "Active",
          "strong_id__": "17970092114852855",
          "text": "luvvvvvvv🖤🖤🖤",
          "type": 0,
          "user": {
            "aigm_account_label_info": {
              "is_auto_detected": false,
              "is_enabled": false,
              "is_manually_enabled": false
            },
            "fbid_v2": "17841403408954840",
            "full_name": "Lingga S. P.",
            "id": "3558721631",
            "is_mentionable": true,
            "is_private": false,
            "is_verified": false,
            "latest_reel_media": 1791258994,
            "pk": "3558721631",
            "pk_id": "3558721631",
            "profile_pic_id": "3955241250307294885_3558721631",
            "profile_pic_url": "https://instagram.flas1-2.fna.fbcdn.net/v/t51.82787-19/762008208_18466154488113632_2591129171500260587_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=101&_nc_map=urlgen_bucketless&ccb=7-5&_nc_sid=f7ccc5&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLnd3dy4xMDgwLkMzIn0%3D&_nc_ohc=efdE1myYa4cQ7kNvwGsIzib&_nc_oc=AdrJGFzLYZ-Jm_orHk_AJJ0YzgdufVbuwcDqCwqlYNUr6cZDr1x7nS0oUiU9UlI_Abs&_nc_zt=24&_nc_ht=instagram.flas1-2.fna&_nc_gid=nQJf45D2JYiEKHycO4yC6A&_nc_ss=72aaf&oh=00_AQOOB3nSNgE7HR_wc8dJ9G5MyOp_8e-JEFgNXiCBaDx1Og&oe=6ACAADEE",
            "qe_use_smaller_comment_like_tap_target": false,
            "strong_id__": "3558721631",
            "username": "xxggaandwx"
          },
          "user_id": "3558721631"
        },
        {
          "bit_flags": 0,
          "child_comment_count": 0,
          "comment_index": 2,
          "comment_like_count": 1,
          "content_type": "comment",
          "created_at": 1770764573,
          "created_at_for_fb_app": 1770764573,
          "created_at_utc": 1770764573,
          "did_report_as_spam": false,
          "has_disliked_comment": false,
          "has_liked_comment": false,
          "inline_composer_display_condition": "never",
          "is_covered": false,
          "is_edited": false,
          "is_photo_comments_enabled_for_comment_author": false,
          "is_ranked_comment": true,
          "is_text_editable": false,
          "keywords_data": [],
          "liked_by_media_coauthors": [],
          "media_id": "3826528124109228757",
          "meta_ai_comment_type": "NONE",
          "other_preview_users": [],
          "pk": "18068278451216170",
          "preview_child_comments": [],
          "private_reply_status": 0,
          "share_enabled": true,
          "status": "Active",
          "strong_id__": "18068278451216170",
          "text": "👍👏🔥",
          "type": 0,
          "user": {
            "aigm_account_label_info": {
              "is_auto_detected": false,
              "is_enabled": false,
              "is_manually_enabled": false
            },
            "fbid_v2": "17841439968891557",
            "full_name": "Mike Lee",
            "id": "39932460296",
            "is_mentionable": false,
            "is_private": true,
            "is_verified": false,
            "pk": "39932460296",
            "pk_id": "39932460296",
            "profile_pic_id": "3650160973446687441_39932460296",
            "profile_pic_url": "https://instagram.flas1-2.fna.fbcdn.net/v/t51.75761-19/504825050_18060105917332297_2887372760428814514_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=110&_nc_map=urlgen_bucketless&ccb=7-5&_nc_sid=f7ccc5&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLnd3dy4zMjAuQzMifQ%3D%3D&_nc_ohc=zReJR-l2rAMQ7kNvwHKwPxl&_nc_oc=AdoiRASj_CS6CQt5f4PYAYkevj30uRORCO5zKb7fgC93CR2lqSMTbAR7C8vzoH5DIGY&_nc_zt=24&_nc_ht=instagram.flas1-2.fna&_nc_gid=nQJf45D2JYiEKHycO4yC6A&_nc_ss=72aaf&oh=00_AQPCRQPbxKD-icQW4Wwa9vSX5lhLQo1zVwxjROgCHDalwQ&oe=6ACACEC9",
            "qe_use_smaller_comment_like_tap_target": false,
            "strong_id__": "39932460296",
            "username": "mike_lee_520"
          },
          "user_id": "39932460296"
        },
        "… 4 more items in the full response"
      ],
      "fb_comments": [],
      "filter_options": [],
      "foundation_improvements_enabled": true,
      "geoblocked_comment_notices": [],
      "has_more_comments": false,
      "has_more_headload_comments": true,
      "has_more_headload_fb_comments": false,
      "initiate_at_top": true,
      "insert_new_comment_to_top": true,
      "is_ranked": true,
      "liked_by_media_owner_badge_enabled": true,
      "media_header_display": "none",
      "next_min_id": "{\"bifilter_token\":\"GgYYOQAmUBo_xwVAAPc7Fh201z8AKp_J5gAxQADYtzWLt3M_AFJhccgiYEAAPHuwjcTIPwAQ8PpdkDRAAAA=\"}",
      "quick_response_emojis": [
        {
          "unicode": "❤️"
        },
        {
          "unicode": "🙌"
        },
        {
          "unicode": "🔥"
        },
        "… 5 more items in the full response"
      ],
      "scroll_behavior": 1,
      "should_render_upsell": false,
      "sort_options": [],
      "sort_order": "popular",
      "status": "ok",
      "threading_enabled": true
    }
  }
]

範例

選擇一個範例,將其輸入與結果載入 playground。

API README

Instagram Post Comments (V3) API

Returns a list of comments for one Instagram post, plus the post caption and a pagination cursor. It needs the post shortcode in code, and you can order results by popular or newest with sort_order.

Use cases

  • Read the top comments on a post to see how viewers react to it.
  • Export comment text, authors and like counts for a community or brand report.
  • Page through every comment on a post to build a full discussion archive.
  • Check whether the post owner pinned or wrote a caption comment and how many comments the post has.

Request

curl -X POST "https://api.sandbase.ai/v1/api/instagram/v3/post-comments" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"code": "DUajw4YkorV"}'

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

Parameters

NameTypeRequiredDescription
codestringYesPost shortcode (e.g., DUajw4YkorV, required)
min_idstringNoPagination cursor, omit for first request, get from previous response data.next_min_id
sort_orderstringNoSort order

Example response

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

{
  "_rid": "1ce8f516db888",
  "ai_topic_filters": [],
  "can_view_more_preview_comments": false,
  "caption": {
    "bit_flags": 0,
    "content_type": "comment",
    "created_at": 1770377722,
    "created_at_for_fb_app": 1770377722,
    "created_at_utc": 1770377722,
    "did_report_as_spam": false,
    "is_covered": false,
    "is_created_by_media_owner": true,
    "is_ranked_comment": true,
    "media_id": "3826528124109228757",
    "pk": "18066362081641928",
    "private_reply_status": 0
  },
  "caption_is_edited": false,
  "comment_count": 49,
  "comment_cover_pos": "bottom",
  "comment_filter_param": "no_filter",
  "comment_likes_enabled": true,
  "comments": [
    {
      "bit_flags": 0,
      "child_comment_count": 0,
      "comment_index": 0,
      "comment_like_count": 0,
      "content_type": "comment",
      "created_at": 1786498491,
      "created_at_for_fb_app": 1786498491,
      "created_at_utc": 1786498491,
      "did_report_as_spam": false,
      "has_disliked_comment": false,
      "has_liked_comment": false,
      "inline_composer_display_condition": "never"
    }
  ],
  "fb_comments": [],
  "filter_options": []
}

Response fields

FieldMeaning
comments[]List of comments on the post. Each item is one top-level comment.
comments[].textThe text of the comment.
comments[].pkID of the comment. Use it to identify a single comment.
comments[].comment_like_count / comments[].child_comment_countNumber of likes on the comment and number of replies under it.
comments[].created_at_utcTime the comment was posted, as a Unix timestamp in seconds.
comments[].user.username / comments[].user.full_name / comments[].user_idThe comment author's handle, display name and numeric account ID.
comments[].user.is_private / comments[].user.is_verifiedWhether the comment author's account is private and whether it is verified.
comment_countTotal number of comments reported for the post.
caption.textThe post caption, returned as a comment object written by the post owner.
next_min_idCursor for the next page. Send it as min_id in the next request.
has_more_headload_commentstrue when more comments are available beyond this page.

Notes

  • Get the shortcode from a post URL, or use Instagram Shortcode Extractor to pull it out of a link.
  • For the next page, pass the next_min_id value from the previous response as min_id. Leave min_id out on the first request.
  • sort_order accepts popular (default) or newest.
  • To read replies under a comment, call Instagram Comment Replies (V3).

Pricing

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

探索更多

相關 APIs

所有 APIs
API價格回應
Instagram每次呼叫 $0.008JSON
Instagram每次呼叫 $0.008JSON
Instagram每次呼叫 $0.008JSON
Instagram每次呼叫 $0.008JSON
Instagram每次呼叫 $0.002JSON
Instagram每次呼叫 $0.008JSON

指南:Instagram API cost: official limits and per-call pricesBest Instagram API in 2026: Pricing Compared

問題

常見問題

我要如何使用 Instagram Post Comments (V3) API?

使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/instagram/v3/post-comments。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。

Instagram Post Comments (V3) API 的費用是多少?

每次 $0.008,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。

Instagram Post Comments (V3) API 接受哪些參數?

必要:code (string)。 選填:min_id (string) 和 sort_order(popular, newest 之一)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。

Instagram Post Comments (V3) API 會回傳什麼?

在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。

我需要 Instagram 開發者帳號或 API 金鑰嗎?

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