# 🚀 Instagram Followers and Following Scrapper (`figue/instagram-followers-and-following-scrapper`) Actor

Extract Instagram followers and following data from any Instagram profile! High-speed bot extracts ~500 followers/min, supports proxies, simulates human behavior, and provides configurable pagination. Collect detailed user data efficiently—perfect for market research and audience insights!

- **URL**: https://apify.com/figue/instagram-followers-and-following-scrapper.md
- **Developed by:** [Figue](https://apify.com/figue) (community)
- **Categories:** Automation, Lead generation, Social media
- **Features:** Limited permissions
- **Stats:** 2,383 total users, 12 monthly users, 100.0% runs succeeded, 39 bookmarks
- **User rating**: 3.91 out of 5 stars

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Instagram Followers Scrapper

Extract followers and following data from any public Instagram account efficiently! This actor helps you gather information about Instagram users' connections, including usernames, full names, verification status, and profile pictures. Perfect for social media analysis, market research, and audience insights.

***

### Features

- **High-Speed Extraction**: Can extract approximately 1000 users per minute
- **Flexible Scraping**: Choose between scraping followers or following lists
- **Safety**: Bot is designed to be safe by simulating human behavior
- **User Data Extraction**: Get detailed information about Instagram users
- **Configurable Pagination**: Control how many users to fetch per request
- **Proxy Support**: Built-in support for Apify proxy to avoid rate limiting
- **Detailed User Information**: Collect comprehensive user data including:
  - Username
  - Full Name
  - Private/Public status
  - Verification status
  - Profile picture URL
  - User IDs

***

### How to Use

[![Instagram Followers Scrapper Tutorial](https://img.youtube.com/vi/2ATbr8Y4qrQ/0.jpg)](https://youtu.be/2ATbr8Y4qrQ)

Watch our quick tutorial video to learn how to use the Instagram Followers Scrapper effectively.

***

1. **Get Instagram Cookie**

   - Install the Chrome Extension "Cookie-Editor" [here](https://chromewebstore.google.com/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdm)
   - Log in to Instagram in your Chrome browser
   - Open the extension and export cookies as JSON
   - Copy the cookie data

2. **Input Configuration**

   - **Username**: Enter the Instagram username whose data you want to scrape
   - **List Type**: Choose whether to scrape "followers" or "following" list
   - **Cookies**: Paste your Instagram cookie data
   - **Maximum Pages**: Set how many pages to retrieve (1-200). If you want to scrape more than 200 pages, use pagination token.
   - **Count Per Page**: Choose how many users per page (12-25). ⚠️ Experimental if you want to speed up the process, use at your own risk. Default is 12.
   - **Pagination Token**: Optional next_max_id from Instagram response to continue from a specific point. If you want to scrape more than 100 pages, use this.
   - **Proxy Configuration**: Select your preferred proxy setup (RESIDENTIAL recommended)

3. **Start Scraping**
   - Click "Start" to begin the extraction process
   - Monitor progress in real-time
   - Download results in your preferred format (JSON, CSV, etc.)

***

### Output Example

The actor provides detailed information about each user. Here's an example of the data structure:

```json
{
    "pk": "13305307869",
    "pk_id": "13305307869",
    "id": "13305307869",
    "username": "example_user",
    "full_name": "Example User",
    "is_private": true,
    "profile_pic_url": "https://instagram.com/profile_pic.jpg",
    "is_verified": false,
    "has_anonymous_profile_picture": false,
    "account_badges": [],
    "latest_reel_media": 0,
    "next_max_id": "12"
}
```

#### Output Fields

- `pk`: Public key of the user
- `pk_id`: Public key id of the user
- `id`: Unique identifier of the user
- `username`: Instagram username
- `full_name`: User's display name
- `is_private`: Whether the account is private
- `profile_pic_url`: URL to user's profile picture
- `is_verified`: Whether the account is verified
- `has_anonymous_profile_picture`: If user has default profile picture
- `account_badges`: Any special badges on the account
- `latest_reel_media`: Timestamp of latest story/reel
- `next_max_id`: Pagination token, used for pagination

***

### Limitations

- Works only with public Instagram accounts
- Requires valid Instagram cookies for authentication
- Subject to Instagram's rate limiting

***

If you have any questions or need assistance, please contact us at <hello@figue.io>.

# Actor input Schema

## `username` (type: `string`):

Instagram username to scrape followers of

## `type` (type: `string`):

Choose whether to scrape followers or following list

## `maxPages` (type: `integer`):

Maximum number of pages to retrieve (1-200). If you to scrape more than 200 pages, use pagination token.

## `countPerPage` (type: `integer`):

Number of followers to retrieve per page (12-50). ⚠️ Experimental if you want to speed up the process, use at your own risk. Default is 12.

## `proxyCountryCode` (type: `string`):

Country code for the proxy

## `userAgent` (type: `string`):

User agent to use for the requests

## `paginationToken` (type: `string`):

Optional next_max_id from Instagram response to continue from a specific point. If you want to scrape more than 200 pages, use this.

## `cookies` (type: `array`):

Cookies are used to authorize the actor with Instagram

Follow these steps to get the cookies:

Install <a href="https://chromewebstore.google.com/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdm" target="_blank">Cookie-Editor chrome extension</a>
Login to your Instagram account
Click on the extension and export the Instagram cookies
Paste the copied contents here

<a href="https://youtu.be/2ATbr8Y4qrQ" target="_blank"><img src="https://www.youtube.com/s/desktop/66e817d4/img/favicon_32x32.png" width="16px"> Video - How to get cookies</a>

## `proxy` (type: `object`):

Proxy settings for making requests

## Actor input object example

```json
{
  "username": "figue_io",
  "type": "followers",
  "maxPages": 50,
  "countPerPage": 12,
  "proxyCountryCode": "FR",
  "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
  "cookies": [
    {
      "name": "sessionid",
      "value": "your-session-id",
      "domain": ".instagram.com",
      "path": "/"
    }
  ],
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "cookies": [
        {
            "name": "sessionid",
            "value": "your-session-id",
            "domain": ".instagram.com",
            "path": "/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("figue/instagram-followers-and-following-scrapper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "cookies": [{
            "name": "sessionid",
            "value": "your-session-id",
            "domain": ".instagram.com",
            "path": "/",
        }] }

# Run the Actor and wait for it to finish
run = client.actor("figue/instagram-followers-and-following-scrapper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "cookies": [
    {
      "name": "sessionid",
      "value": "your-session-id",
      "domain": ".instagram.com",
      "path": "/"
    }
  ]
}' |
apify call figue/instagram-followers-and-following-scrapper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,figue/instagram-followers-and-following-scrapper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/XLJHmaoDGuFYahmgm/builds/YJ4S3QNiOTxvKWqOe/openapi.json
