登录
使用 JS token

Instagram scrapers 配合您的 JavaScript token 效果最佳。

API 用法

Crawling API 请求中添加 &scraper=instagram-post。在 url 参数中对目标 URL 进行 URL 编码。

curl 'https://api.crawlbase.com/?token=YOUR_TOKEN' \
  --data-urlencode 'url=https://www.instagram.com/p/B5LQhLiFFCX' \
  --data-urlencode 'scraper=instagram-post' -G
from crawlbase import CrawlingAPI

api = CrawlingAPI({'token': 'YOUR_TOKEN'})
res = api.get(
    'https://www.instagram.com/p/B5LQhLiFFCX',
    {'scraper': 'instagram-post'}
)

import json
data = json.loads(res['body'])
const { CrawlingAPI } = require('crawlbase');
const api = new CrawlingAPI({ token: 'YOUR_TOKEN' });

const res = await api.get(
  'https://www.instagram.com/p/B5LQhLiFFCX',
  { scraper: 'instagram-post' }
);
const data = JSON.parse(res.body);
require 'crawlbase'
api = Crawlbase::API.new(token: 'YOUR_TOKEN')

res = api.get('https://www.instagram.com/p/B5LQhLiFFCX', scraper: 'instagram-post')
data = JSON.parse(res.body)

示例输入 URL

传入 url 参数的 URL(为便于阅读已 URL 解码):

https://www.instagram.com/p/B5LQhLiFFCX

响应结构

JSON 响应体。当源页面未提供该值时,字段类型可能为 null

id
string
帖子短代码。
caption
string
标题文本。
owner_username
string
作者用户名。
media_type
string
imagevideocarousel
media_urls
array<string>
图片或视频的直接 URL。
hashtags
array<string>
标题中的话题标签。
mentions
array<string>
@ 提及的用户名。
location
string | null
标记的位置。
like_count
integer
点赞数。
comment_count
integer
评论数。
posted_at
string
ISO 8601 时间戳。

响应示例

{
  "id": "B5LQhLiFFCX",
  "caption": "New product launch! #design #craft",
  "owner_username": "apple",
  "media_type": "image",
  "media_urls": ["https://scontent.cdninstagram.com/...jpg"],
  "hashtags": ["design", "craft"],
  "mentions": [],
  "like_count": 142000,
  "comment_count": 3210,
  "posted_at": "2026-04-15T14:22:00Z"
}