Instagram获取帖子详情

最低 ¥0.03/次起即将上线需配置 API Key

通过帖子Shortcode或完整URL获取帖子详细信息

单价随接口累计调用量阶梯调整

POSThttps://redfox.hk/story/api/ins/postDetail

API 密钥获取与配置

获取密钥

调用 API 前,请先在控制台生成 API 密钥并完成配置。在 HTTP 请求头中添加API Key 字段,密钥用于身份校验与额度计费。

获取步骤

  1. 前往控制台页面,进入 API 密钥管理模块。
  2. 若无已生成的密钥,点击生成新密钥,复制并妥善保存密钥。
  3. 在请求头中添加 REDFOX_API_KEY或X-API-KEY字段并填入密钥后即可调用。

API说明

Method:POST

Host:https://redfox.hk

Path:/story/api/ins/postDetail

请求头

名称类型必填说明示例
REDFOX_API_KEYstring是平台鉴权令牌,每次请求必填ak_xxxxxx
Content-Typestring是请求体数据类型application/json

请求参数

参数类型必填说明示例
codeOrUrlString是帖子Shortcode或完整URL(必填) 例:DRhvwVLAHAG 或 https://www.instagram.com/reel/DPi5REKCali/DPi5REKCali

返回值与结构

统一包装一般为 `code`、`message`/`msg`、`data`(以实际服务为准)。

响应字段

字段类型说明示例
codeInteger响应状态码,2000表示成功2000
msgString响应消息成功
dataObject
accessibilityCaptionString无障碍描述文本Allen Iverson Dribbling Style Only He Can Do
canReplyBoolean是否允许评论false
canReshareBoolean是否允许转发true
canSaveBoolean是否允许收藏true
captionHashtagsArray
captionTextString帖子正文(含标签)Allen Iverson "The original Ankle Collector" his handles were a different type of physics. #nba #nbahistory #nbahighlights #nbaplayoffs #nbaseason #alleniverson
commentCountInteger评论数2811
hasAudioBoolean是否包含音频true
imageUrlString封面图URLhttps://scontent-bru2-1.cdninstagram.com/v/t51.82787-15/...
isPaidPartnershipBoolean是否为付费合作内容false
isVideoBoolean是否为视频类型true
likeCountInteger点赞数185729
mediaFormatString媒体格式:video或photovideo
mediaTypeInteger媒体类型编号:1-图片,2-视频,8-轮播2
originalHeightInteger原始高度(像素)1080
originalWidthInteger原始宽度(像素)1080
playCountInteger播放次数2696499
postIdString帖子ID3738802502016543074
productTypeString产品类型:clips-Reels,feed-普通帖子clips
shareCountInteger分享数53874
takenAtInteger发布时间(秒级时间戳)1759920218
takenAtDateString发布时间(ISO 8601格式)2025-10-08T10:43:38+00:00
thumbnailUrlString缩略图URLhttps://scontent-bru2-1.cdninstagram.com/v/t51.82787-15/...
userObject
fullNameString用户全名/显示名NBA Play Talk
idString用户ID60038402519
isPrivateBoolean账号是否为私密false
isVerifiedBoolean是否为认证账号false
profilePicUrlString用户头像URLhttps://scontent-bru2-1.cdninstagram.com/v/t51.2885-19/...
usernameString用户名(唯一标识)nbaplaytalk
videoDurationDouble视频时长(秒),图片类型时为null60.666
videoUrlString视频播放地址,图片类型时为nullhttps://scontent-bru2-1.cdninstagram.com/o1/v/t2/f2/m86/...

请求示例

请求参数:
{
  "codeOrUrl": "DPi5REKCali"
}

响应示例

{
  "code": 2000,
  "data": {
    "accessibilityCaption": "Allen Iverson Dribbling Style Only He Can Do",
    "canReply": false,
    "canReshare": true,
    "canSave": true,
    "captionHashtags": [
      "#nba",
      "#nbahistory",
      "#nbahighlights",
      "#nbaplayoffs",
      "#nbaseason",
      "#alleniverson"
    ],
    "captionText": "Allen Iverson \"The original Ankle Collector\" his\nhandles were a different type of physics.\n\n#nba #nbahistory #nbahighlights #nbaplayoffs\n#nbaseason #alleniverson",
    "code": "DPi5REKCali",
    "commentCount": 2811,
    "hasAudio": true,
    "imageUrl": "https://scontent-bru2-1.cdninstagram.com/v/t51.82787-15/...",
    "isPaidPartnership": false,
    "isVideo": true,
    "likeCount": 185729,
    "mediaFormat": "video",
    "mediaType": 2,
    "originalHeight": 1080,
    "originalWidth": 1080,
    "playCount": 2696499,
    "postId": "3738802502016543074",
    "productType": "clips",
    "shareCount": 53874,
    "takenAt": 1759920218,
    "takenAtDate": "2025-10-08T10:43:38+00:00",
    "thumbnailUrl": "https://scontent-bru2-1.cdninstagram.com/v/t51.82787-15/...",
    "user": {
      "fullName": "NBA Play Talk",
      "id": "60038402519",
      "isPrivate": false,
      "isVerified": false,
      "profilePicUrl": "https://scontent-bru2-1.cdninstagram.com/v/t51.2885-19/...",
      "username": "nbaplaytalk"
    },
    "videoDuration": 60.666,
    "videoUrl": "https://scontent-bru2-1.cdninstagram.com/o1/v/t2/f2/m86/..."
  },
  "msg": "成功"
}

常见状态码说明

调用接口时,响应体中的 code 字段对应以下状态码。完整列表请查看 API 状态码说明页。

状态码说明排查建议
400请求参数错误检查请求体、Query 参数是否与文档一致,必填项是否齐全。
401鉴权失败确认请求头已添加 REDFOX_API_KEY 或 X-API-KEY,且密钥有效、未禁用。
403无权限访问当前密钥或账号无权调用该接口,请检查密钥状态与接口权限。
500系统内部错误服务端异常,请稍后重试;持续出现请联系技术支持。
503服务暂不可用服务维护或短暂过载,请间隔一段时间后重试。
1001缺少必要参数对照「请求参数」表,补全必填字段。
1002参数格式不正确检查字段类型与格式(如 URL、日期、枚举值)是否符合说明。
1003参数类型错误确认 JSON 中数字、字符串、布尔等类型与文档定义一致。
3103密钥不存在密钥可能已删除或填写错误,请前往控制台核对并重新复制。
3105API Key 已禁用在控制台启用该密钥,或创建新密钥后替换请求头中的值。
3201积分不足账户余额不足以支付本次调用,请前往控制台充值后再试。
3202积分账户不存在账号积分账户异常,请登录控制台确认账户状态。
4004操作过于频繁,请稍后再试触发频率限制,降低请求频率或增加调用间隔后重试。