接口说明

Instagram Search API 按关键词搜索 Instagram 内容,返回搜索结果及对应信息。

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

请求URL

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

请求头

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

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

请求参数

参数必填类型说明
targetYesstring搜索关键词
optionsNoobject仅处理下列开放参数;未列出的字段忽略,内部参数不可覆盖。

options 参数说明

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

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

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

只搜索公开Reels,不支持需要登录的搜索页。

响应值

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

返回参数 data 说明

返回值类型说明
querystring搜索关键词
relatedKeywordsstring[]相关搜索关键词; 续页可能为空
itemsobject[]匿名 reels 搜索结果
paginationobjectPagination

data.items[] 字段说明

返回值类型说明
idstring媒体 id
shortcodestring | nullreel shortcode
typenamestring | null媒体类型
captionstring | null文案
playCountnumber | null播放数
publishedAtobject | null发布时间; 由媒体 pk 推算 (pk >> 23) + 1314220021721, text 为 ISO
displayUristring | null封面
userobjectUser
videoVersionsobject[]视频地址和清晰度
urlstring | nullreel 完整链接

data.items[].publishedAt 字段说明

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

data.items[].user 字段说明

返回值类型说明
pkstring | number | null用户 pk
idstring | null用户 id
usernamestring | null用户名
fullNamestring | null全名
isVerifiedboolean是否认证
isPrivateboolean是否私密
profilePicUrlstring | null头像

data.items[].videoVersions[] 字段说明

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

data.pagination 字段说明

返回值类型说明
cursorstring | null传回 options.cursor; null + hasMore 表示重取首屏, 可能重复
hasMoreboolean是否可续取

请求示例

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

返回示例

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

{
  "code": 0,
  "message": "ok",
  "pointCost": 4.0,
  "data": {
    "query": "landscape",
    "items": [
      {
        "id": "3860769882443121455",
        "shortcode": "DWUNcC6jIMv",
        "typename": "XIGPolarisVideoMedia",
        "caption": "Welcome to the street that everyone forgot. 🏡✨\n⠀\nMost people saw crumbling walls and abandoned facades, but I saw a story worth saving. I’ve spent months res...",
        "playCount": null,
        "publishedAt": {
          "text": "2026-03-25T17:27:36.526Z",
          "value": 1774459656526
        },
        "displayUri": "https://scontent.cdninstagram.com/v/t51.82787-15/656856502_18029422424636389_8421175381176501592_n.jpg?stp=dst-jpg_e35_s640x640_tt6&_nc_cat=105&ccb=7-5&_nc_s...",
        "user": {
          "pk": "49136228388",
          "username": "volos.bushcraft",
          "fullName": null,
          "isVerified": false,
          "isPrivate": false,
          "profilePicUrl": "https://scontent.cdninstagram.com/v/t51.82787-19/642222268_18023317358636389_3739283683078552504_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=103&ig_cache_key=GLyI...",
          "id": "17841449091662028"
        },
        "videoVersions": [
          {
            "type": null,
            "width": null,
            "height": null,
            "url": "https://instagram.fdac7-1.fna.fbcdn.net/o1/v/t2/f2/m86/AQN2nFwXNYapdl5eAzMHhsPu6gnnGPhcR0dcUP_wS_AGLvyQ8xCKkqZhfQUS-LQlCcREy5ngdJoUS3tYSpWoNKrU78hRKzPvcXbj69..."
          }
        ],
        "url": "https://www.instagram.com/reel/DWUNcC6jIMv/"
      }
    ],
    "relatedKeywords": [
      "fjord landscapes of norway"
    ],
    "pagination": {
      "cursor": null,
      "hasMore": true
    }
  },
  "meta": {
    "requestId": "pg-audit-r1-instagram-search-1793954249762353700",
    "durationMs": 7445
  },
  "billing": {
    "unitPrice": 0.8,
    "ruleVersion": "social-primary-v2",
    "billedCount": 5,
    "pointCost": 4.0
  }
}

积点消耗说明

每条主体结果消耗 0.8 积点。

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

在线调试