scraping-instagram-users-by-keyword について
キーワード、ユーザー名、プロフィール URL、ユーザー ID を指定し、後続分析向けに Instagram ユーザーデータを収集する Apify ワークフローです。プロフィールのフォロワーまたはフォロー中の一覧も任意で取得できます。
主な機能
- 01キーワードまたはユーザー名で検索
- 02プロフィール URL とユーザー ID に対応
- 03プロフィール情報とアカウント指標の取得
- 04フォロワーまたはフォロー中の一覧を任意取得
- 05件数制限と出力マッピングの設定
活用シーン
- 01テーマ別の Instagram ユーザー一覧作成
- 02プロフィール情報とフォロワー数の整理
- 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ユーザーのスクレイピング
生データを収集します。想定される用途はありません。後続の分析に使用できる完全なデータセットを返します。
入力
| パラメーター | 型 | 必須 | デフォルト | 備考 |
|---|---|---|---|---|
keywords | array | 任意 | [] | ユーザーを検索するキーワード |
handles | array | 任意 | [] | Instagramのユーザー名(@なし) |
startUrls | array | 任意 | [] | InstagramのプロフィールURL |
userIds | array | 任意 | [] | InstagramのユーザーID |
getFollowers | boolean | 任意 | false | 各プロフィールのフォロワーリストを抽出します |
getFollowings | boolean | 任意 | false | 各プロフィールのフォロー中リストを抽出します |
maxItems | number | 任意 | 無制限 | 返すユーザーの最大数 |
customMapFunction | string | 任意 | — | 各出力オブジェクトを変換する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と上記の入力を使用します。
出力フィールド
| フィールド | 型 | 説明 |
|---|---|---|
id | string | InstagramのユーザーID |
username | string | @ユーザー名 |
fullName | string | 表示名 |
biography | string | プロフィールの自己紹介文 |
externalUrl | string | 自己紹介欄のリンク(ウェブサイト) |
followerCount | number | フォロワー数 |
followingCount | number | フォロー中のアカウント数 |
postCount | number | 投稿の合計数 |
isVerified | boolean | 認証ステータス |
isBusinessAccount | boolean | ビジネスアカウントかどうか |
businessCategoryName | string | ビジネスカテゴリ |
profilePicUrl | string | プロフィール写真のURL |
profilePicUrlHd | string | 高解像度プロフィール写真のURL |
isPrivate | boolean | 非公開アカウントかどうか |
publicEmail | string | 公開メールアドレス(取得可能な場合) |
publicPhoneNumber | string | 公開電話番号(取得可能な場合) |
contactPhoneNumber | string | 連絡先電話番号(取得可能な場合) |
エッジケース
- 非公開アカウント:プロフィールのメタデータは返しますが、フォロワーやフォロー中のリストは返しません。
- 公開メールアドレスがない:publicEmailフィールドはありません。個人アカウントでは通常の動作です。
- フォロワーリストが大きい:過剰なコストを避けるため、maxItemsの上限を設定してください。
- アカウントが見つからない:空の結果を返します。ハンドルのスペルを確認してください。
- キーワードに該当するユーザーが多い:maxItemsを使用して結果数を制限してください。
コメント
Markdown 対応