登录
使用 JS token

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

API 用法

Crawling API 请求中添加 &scraper=instagram-profile。在 url 参数中传入经过 URL 编码的目标 URL。

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

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

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/apple/',
  { scraper: 'instagram-profile' }
);
const data = JSON.parse(res.body);
require 'crawlbase'
api = Crawlbase::API.new(token: 'YOUR_TOKEN')

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

示例输入 URL

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

https://www.instagram.com/apple/

响应结构

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

username
string
个人资料用户名(不含 @)。
full_name
string
个人资料显示名称。
biography
string
简介文本。
followers_count
integer
粉丝数。
following_count
integer
关注数。
posts_count
integer
该个人资料的帖子总数。
is_verified
boolean
认证账号标识。
is_private
boolean
私密账号标识。
profile_pic_url
string
头像 URL。
recent_posts
array
最多 12 条最近的帖子(结构与 instagram-post 相同)。

响应示例

{
  "username": "apple",
  "full_name": "Apple",
  "biography": "Welcome to @apple. The latest creativity going on around us.",
  "followers_count": 33800000,
  "following_count": 9,
  "posts_count": 1284,
  "is_verified": true,
  "is_private": false,
  "profile_pic_url": "https://scontent.cdninstagram.com/...jpg"
}