接口说明

Instagram Post API 获取 Instagram 帖子详情及附带的作者、媒体和评论等数据。

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

请求URL

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

请求头

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

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

请求参数

参数必填类型说明
targetYesstring帖子 / reel 链接,也可直接传 shortcode(链接 /p/ 或 /reel/ 后那段)

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

附带评论限一页;需要继续获取评论时调用对应评论接口。

响应值

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

返回参数 data 说明

返回值类型说明
typestringType
可用值: [“post”]
posterobject作者
postobjectPost
commentsobject[]顶层评论
paginationobject评论分页

data.poster 字段说明

返回值类型说明
avatarCanvasstring | null头像 (兼容旧键, 同 avatar)
nicknamestring | null用户名
profileUrlstring | null主页链接
pkstring | number | null用户 id
usernamestring | null用户名
fullNamestring | null全名
avatarstring | null头像
isVerifiedboolean是否认证
isPrivateboolean是否私密账号

data.post 字段说明

返回值类型说明
captionTextstring | null正文
hashtagsstring[]正文话题 (不含 #)
mentionsstring[]正文提及 (不含 @)
videoSrcnull恒为 null (兼容旧键); 视频地址见 videoUrl / videoVersions
publishedAtobject | null发布时间 (text 为 ISO)
likesnumber | null点赞数; 作者隐藏时为 null
commentCountnumber | null评论数
shortcodestring | null帖子 shortcode
pkstring | number | null帖子数字 id
urlstring帖子链接
typenamestring | null上游媒体类型名, 如 XIGPolarisImageMedia
productTypestring | null产品类型: feed / clips (Reels) / carousel_container …
mediaTypenumber | null媒体类型: 1 图片 / 2 视频 / 8 轮播
captionIsEditedboolean正文是否编辑过
captionCreatedAtstring | null正文最后编辑时间 ISO
playsnumber | null播放数 (视频); 匿名常为 null
viewsnumber | null浏览数 (视频); 匿名常为 null
likeAndViewCountsDisabledboolean作者是否隐藏了点赞 / 播放数
commentsDisabledboolean | null帖子是否关闭评论
commentingDisabledForViewerboolean | null匿名访客是否被禁评
widthnumber | null原始宽
heightnumber | null原始高
isPaidPartnershipboolean是否付费合作
accessibilityCaptionstring | null无障碍描述 (平台自动生成)
coverstring | null封面 (第一张图)
videoUrlstring | null视频地址 (最高清晰度); 图片为 null
videoVersionsobject[]视频各清晰度; 图片为空
imageCandidatesobject[]图片各尺寸
carouselobject[]轮播子媒体; 非轮播为空
musicobject | null背景音乐 (引用音乐库时); 没有为 null
originalSoundobject | null原创音轨; 没有为 null
coauthorsobject[]共同作者
locationobject | null地点; 没有为 null

data.post.publishedAt 字段说明

返回值类型说明
textstring | null上游原始时间文本
valuenumber | null解析后的毫秒时间戳; 解析失败为 null

data.post.videoVersions[] 字段说明

返回值类型说明
typenumber | null清晰度类型 (平台枚举)
widthnumber | null宽
heightnumber | null高
urlstringUrl

data.post.imageCandidates[] 字段说明

返回值类型说明
widthnumber | null宽; 匿名接口常为 null
heightnumber | null高
urlstringUrl

data.post.carousel[] 字段说明

返回值类型说明
pkstring | number | null子媒体 id
mediaTypenumber | null1 图片 / 2 视频
widthnumber | null宽
heightnumber | null高
accessibilityCaptionstring | null无障碍描述
videoVersionsobject[]Video versions
imageCandidatesobject[]Image candidates

data.post.music 字段说明

返回值类型说明
audioClusterIdstring | number | null音乐 id
titlestring | null曲名
artiststring | null歌手
coverArtUrlstring | null封面

data.post.originalSound 字段说明

返回值类型说明
audioAssetIdstring | number | null音轨 id
originalAudioTitlestring | null音轨名
consumptionInfoobject | nullConsumption info

data.post.coauthors[] 字段说明

返回值类型说明
pkstring | number | null用户 id
usernamestring | null用户名

data.post.location 字段说明

返回值类型说明
pkstring | number | null地点 id
namestring | null地点名
slugstring | null地点 slug

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-post \
  --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": 0.8,
  "data": {
    "type": "post",
    "poster": {
      "avatarCanvas": "https://scontent-yyz1-1.cdninstagram.com/v/t51.2885-19/457303548_1264782478234846_477750340754769289_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=110&ig_cache_key=...",
      "nickname": "world_record_egg",
      "profileUrl": "https://www.instagram.com/world_record_egg/",
      "pk": "10013772027",
      "username": "world_record_egg",
      "fullName": "Just An Egg 🥚",
      "avatar": "https://scontent-yyz1-1.cdninstagram.com/v/t51.2885-19/457303548_1264782478234846_477750340754769289_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=110&ig_cache_key=...",
      "isVerified": true,
      "isPrivate": false
    },
    "post": {
      "captionText": "Let’s set a world record together and get the most liked post on Instagram. Beating the current world record held by Kylie Jenner (18 million)! We got this 🙌...",
      "hashtags": [
        "LikeTheEgg"
      ],
      "mentions": [],
      "videoSrc": null,
      "publishedAt": {
        "text": "2019-01-04T17:05:45.000Z",
        "value": 1546621545000
      },
      "likes": 60248022,
      "commentCount": 3766092,
      "shortcode": "BsOGulcndj-",
      "pk": "1949525278281554174",
      "url": "https://www.instagram.com/p/BsOGulcndj-/",
      "typename": "XIGPolarisImageMedia",
      "productType": "feed",
      "mediaType": 1,
      "captionIsEdited": true,
      "captionCreatedAt": "2019-01-13T00:22:29.000Z",
      "plays": null,
      "views": null,
      "likeAndViewCountsDisabled": false,
      "commentsDisabled": null,
      "commentingDisabledForViewer": null,
      "width": 584,
      "height": 584,
      "isPaidPartnership": false,
      "accessibilityCaption": "Photo by Just An Egg 🥚 on January 04, 2019.",
      "cover": "https://scontent-yyz1-1.cdninstagram.com/v/t51.82787-15/625727639_18338153224242257_3827527793310630488_n.jpg?stp=dst-jpg_e35_tt6&_nc_cat=104&ig_cache_key=MT...",
      "videoUrl": null,
      "videoVersions": [],
      "imageCandidates": [
        {
          "width": null,
          "height": null,
          "url": "https://scontent-yyz1-1.cdninstagram.com/v/t51.82787-15/625727639_18338153224242257_3827527793310630488_n.jpg?stp=dst-jpg_e35_tt6&_nc_cat=104&ig_cache_key=MT..."
        }
      ],
      "carousel": [],
      "music": null,
      "originalSound": null,
      "coauthors": [],
      "location": null
    },
    "comments": [
      {
        "nativeId": "18040953380849914",
        "avatar": "https://scontent-yyz1-1.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-post-1793954257936298000",
    "durationMs": 5950
  },
  "billing": {
    "unitPrice": 0.8,
    "ruleVersion": "social-primary-v2",
    "billedCount": 1,
    "pointCost": 0.8
  }
}

积点消耗说明

每条帖子、视频或商家主体消耗 0.8 积点,附带评论、回复和作者资料免费。

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

在线调试