# sself instagram follower scraper (`sself/sself-instagram-follower-scraper`) Actor

- **URL**: https://apify.com/sself/sself-instagram-follower-scraper.md
- **Developed by:** [kio](https://apify.com/sself) (community)
- **Categories:** Social media
- **Stats:** 43 total users, 30 monthly users, 98.0% runs succeeded, NaN bookmarks
- **User rating**: 5.00 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/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Instagram Followers Scraper with Custom Filters 🚀

A powerful and lightweight Instagram scraping tool designed specifically for creators, beatmakers, and data analysts. This Actor allows you to extract follower lists while automatically filtering out unwanted accounts based on your personal stop-word list.

### 🌟 Key Features

- **Smart Filtering:** Automatically exclude accounts containing specific keywords (like `prod`, `beats`, `official`) in their usernames.
- **Customizable Limits:** Set your own extraction limit (minimum 50 followers).
- **Clean Output:** Generates a list containing only usernames—no messy metadata, just the data you need.
- **Fast & Reliable:** Powered by high-performance scraping engines to ensure stability.
- **User-Friendly Interface:** Toggle filters on/off and manage your stop-words directly from the Apify dashboard.

### 🛠 How to Use

1. **Profile URL:** Paste the full Instagram link of the target account (e.g., `https://instagram.com/username`).
2. **Max Items:** Choose how many followers you want to collect (starting from 50).
3. **Enable Filter:** Toggle the "Use Filter" checkbox to clean your list.
4. **Custom Stop-Words:** Enter the words you want to block, separated by commas (e.g., `shop, music, bot`).

### 📊 Input Parameters

| Field | Type | Description |
| :--- | :--- | :--- |
| `url` | String | The Instagram profile URL to scrape. |
| `max_items` | Integer | Maximum number of followers to retrieve (min: 50). |
| `use_filter` | Boolean | Whether to enable the username filtering logic. |
| `custom_stop_words` | String | Your list of blocked keywords (comma-separated). |

---

### 👨‍💻 Developed by sself

If you have any questions, feature requests, or need a custom scraping solution, feel free to reach out!

#### 📱 Contact Information:

* **Telegram:** [@lostinmyselfws](https://t.me/lostinmyselfws)
* **Instagram:** [@lostinmysllf](https://instagram.com/lostinmysllf)

---
> **Disclaimer:** This tool is for educational and research purposes only. Please ensure you comply with Instagram's Terms of Service and local data privacy laws.

# Actor input Schema

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

Select the engine: 'Budget' is cheaper ($0.65/1k), 'Official' is more stable.
## `api_token` (type: `string`):

Go to Apify settings -> API & Integrations, then copy your Personal API token.
## `url` (type: `string`):

Paste the link to the Instagram profile (e.g., https://www.instagram.com/mrbeast/)
## `max_items` (type: `integer`):

Number of followers to scrape (minimum 50).
## `use_filter` (type: `boolean`):

Activate username filtering based on stop-words.
## `custom_stop_words` (type: `string`):

Enter words separated by commas (e.g., beats, shotby, prodby).

## Actor input object example

```json
{
  "scraper_type": "budget",
  "url": "https://www.instagram.com/mrbeast/",
  "max_items": 50,
  "use_filter": false,
  "custom_stop_words": "prodby, shotby, beats"
}
````

# Actor output Schema

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

No description

# 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 = {
    "url": "https://www.instagram.com/mrbeast/",
    "custom_stop_words": "prodby, shotby, beats"
};

// Run the Actor and wait for it to finish
const run = await client.actor("sself/sself-instagram-follower-scraper").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 = {
    "url": "https://www.instagram.com/mrbeast/",
    "custom_stop_words": "prodby, shotby, beats",
}

# Run the Actor and wait for it to finish
run = client.actor("sself/sself-instagram-follower-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "url": "https://www.instagram.com/mrbeast/",
  "custom_stop_words": "prodby, shotby, beats"
}' |
apify call sself/sself-instagram-follower-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=sself/sself-instagram-follower-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "sself instagram follower scraper",
        "description": null,
        "version": "1.1",
        "x-build-id": "2haXzypDztMlriA5n"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/sself~sself-instagram-follower-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-sself-sself-instagram-follower-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/sself~sself-instagram-follower-scraper/runs": {
            "post": {
                "operationId": "runs-sync-sself-sself-instagram-follower-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/sself~sself-instagram-follower-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-sself-sself-instagram-follower-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "scraper_type",
                    "api_token",
                    "url"
                ],
                "properties": {
                    "scraper_type": {
                        "title": "Scraper Engine",
                        "enum": [
                            "budget",
                            "official"
                        ],
                        "type": "string",
                        "description": "Select the engine: 'Budget' is cheaper ($0.65/1k), 'Official' is more stable.",
                        "default": "budget"
                    },
                    "api_token": {
                        "title": "Apify API Token",
                        "type": "string",
                        "description": "Go to Apify settings -> API & Integrations, then copy your Personal API token."
                    },
                    "url": {
                        "title": "Instagram Profile URL",
                        "type": "string",
                        "description": "Paste the link to the Instagram profile (e.g., https://www.instagram.com/mrbeast/)"
                    },
                    "max_items": {
                        "title": "Max Items",
                        "minimum": 50,
                        "type": "integer",
                        "description": "Number of followers to scrape (minimum 50).",
                        "default": 50
                    },
                    "use_filter": {
                        "title": "Enable Filter",
                        "type": "boolean",
                        "description": "Activate username filtering based on stop-words.",
                        "default": false
                    },
                    "custom_stop_words": {
                        "title": "Filter list",
                        "type": "string",
                        "description": "Enter words separated by commas (e.g., beats, shotby, prodby)."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
