instagram-api
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseInstagram API
Instagram API
Instagram data on demand: profile lookup by @handle, posts, reels, stories,
tagged posts, followers and followings, hashtag and location feeds, audio/music
feeds, and post comments — one plain HTTP GET per call, paid as you go. No
login, no session cookies, no headless browser, no Graph API business
verification.
Base URL:
https://instagram.fetcher.sh按需获取Instagram数据:通过@handle查询个人资料、帖子、Reels、快拍、标记帖子、粉丝与关注列表、话题标签和地点动态、音频/音乐动态,以及帖子评论——每次调用只需一个简单的HTTP GET请求,按需付费。无需登录、无需会话Cookie、无需无头浏览器、无需Graph API企业验证。
基础URL:
https://instagram.fetcher.shQuick reference
快速参考
| Base URL | |
| Auth | |
| Price | $0.004/call (flat) |
| Endpoints | 16, all |
| MCP | |
| Machine-readable | |
| 基础URL | |
| 认证方式 | |
| 价格 | 每次调用0.004美元(统一费率) |
| 端点数量 | 16个,均为 |
| MCP地址 | |
| 机器可读资源 | |
Which endpoint do I need?
如何选择合适的端点?
| I want to... | Call |
|---|---|
| Look up a profile by @handle | |
| Search accounts by name | |
| Get a user's posts, reels, or stories | |
| Get a user's followers or followings | |
| Look up a post by its share-URL shortcode | |
| Get a post's comments | |
| Find posts under a hashtag | |
| Find posts tagged at a location | |
Full param details for every row: .
references/endpoints.md| 我想要... | 调用方式 |
|---|---|
| 通过@handle查询个人资料 | |
| 按名称搜索账号 | |
| 获取用户的帖子、Reels或快拍 | |
| 获取用户的粉丝或关注列表 | |
| 通过分享URL的短代码查询帖子 | |
| 获取帖子的评论 | |
| 查找话题标签下的帖子 | |
| 查找标记了指定地点的帖子 | |
每一行的完整参数详情:。
references/endpoints.mdAuthentication
认证方式
Two ways to pay, same data — full mechanics in the
skill:
fetcherbash
undefined两种付费方式,获取的数据一致——完整机制见技能:
fetcherbash
undefined1. Prepaid credits (recommended — get a key at https://fetcher.sh/topup
1. 预付费额度(推荐——在https://fetcher.sh/topup获取密钥
or via POST /api/credits/topup, see the fetcher skill)
或通过POST /api/credits/topup,详见fetcher技能)
export FETCHER_API_KEY="bby_live_xxxxxxxxxxxx"
curl -H "Authorization: Bearer $FETCHER_API_KEY"
"https://instagram.fetcher.sh/api/user/handle/nasa"
"https://instagram.fetcher.sh/api/user/handle/nasa"
export FETCHER_API_KEY="bby_live_xxxxxxxxxxxx"
curl -H "Authorization: Bearer $FETCHER_API_KEY"
"https://instagram.fetcher.sh/api/user/handle/nasa"
"https://instagram.fetcher.sh/api/user/handle/nasa"
2. x402 pay-per-call — omit the header; a GET with no payment returns 402
2. x402按调用付费——省略请求头;未付费的GET请求会返回402状态码
with machine-readable payment requirements (USDC on Base, Polygon,
并附带机器可读的支付要求(在Base、Polygon、Arbitrum、Monad或Solana链上使用USDC)。@x402/fetch会自动签名并重试请求。
Arbitrum, Monad, or Solana). @x402/fetch signs and retries automatically.
—
Every response is `{ "status": number, "message": string, "data": ... }`; the
HTTP status mirrors `status`.
每个响应格式均为`{ "status": number, "message": string, "data": ... }`;HTTP状态码与`status`字段值一致。Endpoints (16 — all GET, $0.004/call)
端点(16个——均为GET请求,每次调用0.004美元)
| Endpoint | What it returns |
|---|---|
| Full profile by @handle — follower counts, bio, numeric ID |
| Profiles matching a keyword query |
| Just the numeric user ID for a @handle |
| Profile by numeric ID |
| A user's posts |
| Posts the user is tagged in |
| A user's reels |
| A user's active stories |
| A user's followers |
| Accounts a user follows |
| A single post by its shortcode (from the post URL) |
| A post's comments |
| Posts under a hashtag |
| Reels under a hashtag |
| Posts tagged at a location |
| Posts using a specific audio/music track |
{id}{handle}{name}{code}cursorpagequery| 端点 | 返回内容 |
|---|---|
| 通过@handle获取完整个人资料——粉丝数、简介、数字ID |
| 匹配关键词查询的个人资料 |
| 仅返回@handle对应的用户数字ID |
| 通过数字ID获取个人资料 |
| 用户的帖子 |
| 用户被标记的帖子 |
| 用户的Reels |
| 用户的当前快拍 |
| 用户的粉丝 |
| 用户关注的账号 |
| 通过短代码获取单个帖子(来自帖子URL) |
| 帖子的评论 |
| 话题标签下的帖子 |
| 话题标签下的Reels |
| 标记了指定地点的帖子 |
| 使用特定音频/音乐曲目的帖子 |
{id}{handle}{name}{code}cursorpagequeryScenarios
使用场景
Resolve a profile by handle — the endpoint most callers want first:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/user/handle/nasa"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/user/handle/natgeo"Search for profiles by keyword, or resolve just the numeric ID for a handle:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "query=fitness influencer" -G \
"https://instagram.fetcher.sh/api/user/search"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/userid/nasa"A profile's posts, reels, stories, and tagged posts (by numeric ID from the
handle lookup above):
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/user/528817151/posts"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/user/528817151/reels"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/user/528817151/stories"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/user/528817151/posts/tagged"Followers and followings:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/user/528817151/followers"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/user/528817151/followings"A single post by shortcode (the part of the URL after ), and its
comments:
/p/bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/post/code/C0JD3tntcmy"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/post/3245142029192513970/comments"Posts and reels under a hashtag, posts from a location, and posts using an
audio track:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/hashtag/travel/posts"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/hashtag/travel/reels"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/location/213131048/posts"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/audio/271328201351336/posts"通过handle解析个人资料——大多数调用者首先需要的端点:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/user/handle/nasa"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/user/handle/natgeo"按关键词搜索个人资料,或仅解析handle对应的数字ID:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "query=fitness influencer" -G \
"https://instagram.fetcher.sh/api/user/search"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/userid/nasa"个人资料的帖子、Reels、快拍和标记帖子(使用上述handle查询得到的数字ID):
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/user/528817151/posts"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/user/528817151/reels"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/user/528817151/stories"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/user/528817151/posts/tagged"粉丝与关注列表:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/user/528817151/followers"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/user/528817151/followings"通过短代码获取单个帖子(URL中后的部分)及其评论:
/p/bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/post/code/C0JD3tntcmy"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/post/3245142029192513970/comments"话题标签下的帖子和Reels、指定地点的帖子、使用特定音频曲目的帖子:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/hashtag/travel/posts"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/hashtag/travel/reels"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/location/213131048/posts"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://instagram.fetcher.sh/api/audio/271328201351336/posts"MCP
MCP
json
{
"mcpServers": {
"instagram": {
"url": "https://instagram.fetcher.sh/mcp",
"headers": { "Authorization": "Bearer bby_live_..." }
}
}
}Free: , , . Paid:
(any endpoint above), , plus the named shortcut
. Drop the block to pay per call with x402
instead — see the skill for the full flow.
search_endpointsdescribe_endpointcheck_balancefetch_datatopup_creditsinstagram_user_handleheadersfetcherjson
{
"mcpServers": {
"instagram": {
"url": "https://instagram.fetcher.sh/mcp",
"headers": { "Authorization": "Bearer bby_live_..." }
}
}
}免费功能:, , 。付费功能:(上述任意端点)、,以及命名快捷方式。移除块即可改用x402按调用付费——完整流程见技能。
search_endpointsdescribe_endpointcheck_balancefetch_datatopup_creditsinstagram_user_handleheadersfetcherErrors
错误说明
- — missing/invalid parameter (message names it)
400 - — unknown or rotated key
401 - — payment required (x402 challenge) or
402(credits exhausted)topup_required - — not a priced path
404 - No rate limits; no refunds on upstream failures (settlement precedes delivery)
- —— 参数缺失/无效(消息会指明具体参数)
400 - —— 密钥未知或已过期
401 - —— 需要支付(x402验证)或
402(额度耗尽)topup_required - —— 路径未定价
404 - 无速率限制;上游故障不退款(结算优先于交付)
Reference
参考资源
- Deep dives: (every param) ·
references/endpoints.md(onereferences/scenarios.mdper endpoint) ·curl·references/faq.md(vs. the official Instagram Graph API and a browser scraper)references/comparison.md - Task guides: profile lookup · hashtag and location monitoring
- Slash command:
/instagram-profile - Full agent setup: https://instagram.fetcher.sh/skill.md
- OpenAPI 3.1 contract: https://instagram.fetcher.sh/openapi.json
- Condensed catalog: https://instagram.fetcher.sh/llms.txt
- Payment, credits, and MCP deep dive: skill
fetcher - Site: https://instagram.fetcher.sh
- 深度解析:(所有参数)·
references/endpoints.md(每个端点对应一个references/scenarios.md示例)·curl·references/faq.md(与官方Instagram Graph API和浏览器爬虫的对比)references/comparison.md - 任务指南:个人资料查询 · 话题标签与地点监测
- 斜杠命令:
/instagram-profile - 完整Agent设置:https://instagram.fetcher.sh/skill.md
- OpenAPI 3.1契约:https://instagram.fetcher.sh/openapi.json
- 精简目录:https://instagram.fetcher.sh/llms.txt
- 支付、额度与MCP深度解析:技能
fetcher - 官网:https://instagram.fetcher.sh