instagram-scraper について
instagram-scraper は、分析担当者やソーシャルメディア研究者向けの Instagram データ API スキルです。HTTP と MCP を通じて、プロフィール、投稿、反応データを取得できます。
主な機能
- 01ハンドル名によるプロフィール検索
- 02投稿、Reels、Stories の取得
- 03フォロワーとフォロー中の取得
- 04ハッシュタグ、場所、音源の投稿検索
- 05投稿とコメントの取得
活用シーン
- 01アカウントの投稿内容の追跡
- 02ハッシュタグや場所ごとの投稿監視
- 03投稿コメントと反応の分析
- 04ハンドル名からの Instagram アカウント検索
MCP 対応
https://instagram.fetcher.sh/mcp に MCP サーバーを提供し、エンドポイント検索、説明、残高確認、有料データ取得に対応します。
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ fetcher-sh/ fetcher-skills --skill instagram-scraperインストール後、Claude Code で/instagram-scraperを入力して読み込まれたか確認します。
同梱ファイル
SKILL.md と一緒にインストールされる参考資料やスクリプト。
references/comparison.mdendpoints.mdfaq.mdscenarios.md詳細
Instagram Scraper API
Instagram のデータをオンデマンドで取得できます。@handle によるプロフィール検索、投稿、リール、ストーリーズ、タグ付けされた投稿、フォロワーとフォロー中のアカウント、ハッシュタグと位置情報のフィード、音声/音楽のフィード、投稿へのコメントに対応しています。1 回の呼び出しにつき、通常の HTTP GET を 1 回行うだけで、使った分だけ支払います。ログイン、セッション Cookie、ヘッドレスブラウザー、Graph API のビジネス認証は不要です。
ベース URL:https://instagram.fetcher.sh
クイックリファレンス
| ベース URL | https://instagram.fetcher.sh |
| 認証 | Authorization: Bearer bby_live_... または x402(USDC) |
| 料金 | 1 回あたり 0.004 ドル(固定) |
| エンドポイント | 16 個、すべて GET |
| MCP | https://instagram.fetcher.sh/mcp |
| 機械可読形式 | /openapi.json · /llms.txt · /skill.md |
どのエンドポイントを使えばよいですか?
| やりたいこと | 呼び出し |
|---|---|
| @handle でプロフィールを検索する | GET /api/user/handle/{handle} |
| 名前でアカウントを検索する | GET /api/user/search |
| ユーザーの投稿、リール、ストーリーズを取得する | GET /api/user/{id}/posts / /reels / /stories |
| ユーザーのフォロワーまたはフォロー中のアカウントを取得する | GET /api/user/{id}/followers / /followings |
| シェア URL のショートコードで投稿を検索する | GET /api/post/code/{code} |
| 投稿のコメントを取得する | GET /api/post/{id}/comments |
| ハッシュタグの投稿を検索する | GET /api/hashtag/{name}/posts |
| 位置情報がタグ付けされた投稿を検索する | GET /api/location/{id}/posts |
各行のパラメーターの詳細については、references/endpoints.md をご覧ください。
認証
同じデータを取得できる支払い方法が 2 つあります。仕組みの詳細については、fetcher
スキルをご覧ください。
# 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.
すべてのレスポンスは { "status": number, "message": string, "data": ... } です。HTTP ステータスは status と同じ値になります。
エンドポイント(16 個。すべて GET、1 回あたり 0.004 ドル)
| エンドポイント | 返される内容 |
|---|---|
/api/user/handle/{handle} | @handle によるプロフィール全体。フォロワー数、自己紹介、数値 ID を含みます |
/api/user/search | キーワード検索に一致するプロフィール |
/api/userid/{handle} | @handle に対応する数値ユーザー ID のみ |
/api/user/{id} | 数値 ID によるプロフィール |
/api/user/{id}/posts | ユーザーの投稿 |
/api/user/{id}/posts/tagged | ユーザーがタグ付けされた投稿 |
/api/user/{id}/reels | ユーザーのリール |
/api/user/{id}/stories | ユーザーの公開中のストーリーズ |
/api/user/{id}/followers | ユーザーのフォロワー |
/api/user/{id}/followings | ユーザーがフォローしているアカウント |
/api/post/code/{code} | ショートコード(投稿 URL から取得)による単一の投稿 |
/api/post/{id}/comments | 投稿のコメント |
/api/hashtag/{name}/posts | ハッシュタグの投稿 |
/api/hashtag/{name}/reels | ハッシュタグのリール |
/api/location/{id}/posts | 位置情報がタグ付けされた投稿 |
/api/audio/{id}/posts | 特定の音声/音楽トラックを使用した投稿 |
{id} / {handle} / {name} / {code} はパスパラメーターです。省略可能な
cursor / page でページネーションできます。query(ユーザー検索)は、記載されている箇所では必須です。
利用例
handle でプロフィールを特定する — 多くのユーザーが最初に利用するエンドポイントです:
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 のみを取得する:
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"
プロフィールの投稿、リール、ストーリーズ、タグ付けされた投稿(上記の handle 検索で取得した数値 ID を使用):
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"
フォロワーとフォロー中のアカウント:
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/ の後ろの部分)による単一の投稿と、そのコメント:
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"
ハッシュタグの投稿とリール、位置情報からの投稿、音声トラックを使用した投稿:
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_..." }
}
}
}
無料:search_endpoints、describe_endpoint、check_balance。有料:
fetch_data(上記の任意のエンドポイント)、topup_credits、および名前付きショートカット
instagram_user_handle。代わりに x402 で呼び出しごとに支払う場合は、headers ブロックを省略してください。詳しい手順については、fetcher スキルをご覧ください。
エラー
400— パラメーターがない、または無効です(メッセージに該当するパラメーター名が記載されます)401— キーが不明、またはローテーションされています402— 支払いが必要です(x402 チャレンジ)、またはtopup_required(クレジットが不足しています)404— 価格設定されたパスではありません- レート制限はありません。上流での障害時も返金されません(配信前に決済が行われます)
リファレンス
- 詳細な解説:
references/endpoints.md(すべてのパラメーター) ·references/scenarios.md(各エンドポイントにつきcurlの例を1つ) ·references/faq.md·references/comparison.md(公式 Instagram Graph API およびブラウザースクレーパーとの比較) - タスクガイド:プロフィールの検索 · ハッシュタグと位置情報のモニタリング
- スラッシュコマンド:
/instagram-profile - エージェントの完全なセットアップ: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