# Twitter (X) Followers Scraper ✅ | $0.10 / 1K | Up to 5M (`x_guru/twitter-follower-scraper`) Actor

From $0.10 / 1K  ✅ | Scrape Twitter/X followers and following by username or user ID with fast batched output. Collect up to 5,000,000 results per target in clean dataset format for lead generation, audience research, and competitor analysis.

- **URL**: https://apify.com/x\_guru/twitter-follower-scraper.md
- **Developed by:** [Hundevmode Labs](https://apify.com/x_guru) (community)
- **Categories:** Lead generation, Automation, Social media
- **Stats:** 273 total users, 36 monthly users, 100.0% runs succeeded, 18 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.10 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Twitter (X) Follower Scraper | $0.1 / 1K + Usage | Followers & Following | Up to 5,000,000

Need a high-scale **Twitter/X follower scraper** that can collect both **followers** and **following** fast, stream results in real time, and stay cost-efficient for large runs? This actor is built for exactly that.

It supports scraping by:

- Twitter/X username list
- Twitter/X user ID list

And lets you collect:

- Followers
- Following (friends)
- Usernames or numeric user IDs as output

### Why this Twitter follower scraper

- **Low cost:** `$0.1 per 1,000 users` (plus Apify platform usage)
- **High-volume support:** up to **5,000,000 followers** and **5,000,000 following** per request
- **Live streamed output:** results appear in dataset progressively, not only after run completion
- **Scalable backend architecture:** queue + token rotation + multi-worker execution
- **Flexible targeting:** usernames and/or user IDs in the same run
- **Built for growth teams:** outreach, market intelligence, social graph analytics

### Best use cases

This X/Twitter scraper is ideal for:

- Lead generation pipelines
- Influencer discovery and vetting
- Competitor audience analysis
- Account expansion and lookalike discovery
- Social graph enrichment for CRM/data warehouse
- Marketing audience research and segmentation

### Input fields (Apify form)

Core fields:

- `Twitter Usernames (without @)`: array of usernames
- `Twitter User IDs (optional)`: array of numeric user IDs
- `Max Followers To Collect`: per-target limit
- `Max Following To Collect`: per-target limit
- `Include Followers`: enable followers collection
- `Include Following`: enable following collection
- `Result Format`: `usernames` or `ids`

### Plan limits

- **Free users:** up to **1,000 total results per run**
- **Paying users:** up to **5,000,000** per relation per target

### Example input (JSON)

```json
{
  "userNameList": ["elonmusk", "nasa"],
  "userIdList": ["44196397"],
  "maxFollowers": 250000,
  "maxFollowing": 250000,
  "getFollowers": true,
  "getFollowing": true,
  "outputMode": "usernames"
}
```

### Output format

Each scraped user is pushed as a separate dataset item (streaming):

```json
{
  "status": "item",
  "job_id": "...",
  "query_type": "username",
  "query_value": "elonmusk",
  "relation": "followers",
  "mode": "usernames",
  "value": "some_follower_username"
}
```

Where:

- `relation` is `followers` or `following`
- `mode` is `usernames` or `ids`
- `value` is the scraped username or user ID

### Run summary

After run completion, summary is stored in key-value store record `SUMMARY`.
It includes:

- total jobs
- completed jobs
- failed jobs
- emitted item count
- estimated price
- failed job details (`failed_jobs`)

Note: failed jobs are stored in `SUMMARY`, not as dataset result items.

### Pricing

Pricing model is configured as pay-per-event:

- `apify-default-dataset-item = 0.0001 USD`
- equivalent to **$0.1 / 1,000 scraped users**

Additional Apify platform usage charges (compute/storage/etc.) apply.

### Performance notes

- Results are streamed in batches from backend and pushed continuously.
- Large requests (hundreds of thousands to millions) are supported by worker queue and token rotation.
- Throughput depends on token quality, target account size, and current X API/rate-limit behavior.

### Troubleshooting

#### 1. No items returned

Check:

- input usernames/IDs are valid
- target accounts are public/accessible
- backend URL and API key are correct

#### 2. Job failures in `SUMMARY.failed_jobs`

Usually caused by temporary network/rate-limit issues or invalid tokens on backend.

#### 3. Slow completion on very large runs

Expected for high limits. Keep streaming enabled and consume dataset progressively.

### Related actor: Twitter/X Email Scraper

If you also need email extraction from Twitter profiles, use your email actor:

- [Twitter/X Email Scraper (mSaHt2tt3Z7Fcwf0o)](https://console.apify.com/actors/mSaHt2tt3Z7Fcwf0o/source)

### SEO keywords

twitter follower scraper, twitter following scraper, x follower scraper, x.com follower scraper, scrape twitter followers, scrape twitter following, twitter audience scraper, social graph scraper, twitter lead generation, x influencer scraper, twitter usernames scraper, twitter user id scraper, twitter data extraction, twitter followers api alternative

# Actor input Schema

## `userNameList` (type: `array`):

Enter one or multiple Twitter/X usernames, e.g. elonmusk.

## `userIdList` (type: `array`):

Optional: add numeric Twitter/X user IDs if you already have them.

## `maxFollowers` (type: `integer`):

Maximum number of followers to collect per target account. Free users are limited to 1,000 total results per run.

## `maxFollowing` (type: `integer`):

Maximum number of following accounts to collect per target account. Free users are limited to 1,000 total results per run.

## `getFollowers` (type: `boolean`):

Turn on to collect follower lists.

## `getFollowing` (type: `boolean`):

Turn on to collect following lists.

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

Choose whether dataset values are usernames or numeric user IDs.

## Actor input object example

```json
{
  "userNameList": [
    "elonmusk"
  ],
  "maxFollowers": 200,
  "maxFollowing": 200,
  "getFollowers": true,
  "getFollowing": true,
  "outputMode": "ids"
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "userNameList": [
        "elonmusk"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("x_guru/twitter-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 = { "userNameList": ["elonmusk"] }

# Run the Actor and wait for it to finish
run = client.actor("x_guru/twitter-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 '{
  "userNameList": [
    "elonmusk"
  ]
}' |
apify call x_guru/twitter-follower-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/bIYXeMcKISYGnHhBG/builds/Ag9Xc7KcvlP9CtIbr/openapi.json
