mcpField
S
scraping-instagram-users-by-keyword

scraping-instagram-users-by-keyword

github.com/apidojo-ioデータ・データベース1773 回インストール24 週間前に更新
リポジトリ

scraping-instagram-users-by-keyword について

キーワード、ユーザー名、プロフィール URL、ユーザー ID を指定し、後続分析向けに Instagram ユーザーデータを収集する Apify ワークフローです。プロフィールのフォロワーまたはフォロー中の一覧も任意で取得できます。

主な機能

  1. 01キーワードまたはユーザー名で検索
  2. 02プロフィール URL とユーザー ID に対応
  3. 03プロフィール情報とアカウント指標の取得
  4. 04フォロワーまたはフォロー中の一覧を任意取得
  5. 05件数制限と出力マッピングの設定

活用シーン

  1. 01テーマ別の Instagram ユーザー一覧作成
  2. 02プロフィール情報とフォロワー数の整理
  3. 03指定アカウントのフォロワーやフォロー中の一覧収集

MCP 対応

Apify MCP の call_actor ツールから apidojo~instagram-user-scraper を呼び出せます。

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/apidojo-io/apidojo-skills --skill scraping-instagram-users-by-keyword

インストール後、Claude Code で/scraping-instagram-users-by-keywordを入力して読み込まれたか確認します。

詳細

キーワードによるInstagramユーザーのスクレイピング

生データを収集します。想定される用途はありません。後続の分析に使用できる完全なデータセットを返します。


入力

パラメーター型必須デフォルト備考
keywordsarray任意[]ユーザーを検索するキーワード
handlesarray任意[]Instagramのユーザー名(@なし)
startUrlsarray任意[]InstagramのプロフィールURL
userIdsarray任意[]InstagramのユーザーID
getFollowersboolean任意false各プロフィールのフォロワーリストを抽出します
getFollowingsboolean任意false各プロフィールのフォロー中リストを抽出します
maxItemsnumber任意無制限返すユーザーの最大数
customMapFunctionstring任意—各出力オブジェクトを変換するJavaScript関数

実行方法

run_actor.jsを使用する(推奨)
# Quick answer (table)
node scripts/run_actor.js --actor "apidojo~instagram-user-scraper" --input '{"handles": ["natgeo"], "getFollowers": false, "maxItems": 50}'

# Save as CSV
node scripts/run_actor.js --actor "apidojo~instagram-user-scraper" --input '{"handles": ["natgeo"], "getFollowers": false, "maxItems": 50}' --output results.csv --format csv

# Save as JSON
node scripts/run_actor.js --actor "apidojo~instagram-user-scraper" --input '{"handles": ["natgeo"], "getFollowers": false, "maxItems": 50}' --output results.json --format json
REST APIを使う場合
curl -X POST "https://api.apify.com/v2/acts/apidojo~instagram-user-scraper/runs" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"handles": ["natgeo"], "getFollowers": false, "maxItems": 50}'

Apify MCPが利用できる場合: Apify MCPのcall_actorツールで、アクターapidojo~instagram-user-scraperと上記の入力を使用します。


出力フィールド

フィールド型説明
idstringInstagramのユーザーID
usernamestring@ユーザー名
fullNamestring表示名
biographystringプロフィールの自己紹介文
externalUrlstring自己紹介欄のリンク(ウェブサイト)
followerCountnumberフォロワー数
followingCountnumberフォロー中のアカウント数
postCountnumber投稿の合計数
isVerifiedboolean認証ステータス
isBusinessAccountbooleanビジネスアカウントかどうか
businessCategoryNamestringビジネスカテゴリ
profilePicUrlstringプロフィール写真のURL
profilePicUrlHdstring高解像度プロフィール写真のURL
isPrivateboolean非公開アカウントかどうか
publicEmailstring公開メールアドレス(取得可能な場合)
publicPhoneNumberstring公開電話番号(取得可能な場合)
contactPhoneNumberstring連絡先電話番号(取得可能な場合)

エッジケース

  • 非公開アカウント:プロフィールのメタデータは返しますが、フォロワーやフォロー中のリストは返しません。
  • 公開メールアドレスがない:publicEmailフィールドはありません。個人アカウントでは通常の動作です。
  • フォロワーリストが大きい:過剰なコストを避けるため、maxItemsの上限を設定してください。
  • アカウントが見つからない:空の結果を返します。ハンドルのスペルを確認してください。
  • キーワードに該当するユーザーが多い:maxItemsを使用して結果数を制限してください。

コメント