instagram-api

作成者: fetcher-sh

fetcher.sh上のInstagram API代替 — x402経由のUSDC従量課金、またはBearerキーによるプリペイドクレジット。ログイン不要、セッションクッキー不要。ユーザーが@ハンドルでInstagramプロフィールを解決したい、キーワードでユーザーを検索したい、プロフィールの投稿、リール、ストーリー、タグ付けされた投稿、フォロワー、フォロー中を取得したい、ショートコードで単一の投稿を調べたい、投稿のコメントを読みたい、ハッシュタグまたはリール限定ハッシュタグフィードの投稿を取得したい、場所から投稿を取得したい、または投稿を取得したい場合に使用します。

npx skills add https://github.com/fetcher-sh/fetcher-skills --skill instagram-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

Quick reference

Base URLhttps://instagram.fetcher.sh
AuthAuthorization: Bearer bby_live_... or x402 (USDC)
Price$0.004/call (flat)
Endpoints16, all GET
MCPhttps://instagram.fetcher.sh/mcp
Machine-readable/openapi.json · /llms.txt · /skill.md

Which endpoint do I need?

I want to...Call
Look up a profile by @handleGET /api/user/handle/{handle}
Search accounts by nameGET /api/user/search
Get a user's posts, reels, or storiesGET /api/user/{id}/posts / /reels / /stories
Get a user's followers or followingsGET /api/user/{id}/followers / /followings
Look up a post by its share-URL shortcodeGET /api/post/code/{code}
Get a post's commentsGET /api/post/{id}/comments
Find posts under a hashtagGET /api/hashtag/{name}/posts
Find posts tagged at a locationGET /api/location/{id}/posts

Full param details for every row: references/endpoints.md.

Authentication

Two ways to pay, same data — full mechanics in the fetcher skill:

# 1. Prepaid credits (recommended — get a key at https://fetcher.sh/topup
#    or via POST /api/credits/topup, see the fetcher skill)
export FETCHER_API_KEY="bby_live_xxxxxxxxxxxx"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
  "https://instagram.fetcher.sh/api/user/handle/nasa"

# 2. x402 pay-per-call — omit the header; a GET with no payment returns 402
#    with machine-readable payment requirements (USDC on Base, Polygon,
#    Arbitrum, Monad, or Solana). @x402/fetch signs and retries automatically.

Every response is { "status": number, "message": string, "data": ... }; the HTTP status mirrors status.

Endpoints (16 — all GET, $0.004/call)

EndpointWhat it returns
/api/user/handle/{handle}Full profile by @handle — follower counts, bio, numeric ID
/api/user/searchProfiles matching a keyword query
/api/userid/{handle}Just the numeric user ID for a @handle
/api/user/{id}Profile by numeric ID
/api/user/{id}/postsA user's posts
/api/user/{id}/posts/taggedPosts the user is tagged in
/api/user/{id}/reelsA user's reels
/api/user/{id}/storiesA user's active stories
/api/user/{id}/followersA user's followers
/api/user/{id}/followingsAccounts a user follows
/api/post/code/{code}A single post by its shortcode (from the post URL)
/api/post/{id}/commentsA post's comments
/api/hashtag/{name}/postsPosts under a hashtag
/api/hashtag/{name}/reelsReels under a hashtag
/api/location/{id}/postsPosts tagged at a location
/api/audio/{id}/postsPosts using a specific audio/music track

{id} / {handle} / {name} / {code} are path parameters. Optional cursor / page paginate; query (user search) is required where it appears.

Scenarios

Resolve a profile by handle — the endpoint most callers want first:

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:

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):

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:

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 /p/), and its comments:

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:

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

{
  "mcpServers": {
    "instagram": {
      "url": "https://instagram.fetcher.sh/mcp",
      "headers": { "Authorization": "Bearer bby_live_..." }
    }
  }
}

Free: search_endpoints, describe_endpoint, check_balance. Paid: fetch_data (any endpoint above), topup_credits, plus the named shortcut instagram_user_handle. Drop the headers block to pay per call with x402 instead — see the fetcher skill for the full flow.

Errors

  • 400 — missing/invalid parameter (message names it)
  • 401 — unknown or rotated key
  • 402 — payment required (x402 challenge) or topup_required (credits exhausted)
  • 404 — not a priced path
  • No rate limits; no refunds on upstream failures (settlement precedes delivery)

Reference

fetcher-shのその他のスキル

twitter-api
fetcher-sh
fetcher.sh上のTwitter API代替およびX API代替 — x402経由のUSDCによる従量課金、またはBearerキーによるプリペイドクレジット。OAuth不要、開発者アプリケーションも不要。キーワード、ハッシュタグ、または高度な演算子(from:、to:、since:、until:、min_faves:、filter:)によるツイート検索、ハンドルによるTwitter/Xプロフィールのスクレイピング、ユーザーのツイート、リプライ、フォロワー、フォロー中の取得、リプライやリツイート者を含む単一ツイートの取得、Twitterリストのメンバーやツイートの読み取りを行いたい場合に使用します。
tiktok-api
fetcher-sh
fetcher.sh上のTikTok API代替 — x402経由でUSDCによる従量課金制、またはBearerkーによるプリペイドクレジット、ログイン不要、アプリレビュー不要。キーワードでTikTokの投稿を検索し、日付範囲内で「いいね数が多い順」または「新しい順」に並べ替えたい場合、共有URLまたはIDで投稿を検索したい場合、@usernameでTikTokプロフィールを取得したい場合、ユーザーの投稿・フォロワー・フォロー中を取得したい場合、ハッシュタグの投稿を取得したい場合、特定のサウンド/楽曲を使用した投稿を取得したい場合、特定の場所からの投稿を取得したい場合、または投稿の...を読みたい場合に使用します。