接口说明

Instagram Comments API 获取 Instagram 评论数据,支持接口列出的分页、排序或筛选参数。

使用 Pangolinfo API Key 调用,返回结构化 JSON 数据。

请求URL

POST https://scrapeapi.pangolinfo.com/api/v1/social/instagram-comments

请求头

参数名参数值类型说明
Content-Typeapplication/jsonstring数据格式
AuthorizationBearer xxxstring认证凭证

采集最长约75秒,客户端超时建议设为90秒。

请求参数

参数必填类型说明
targetYesstring帖子 / reel 链接,也可直接传 shortcode(链接 /p/ 或 /reel/ 后那段)
optionsNoobject仅处理下列开放参数;未列出的字段忽略,内部参数不可覆盖。

options 参数说明

参数必填类型说明
maxPagesNointeger本次请求翻几页,默认 1,最大 5,按实际返回条数计费,更多数据用返回的游标续取
默认值: 1
最小值: 1
最大值: 5
cursorNostring | null续取评论: 上次输出的 pagination.comments.cursor

仅处理本页列出的请求参数,其他字段忽略。分页游标原样传回,不编码、解码或转换格式。

每次默认1页,最多5页;页数必须为正整数,超过5按5处理。

响应值

返回值类型说明
codeinteger状态码,0 表示成功
messagestring响应信息,成功时为 ok
pointCostnumber本次请求实际消耗的积点
dataobject返回数据,结构见下表
metaobject请求标识及耗时(毫秒)
billingobject计费条数、单价及规则版本

返回参数 data 说明

返回值类型说明
typestringType
可用值: [“comments”]
commentsCountnumber | null评论总数
commentsobject[]评论, 与 instagram-post 同形
paginationobject评论分页

data.comments[] 字段说明

返回值类型说明
nativeIdstring评论 id
avatarstring | null评论者头像
nicknamestring | null评论者用户名
timestring | null评论时间 ISO
contentstring | null评论内容
profileUrlstring | null评论者主页
pkstring | number | null评论 id
usernamestring | null评论者用户名
userPkstring | number | null评论者 id
isVerifiedboolean评论者是否认证
isUnpublishedboolean评论者账号是否已删除 / 隐藏
likesnumber | null点赞数
parentCommentIdstring | number | null父评论 id; 顶层评论为 null
childCommentCountnumber | null回复数; 匿名接口常为 null
hasTranslationboolean是否可自动翻译
restrictedStatusnumber | null受限状态码 (抑制 / 警告); 不受限为 null
isCoveredboolean是否被折叠的敏感评论

data.pagination 字段说明

返回值类型说明
commentsobjectComments

data.pagination.comments 字段说明

返回值类型说明
cursorstring | null下一页游标, 传回 options.cursor 续取; null + hasMore 表示从头取
hasMoreboolean是否还有更多

请求示例

curl --request POST \
  --url https://scrapeapi.pangolinfo.com/api/v1/social/instagram-comments \
  --header 'Authorization: Bearer YOUR_PANGOLINFO_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "target": "https://www.instagram.com/p/BsOGulcndj-/"
}'

返回示例

下例截取实际响应中的首条列表记录,长文本与链接作了缩写;pointCost 为该次完整响应的实际费用。完整字段结构可在在线调试页查看。

{
  "code": 0,
  "message": "ok",
  "pointCost": 6.4,
  "data": {
    "type": "comments",
    "commentsCount": 3766092,
    "comments": [
      {
        "nativeId": "18040953380849914",
        "avatar": "https://scontent-atl3-2.cdninstagram.com/v/t51.82787-19/840333085_18642090745021526_6115295017589438883_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=111&ig_cache_k...",
        "nickname": "johan_s.v_",
        "time": "2026-11-06T06:10:42.000Z",
        "content": "Follow me",
        "profileUrl": "https://www.instagram.com/johan_s.v_/",
        "pk": "18040953380849914",
        "username": "johan_s.v_",
        "userPk": "1913621525",
        "isVerified": false,
        "isUnpublished": false,
        "likes": 1,
        "parentCommentId": null,
        "childCommentCount": null,
        "hasTranslation": false,
        "restrictedStatus": null,
        "isCovered": false
      }
    ],
    "pagination": {
      "comments": {
        "cursor": null,
        "hasMore": true
      }
    }
  },
  "meta": {
    "requestId": "pg-audit-r1-instagram-comments-1793954269885309400",
    "durationMs": 5239
  },
  "billing": {
    "unitPrice": 0.8,
    "ruleVersion": "social-primary-v2",
    "billedCount": 8,
    "pointCost": 6.4
  }
}

积点消耗说明

每条一级评论消耗 0.8 积点,附带回复免费。支持独立回复模式的接口按返回的直接回复条数计费,每条0.8积点,回复附带的下一层免费。

空结果、失败响应不扣费。同一响应中相同 ID 只计一次,独立调用和续页分别计费。详见 社媒评论 API 计费说明。

在线调试