Instagram Followers and Following Scraper avatar
Instagram Followers and Following Scraper
Under maintenance

Pricing

$1.00 / 1,000 results

Go to Apify Store
Instagram Followers and Following Scraper

Instagram Followers and Following Scraper

Under maintenance

Advanced Instagram scraper for followers and following lists with anti-detection features. Selectively collect user data, use rotating proxies, and randomized delays to avoid rate limits. Perfect for social media research, influencer analysis, and audience insights.

Pricing

$1.00 / 1,000 results

Rating

0.0

(0)

Developer

Coladeu

Coladeu

Maintained by Community

Actor stats

1

Bookmarked

7

Total users

4

Monthly active users

7 days ago

Last modified

Share

Instagram Followers & Following Scraper

A powerful and stealthy Apify actor for scraping Instagram followers and following lists with advanced anti-detection features.

Apify Actor Node.js

🎯 Features

  • Dual scraping modes: Scrape followers or following users
  • Selective data collection: Choose exactly which user data to collect
  • Anti-detection measures: Randomized delays, proxy rotation, human-like behavior
  • Rate limit protection: Smart delays between requests to avoid Instagram blocks
  • Real-time progress: Data saved immediately as it's collected
  • Configurable limits: Set maximum pages per user to control data volume
  • Professional proxy support: Built-in Apify proxy system with country selection

🚀 Quick Start

  1. Get Instagram Cookies: Log into Instagram in your browser and copy session cookies
  2. Configure Actor: Set target usernames and scraping preferences
  3. Run & Collect: Actor automatically handles pagination and proxy rotation

📋 Input Parameters

🎯 Target Selection

ParameterTypeRequiredDescription
usernamesArrayList of Instagram usernames to scrape
scrapeTypeString"followers" or "following" (default: "followers")

⚙️ Data Collection Options

Choose which user data fields to collect:

  • collectUserId - User ID (default: true)
  • collectUsername - Username (default: true)
  • collectFullName - Display name (default: true)
  • collectProfilePicUrl - Profile picture URL (default: true)
  • collectIsPrivate - Private account status (default: true)
  • collectIsVerified - Verification status (default: true)
  • collectHasAnonymousProfilePic - Anonymous picture flag (default: false)
  • collectProfilePicId - Profile picture ID (default: false)

🌐 Proxy Configuration

Configure proxy settings to avoid Instagram rate limits. For best results, select proxies from your account's country or nearby regions.

ParameterTypeRequiredDescription
proxyConfigurationObjectApify proxy settings (default: {"useApifyProxy": true})

⏱️ Performance Settings

ParameterTypeRequiredDefaultDescription
delaySecondsInteger5Base delay between requests (randomized 5-10s)
maxPagesInteger100Maximum pages per user (0 = unlimited)

🔐 Authentication

ParameterTypeRequiredDescription
cookiesStringInstagram session cookies
userAgentStringCustom User-Agent string

📤 Output Format

Individual User Records

{
"id": "123456789",
"username": "john_doe",
"full_name": "John Doe",
"profile_pic_url": "https://...",
"is_private": false,
"is_verified": true,
"scraped_for_username": "target_user",
"scraped_at": "2025-01-09T12:00:00.000Z"
}

Summary Record

{
"username": "target_user",
"totalFollowers": 1247,
"scrapeType": "followers",
"fieldsCollected": ["id", "username", "full_name"],
"maxPages": 100,
"scraping_completed": true,
"scraped_at": "2025-01-09T12:00:00.000Z"
}

🛠️ Usage Examples

Basic Followers Scraping

{
"usernames": ["instagram", "cristiano"],
"cookies": "ds_user_id=...;sessionid=...",
"scrapeType": "followers"
}

Minimal Data Collection

{
"usernames": ["target_user"],
"cookies": "ds_user_id=...;sessionid=...",
"collectUserId": false,
"collectUsername": true,
"collectFullName": false,
"collectProfilePicUrl": false,
"collectIsPrivate": false,
"collectIsVerified": false
}

High-Speed Scraping

{
"usernames": ["target_user"],
"cookies": "ds_user_id=...;sessionid=...",
"delaySeconds": 1,
"maxPages": 10
}

Following Analysis

{
"usernames": ["influencer"],
"cookies": "ds_user_id=...;sessionid=...",
"scrapeType": "following",
"collectIsVerified": true
}

🔑 Getting Instagram Cookies

  1. Open Chrome/Edge browser
  2. Go to instagram.com and log in
  3. Open Developer Tools (F12)
  4. Go to Application/Storage → Cookies → https://www.instagram.com
  5. Copy the cookie string containing:
    • ds_user_id
    • sessionid
    • csrftoken
    • Other Instagram cookies

⚡ Performance & Best Practices

Rate Limiting

  • Use proxies: Always enable proxy configuration
  • Random delays: Actor automatically randomizes delays
  • Start small: Test with maxPages: 5 first
  • Monitor usage: Check Instagram account status

Data Volume Control

  • Selective collection: Only collect needed fields
  • Page limits: Set maxPages based on your needs
  • Batch processing: Process multiple users in one run

Proxy Configuration

  • Residential proxies: Best for Instagram scraping
  • Local regions: Use proxies from target account's country
  • Rotation: Let Apify handle automatic IP rotation

🐛 Troubleshooting

Authentication Issues

❌ Instagram cookies are invalid or expired

Solution: Get fresh cookies from a logged-in browser session

Rate Limiting

HTTP 429: Too Many Requests

Solution:

  • Increase delaySeconds
  • Enable/use better proxies
  • Reduce maxPages

Empty Results

Possible causes:

  • Private account (followers/following not visible)
  • Account doesn't exist
  • Cookies expired

Proxy Issues

Solutions:

  • Try different proxy groups
  • Use residential proxies
  • Check proxy status in Apify console

📊 Dataset Structure

The actor creates two types of records:

  1. User Records: One per scraped user (saved immediately)
  2. Summary Record: One per target username (saved at completion)

Filtering Results

Find verified users:

dataset.filter(record => record.is_verified === true)

Count private accounts:

dataset.filter(record => record.is_private === true).length

Group by username:

const grouped = dataset.reduce((acc, record) => {
acc[record.scraped_for_username] = acc[record.scraped_for_username] || [];
acc[record.scraped_for_username].push(record);
return acc;
}, {});

🔒 Security & Ethics

  • Respect Instagram's Terms of Service
  • Use for legitimate research/analysis only
  • Don't overload Instagram's servers
  • Respect user privacy
  • Comply with local laws

📞 Support

📄 License

MIT License - see LICENSE file for details.


Built with ❤️ using Apify SDK