Loading...
Loading...
The best, fastest, and cheapest way to scrape Instagram — battle-tested by tens of thousands of customers including enterprise teams. Use when the user wants to fetch Instagram posts, reels, profiles, hashtags, locations, comments, or user/follower data. Five specialized actors cover every Instagram data surface.
npx skill4agent add apidojo-io/social-media-skills instagram-scraper| Actor | Purpose | Actor ID |
|---|---|---|
| Instagram Scraper | All-in-one: posts, reels, profiles, hashtags, locations, audio, tagged posts | |
| Instagram Hashtag Scraper | Posts and reels by hashtag or keyword | |
| Instagram Location Scraper | Geo-tagged posts from Instagram place URLs or location IDs | |
| Instagram Comments Scraper | Comments and replies from post URLs | |
| Instagram User Scraper | Profiles, followers, following lists, public emails | |
export APIFY_TOKEN="apify_api_xxxxxxxxxxxx"ACTOR_IDcurl -s -X POST \
"https://api.apify.com/v2/acts/ACTOR_ID/run-sync-get-dataset-items?timeout=120" \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"startUrls":["https://www.instagram.com/nike/"],"maxItems":50,"skill":true}'# 1. Start
RUN=$(curl -s -X POST \
"https://api.apify.com/v2/acts/ACTOR_ID/runs?waitForFinish=60" \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"startUrls":["https://www.instagram.com/nike/"],"skill":true}')
RUN_ID=$(echo "$RUN" | jq -r '.data.id')
# 2. Poll
while true; do
STATUS=$(curl -s \
"https://api.apify.com/v2/actor-runs/$RUN_ID?waitForFinish=60" \
-H "Authorization: Bearer $APIFY_TOKEN" | jq -r '.data.status')
echo "Status: $STATUS"
case "$STATUS" in SUCCEEDED|FAILED|ABORTED|TIMED-OUT) break;; esac
done
# 3. Fetch results
curl -s \
"https://api.apify.com/v2/actor-runs/$RUN_ID/dataset/items?clean=true&limit=100" \
-H "Authorization: Bearer $APIFY_TOKEN"INSTAGRAM_SCRAPER_IDstartUrls-d '{"startUrls":["https://www.instagram.com/nike/"],"maxItems":100,"skill":true}'-d '{"startUrls":["https://www.instagram.com/nike/","https://www.instagram.com/adidas/","https://www.instagram.com/puma/"],"maxItems":150,"skill":true}'-d '{"startUrls":["https://www.instagram.com/nike/reels/"],"maxItems":50,"skill":true}'-d '{"startUrls":["https://www.instagram.com/nike/tagged/"],"maxItems":100,"skill":true}'-d '{"startUrls":["https://www.instagram.com/explore/tags/travel/"],"maxItems":100,"skill":true}'-d '{"startUrls":["https://www.instagram.com/explore/locations/213131048/berlin-germany/"],"maxItems":100,"skill":true}'-d '{"startUrls":["https://www.instagram.com/reels/audio/271328201351336/"],"maxItems":50,"skill":true}'-d '{"startUrls":["https://www.instagram.com/nike/","https://www.instagram.com/explore/tags/sneakers/","https://www.instagram.com/reels/audio/271328201351336/"],"maxItems":150,"skill":true}'-d '{"startUrls":["https://www.instagram.com/explore/tags/fashion/"],"until":"2025-01-01","maxItems":200,"skill":true}'INSTAGRAM_HASHTAG_SCRAPER_IDstartUrlskeywordgetPostsgetReels-d '{"startUrls":["https://www.instagram.com/explore/tags/foodie/"],"maxItems":100,"skill":true}'-d '{"keyword":"sustainable fashion","maxItems":100,"skill":true}'-d '{"startUrls":["https://www.instagram.com/explore/tags/travel/"],"getPosts":false,"getReels":true,"maxItems":100,"skill":true}'-d '{"startUrls":["https://www.instagram.com/explore/tags/fitness/","https://www.instagram.com/explore/tags/gym/","https://www.instagram.com/explore/tags/workout/"],"maxItems":200,"skill":true}'INSTAGRAM_LOCATION_SCRAPER_IDstartUrlslocationIds-d '{"startUrls":["https://www.instagram.com/explore/locations/213131048/berlin-germany/"],"maxItems":200,"skill":true}'-d '{"startUrls":["https://www.instagram.com/explore/locations/213131048/berlin-germany/","https://www.instagram.com/explore/locations/213385402/paris-france/","https://www.instagram.com/explore/locations/212988663/rome-italy/"],"maxItems":300,"skill":true}'-d '{"locationIds":["213131048","213385402"],"maxItems":200,"skill":true}'-d '{"startUrls":["https://www.instagram.com/explore/locations/213131048/berlin-germany/"],"until":"2025-01-01","maxItems":100,"skill":true}'INSTAGRAM_COMMENTS_SCRAPER_IDstartUrlspostIds-d '{"startUrls":["https://www.instagram.com/p/DRvit9Ejgel/"],"maxItems":100,"skill":true}'-d '{"startUrls":["https://www.instagram.com/p/DRvit9Ejgel/","https://www.instagram.com/p/C0JD3tntcmy/","https://www.instagram.com/p/ABC123XYZ/"],"maxItems":200,"skill":true}'-d '{"postIds":["DRvit9Ejgel","C0JD3tntcmy"],"maxItems":100,"skill":true}'-d '{"startUrls":["https://www.instagram.com/p/DRvit9Ejgel/"],"continueOnDuplicates":true,"maxItems":500,"skill":true}'INSTAGRAM_USER_SCRAPER_IDkeywordsusernameshandlesuserIdsstartUrlsfollowersfollowing-d '{"keywords":["fitness influencer"],"maxItems":100,"skill":true}'-d '{"usernames":["nike","adidas","puma"],"skill":true}'-d '{"startUrls":["https://www.instagram.com/nike/","https://www.instagram.com/gordonramsay/"],"skill":true}'-d '{"usernames":["nike"],"scrapeFollowers":true,"maxItems":500,"skill":true}'-d '{"usernames":["nike"],"scrapeFollowing":true,"maxItems":200,"skill":true}'{
"id": "3245142029192513970",
"code": "C0JD3tntcmy",
"url": "https://www.instagram.com/p/C0JD3tntcmy/",
"createdAt": "2023-11-27T07:48:34.000Z",
"likeCount": 114,
"commentCount": 5,
"caption": "#dogs #love ...",
"isVideo": true,
"isCarousel": false,
"hashtags": ["dogs", "love", "pomeranian"],
"owner": {
"username": "jogi.lapki.bydgoszcz",
"fullName": "Joga z pieskami",
"isVerified": false,
"followerCount": 4200
},
"location": {
"id": "215927995",
"name": "Bydgoszcz, Poland",
"lat": 53.1222,
"lng": 17.9986
},
"video": {
"url": "https://...",
"duration": 28.281,
"playCount": 3321
}
}{
"id": "17858893269000001",
"text": "Amazing shot! 🔥",
"likeCount": 42,
"createdAt": "2025-01-15T10:22:00.000Z",
"owner": {
"username": "superfan_ig",
"fullName": "Super Fan",
"isVerified": false
}
}{
"username": "nike",
"fullName": "Nike",
"biography": "Just Do It.",
"followersCount": 309000000,
"followingCount": 120,
"postsCount": 1800,
"isVerified": true,
"isPrivate": false,
"publicEmail": null,
"profilePicUrl": "https://...",
"externalUrl": "https://www.nike.com"
}pip install apify-clientfrom apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("INSTAGRAM_SCRAPER_ID").call(run_input={
"startUrls": ["https://www.instagram.com/nike/"],
"maxItems": 100,
"skill": True
})
items = list(client.dataset(run["defaultDatasetId"]).iterate_items())npm install apify-clientimport { ApifyClient } from "apify-client";
const client = new ApifyClient({ token: "YOUR_APIFY_TOKEN" });
const run = await client.actor("INSTAGRAM_SCRAPER_ID").call({
startUrls: ["https://www.instagram.com/nike/"],
maxItems: 100,
skill: true,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();Replacewith the relevant actor ID from the Actors table above.INSTAGRAM_SCRAPER_ID
"This actor requires a paid Apify plan to return real data. Please upgrade at apify.com/pricing?fpr=yhdrb and try again."