# Twitter / X Profile & Followers Scraper (`brilliant_gum/twitter-followers-scraper`) Actor

Scrape rich profile data for any Twitter/X account — no login needed. Get followers and following lists with your own cookies. 30+ fields per profile including bio, emails, follower counts, verification status, and more.

- **URL**: https://apify.com/brilliant\_gum/twitter-followers-scraper.md
- **Developed by:** [Yuliia Kulakova](https://apify.com/brilliant_gum) (community)
- **Categories:** Social media, Lead generation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.10 / profile scraped

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## 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

## Twitter / X Profile & Followers Scraper

![Twitter / X Profile & Followers Scraper](https://i.imgur.com/xtwZAfD.jpg)

Extract rich profile data from any Twitter/X account in seconds — no login required. Scrape followers and following lists with your own cookies. 30+ fields per profile, built-in deduplication, and full support for bulk lookups.

---

### What You Get

Point it at any Twitter/X handle — plain username, @-handle, or full x.com URL. The actor returns everything Twitter exposes: follower counts, bio, location, website, join date, verification status, professional category, and more.

**Profile scraping works for everyone. No cookies. No login. Just results.**

---

### Features

#### 👤 Rich Profile Data (No Login Required)
30+ fields per account: username, display name, bio, location, website, follower/following/tweet/like/media counts, join date, Blue Verified status, professional type, business category, affiliate labels, profile photo, banner image, and more.

#### 📧 Bio Intelligence
Automatically extracts emails, URLs, @mentions, and hashtags from bio text — no regex needed on your end.

#### 👥 Followers & Following Lists
Scrape the full list of followers or accounts a user follows. Requires your own Twitter cookies — see instructions below.

#### 🔁 4 Scraping Modes
- **Profiles** — profile data only, no login needed
- **Followers** — list of followers (requires auth)
- **Following** — list of accounts they follow (requires auth)
- **Both** — followers + following in one run

#### 🔗 Flexible Input
Accepts any format: `elonmusk`, `@NASA`, `twitter.com/openai`, `https://x.com/ycombinator`. Mix formats freely in one run.

#### ✂️ Smart Deduplication
When scraping multiple accounts, duplicate users are automatically skipped.

---

### What You Need

#### For Profile Mode
**Nothing.** Just add handles and run. ✅

#### For Followers / Following Mode
You need to provide your own Twitter/X cookies — `ct0` and `auth_token`. These identify your session so the actor can access followers data.

**How to get your cookies (1 minute):**

1. Open **x.com** in your browser and make sure you're logged in
2. Press **F12** to open Developer Tools
3. Go to the **Application** tab (Chrome) or **Storage** tab (Firefox)
4. In the left panel: **Cookies → https://x.com**
5. Find `ct0` — copy the value
6. Find `auth_token` — copy the value
7. Paste both values into the actor input fields

> 💡 Both fields are marked **Secret** — they are never stored in logs or shared.

**Alternative: Auto-login**
Provide your `twitterUsername` and `twitterPassword` instead. The actor will log in automatically and save cookies for future runs.

---

### Example Input

#### Scrape profiles (no auth needed)
```json
{
    "handles": ["elonmusk", "NASA", "ycombinator"],
    "mode": "profiles"
}
````

#### Scrape followers with cookies

```json
{
    "handles": ["NASA"],
    "mode": "followers",
    "maxFollowers": 500,
    "ct0": "YOUR_CT0_COOKIE",
    "auth_token": "YOUR_AUTH_TOKEN_COOKIE"
}
```

#### Auto-login

```json
{
    "handles": ["openai"],
    "mode": "following",
    "maxFollowers": 200,
    "twitterUsername": "your_twitter_username",
    "twitterPassword": "your_twitter_password"
}
```

***

### Example Output

```json
{
    "id": "11348282",
    "username": "NASA",
    "displayName": "NASA",
    "bio": "Making the seemingly impossible, possible. ✨",
    "email": null,
    "location": "Pale Blue Dot",
    "website": "http://www.nasa.gov/",
    "followerCount": 91885890,
    "followingCount": 118,
    "tweetCount": 73961,
    "likeCount": 16757,
    "mediaCount": 27942,
    "verified": false,
    "isBlueVerified": true,
    "isProtected": false,
    "isProfessional": false,
    "joinDate": "2007-12-19T20:20:32.000Z",
    "profileImageUrl": "https://pbs.twimg.com/profile_images/..._400x400.jpg",
    "bannerUrl": "https://pbs.twimg.com/profile_banners/11348282/...",
    "twitterUrl": "https://x.com/NASA",
    "_type": "profile"
}
```

***

### Output Fields

| Field | Description |
|-------|-------------|
| `id` | Permanent numeric Twitter ID |
| `username` | Screen name (handle) |
| `displayName` | Full display name |
| `bio` | Profile bio text |
| `email` | Email extracted from bio (if present) |
| `bioLinks` | URLs extracted from bio |
| `bioMentions` | @mentions extracted from bio |
| `bioHashtags` | #hashtags extracted from bio |
| `location` | Location string |
| `website` | Website from profile |
| `followerCount` | Number of followers |
| `followingCount` | Number of accounts followed |
| `tweetCount` | Total tweets |
| `likeCount` | Total likes |
| `mediaCount` | Total media uploads |
| `listedCount` | Times added to lists |
| `verified` | Legacy verified badge |
| `isBlueVerified` | Blue checkmark (paid) |
| `isProtected` | Protected/private account |
| `isProfessional` | Has professional profile |
| `professionalType` | Creator / Business / etc. |
| `businessCategory` | Business category if set |
| `affiliateLabel` | Government, media, etc. label |
| `joinDate` | Account creation date (ISO) |
| `profileImageUrl` | High-res profile photo URL |
| `bannerUrl` | Profile banner URL |
| `twitterUrl` | Direct link to profile |
| `_type` | `profile`, `follower`, or `following` |

***

### Pricing

| Event | Price |
|-------|-------|
| Profile scraped | **$0.10** |
| Follower / Following scraped | **$0.015** |

> 💡 **Examples:** 100 profiles = **$10** · 1,000 followers = **$15** · 5,000 followers = **$75**

***

### Use Cases

🔍 **Lead Generation** — Find decision makers, extract emails from bios, build targeted prospect lists from any niche community.

📊 **Audience Research** — Analyze who follows your competitors, map their audience demographics, discover influencers.

🤖 **Bot Detection** — Check account age, tweet count, follower ratios, and verification status to flag suspicious accounts.

📈 **Influencer Discovery** — Bulk-lookup profiles, filter by follower count, Blue Verified status, or professional type.

🔗 **CRM Enrichment** — Enrich contact lists with Twitter data: bio, location, website, follower count.

***

### Tips

- **No cookies?** Use `profiles` mode — it always works without any authentication.
- **Cookies expire?** Auth tokens last ~30 days. Re-enter fresh cookies when they stop working.
- **Bulk scraping?** Add up to hundreds of handles in one run with built-in deduplication.
- **Rate limits?** The actor handles them automatically with smart retries and delays.

# Actor input Schema

## `handles` (type: `array`):

List of Twitter/X usernames to scrape. Accepts bare names (elonmusk), @-prefixed (@nasa), or full URLs (https://x.com/openai).

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

profiles — scrape rich profile data for each handle (no login required, always works). followers — scrape list of followers (requires auth). following — scrape accounts followed by the user (requires auth). both — followers + following lists.

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

Maximum number of followers or following accounts to return per handle. Only used in followers/following/both modes.

## `deduplication` (type: `boolean`):

Skip duplicate users when the same account appears in results for multiple handles.

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

Option A — Provide browser cookies directly. Extract from x.com: DevTools → Application → Cookies → x.com → ct0 value. Saved to KV store for reuse across runs.

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

Option A — Provide browser cookies directly. Extract from x.com: DevTools → Application → Cookies → x.com → auth\_token value. Saved to KV store for reuse across runs.

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

Option B — Twitter/X username or email for auto-login. The actor will log in automatically and save cookies to KV store for future runs. Used only if ct0/auth\_token are not provided or have expired.

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

Option B — Twitter/X password for auto-login. Stored only in actor input (not logged). Used with twitterUsername for automated login.

## Actor input object example

```json
{
  "handles": [
    "ycombinator",
    "elonmusk"
  ],
  "mode": "profiles",
  "maxFollowers": 100,
  "deduplication": true
}
```

# 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 = {
    "handles": [
        "ycombinator",
        "elonmusk"
    ]
};

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

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

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Twitter / X Profile & Followers Scraper",
        "description": "Scrape rich profile data for any Twitter/X account — no login needed. Get followers and following lists with your own cookies. 30+ fields per profile including bio, emails, follower counts, verification status, and more.",
        "version": "1.0",
        "x-build-id": "e8DszlId08IeuAHNk"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/brilliant_gum~twitter-followers-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-brilliant_gum-twitter-followers-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/brilliant_gum~twitter-followers-scraper/runs": {
            "post": {
                "operationId": "runs-sync-brilliant_gum-twitter-followers-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/brilliant_gum~twitter-followers-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-brilliant_gum-twitter-followers-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",
                "properties": {
                    "handles": {
                        "title": "Twitter/X Handles",
                        "type": "array",
                        "description": "List of Twitter/X usernames to scrape. Accepts bare names (elonmusk), @-prefixed (@nasa), or full URLs (https://x.com/openai).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "mode": {
                        "title": "Scrape Mode",
                        "enum": [
                            "profiles",
                            "followers",
                            "following",
                            "both"
                        ],
                        "type": "string",
                        "description": "profiles — scrape rich profile data for each handle (no login required, always works). followers — scrape list of followers (requires auth). following — scrape accounts followed by the user (requires auth). both — followers + following lists.",
                        "default": "profiles"
                    },
                    "maxFollowers": {
                        "title": "Max Followers/Following Per Account",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Maximum number of followers or following accounts to return per handle. Only used in followers/following/both modes.",
                        "default": 100
                    },
                    "deduplication": {
                        "title": "Deduplicate Results",
                        "type": "boolean",
                        "description": "Skip duplicate users when the same account appears in results for multiple handles.",
                        "default": true
                    },
                    "ct0": {
                        "title": "Cookie: ct0 (CSRF Token)",
                        "type": "string",
                        "description": "Option A — Provide browser cookies directly. Extract from x.com: DevTools → Application → Cookies → x.com → ct0 value. Saved to KV store for reuse across runs."
                    },
                    "auth_token": {
                        "title": "Cookie: auth_token",
                        "type": "string",
                        "description": "Option A — Provide browser cookies directly. Extract from x.com: DevTools → Application → Cookies → x.com → auth_token value. Saved to KV store for reuse across runs."
                    },
                    "twitterUsername": {
                        "title": "Twitter Username (for auto-login)",
                        "type": "string",
                        "description": "Option B — Twitter/X username or email for auto-login. The actor will log in automatically and save cookies to KV store for future runs. Used only if ct0/auth_token are not provided or have expired."
                    },
                    "twitterPassword": {
                        "title": "Twitter Password (for auto-login)",
                        "type": "string",
                        "description": "Option B — Twitter/X password for auto-login. Stored only in actor input (not logged). Used with twitterUsername for automated login."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
