Instagram Profile
获取 Instagram 个人资料数据:简介、粉丝/关注数、最近的帖子、头像和认证状态。
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' -Gfrom 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。
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"
}