Instagram Lead Scraper
Scrapes users who liked specific Instagram posts using the Apify datadoping/instagram-likes-scraper actor (WxPRaG9gfg5KZ4gY1). No Instagram login or cookies required.
What It Does
- Accepts one or more Instagram post URLs
- Calls Apify actor
WxPRaG9gfg5KZ4gY1with{ posts: [...urls], max_count: 1000 } - Fetches all results with pagination
- Inserts leads into
instagram_leadsDB table (deduplicates by username)
Actor
- Apify Actor ID:
WxPRaG9gfg5KZ4gY1 - No cookies needed
- Input:
{ "posts": ["https://www.instagram.com/p/SHORTCODE/"], "max_count": 1000 } - Output fields:
username,full_name,id,profile_pic_url,is_verified,is_private,liked_post,post_url,total_likes
How to Run
# Scrape likers from one or more posts
node skills/instagram-lead-scraper/scripts/instagram-lead-scraper.js --posts "https://www.instagram.com/p/ABC123/,https://www.instagram.com/p/DEF456/"
# With a campaign name
node skills/instagram-lead-scraper/scripts/instagram-lead-scraper.js --posts "https://www.instagram.com/p/ABC123/" --campaign "competitor_likers"
# Dry run (no DB insert)
node skills/instagram-lead-scraper/scripts/instagram-lead-scraper.js --posts "https://www.instagram.com/p/ABC123/" --dry-run
Environment Variables
APIFY_API_KEY— requiredINSFORGE_CONNECTION_STRING— required for DB insert
Database
Inserts into instagram_leads:
username,full_name,profile_url,profile_picture_urlinstagram_id,is_verified,source_photo_urlscraped_at,campaign_name- Unique constraint on
username— duplicates silently skipped