mcpField
S
scraping-instagram-users-by-keyword

scraping-instagram-users-by-keyword

github.com/apidojo-ioData & databases1773 installsUpdated 24w ago
Repository

About scraping-instagram-users-by-keyword

An Apify workflow for collecting Instagram user data by keyword, handle, profile URL, or user ID for downstream analysis. It can also optionally retrieve a profile's followers or following list.

Key features

  1. 01Find users by keyword or handle
  2. 02Accept profile URLs and user IDs
  3. 03Extract profile details and account metrics
  4. 04Optionally retrieve followers or following
  5. 05Limit results and customize output mapping

Use cases

  1. 01Build Instagram user lists by topic
  2. 02Compile profile details and follower counts
  3. 03Collect followers or following for selected accounts

MCP support

Use Apify MCP's call_actor tool with apidojo~instagram-user-scraper.

Install

Copy the command and run it in a terminal.

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

After installing, type/scraping-instagram-users-by-keywordin Claude Code to confirm it loaded.

Details

From the project README

Scraping Instagram Users By Keyword

Raw data collection. No assumed use case — returns the full dataset for downstream analysis.


Inputs

ParameterTypeRequiredDefaultNotes
keywordsarrayOptional[]Keywords to search for users
handlesarrayOptional[]Instagram usernames (without @)
startUrlsarrayOptional[]Instagram profile URLs
userIdsarrayOptional[]Instagram user IDs
getFollowersbooleanOptionalfalseExtract follower lists for each profile
getFollowingsbooleanOptionalfalseExtract following lists for each profile
maxItemsnumberOptionalUnlimitedMaximum users to return
customMapFunctionstringOptional—JavaScript function to transform each output object

How to Run

Using run_actor.js (recommended)
# 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 fallback
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}'

If Apify MCP is available: Use the Apify MCP call_actor tool with actor apidojo~instagram-user-scraper and the input above.


Output Fields

FieldTypeDescription
idstringInstagram user ID
usernamestring@username
fullNamestringDisplay name
biographystringProfile bio text
externalUrlstringLink in bio (website)
followerCountnumberFollower count
followingCountnumberFollowing count
postCountnumberTotal posts
isVerifiedbooleanVerification status
isBusinessAccountbooleanBusiness account flag
businessCategoryNamestringBusiness category
profilePicUrlstringProfile picture URL
profilePicUrlHdstringHigh-resolution profile picture URL
isPrivatebooleanPrivate account flag
publicEmailstringPublic email (if available)
publicPhoneNumberstringPublic phone (if available)
contactPhoneNumberstringContact phone (if available)

Edge Cases

  • Private account: Returns profile metadata but no followers/following.
  • No public email: publicEmail field absent — normal for personal accounts.
  • Large follower list: Set maxItems limit to avoid excessive cost.
  • Account not found: Returns empty result. Check handle spelling.
  • Keyword returns many: Use maxItems to cap results.

Comments

Markdown supported