# Twitter Follower & Following Scraper (X) (`crustapi/twitter-follower-following-scraper`) Actor

Export the full follower or following list from any X (Twitter) profile. Get clean data for each account: handle, name, bio, website, location, follower counts, and verified status. Bring your own X login. You only pay for accounts we return.

- **URL**: https://apify.com/crustapi/twitter-follower-following-scraper.md
- **Developed by:** [Crust](https://apify.com/crustapi) (community)
- **Categories:** Social media, Lead generation, Automation
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.50 / 1,000 account returneds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Follower & Following Scraper (X)

Get the full follower or following list from any X (Twitter) profile. You get clean lead data for each account: handle, name, bio, email, website, location, follower and following counts, and verified status.

This actor uses your own X login, so it can reach the full lists that tools without a login cannot.

### Please read first: the risk is yours

This tool logs in as you, using your own account. X does not allow automated scraping. If X notices, your account can be limited or even shut down for good. That risk falls on you, not on us.

So please:

- **Use a spare account, not your main one.** Never use an account you care about.
- **Keep runs small at first.** Big pulls raise the risk.
- **Stop if X starts slowing you down.** Give the account a long rest.

**This tool only reads.** It never posts, follows, likes, or changes anything on your account.

### What you can do

- Pull **followers** of any public profile.
- Pull who a profile is **following**.
- Pull **verified followers only** for higher quality leads.
- Run many profiles in one go. Paste handles or full links.

### What you get back

One row per account, ready for outreach:

| Field | Meaning |
| --- | --- |
| username | The @handle |
| fullName | Display name |
| bioEmail | An email the person put in their public bio, if any (we never pull private emails) |
| website | Link in the bio |
| location | The location they typed on their profile |
| followersCount / followingCount | Account size |
| isVerified | Has a blue check |
| bio | Profile bio text |
| source | The profile this account came from |
| relation | followers, following, or verified_followers |

There are two table views: **Accounts** (everything) and **Bio emails** (a short view for outreach).

### You bring your own X login

You paste your own X login (your cookies) into one field. The actor acts as you, so it sees the same lists you can see when logged in. We use it only for the run and never store it.

#### How to get your cookies in one click

1. Add the free **Cookie-Editor** browser add-on ([get it here](https://cookie-editor.com)).
2. Log in to X with a spare account, then open **x.com**.
3. Click the **Cookie-Editor** icon, press **Export → As JSON**, and paste into the **Your X cookies** field.

That is it. One paste.

#### You only do this once (reuse for weeks)

You do **not** need to keep the tab open, stay on the page, or paste again each run. The cookies work on their own from our side, even after you close the browser. Save your settings as a Task and run it again any day.

The one thing that breaks them is clicking **Log out** on that account, or X ending the session for safety (this can happen after a few weeks, or sooner under heavy use). **So do not log out.** If the cookies ever stop working, just export fresh ones the same way.

(If you prefer, you can also paste a raw cookie string that includes `auth_token` and `ct0`. The actor reads either one.)

### How long it takes

- The first 15 to 20 seconds of each run is the actor starting up.
- After that, plan for about 10,000 to 15,000 accounts per hour. X sets this speed, not us, and we keep it steady to protect your account.
- Small pulls are quick: a few hundred in well under a minute, a few thousand in a few minutes.
- Very large accounts can run for hours. Raise the run timeout for those, or pull in batches.

### Pricing

You pay **per account we return**. If a profile has no results, you pay nothing. There is no start fee.

### Notes

- A home-country residential proxy is on by default. It lowers the risk to your account but cannot remove it. Pick a country that matches your account.
- Big lists take time. X limits how fast one login can read, so plan on roughly 10,000 to 15,000 accounts per hour. We go slowly on purpose so your account stays healthy.
- Very large accounts (hundreds of thousands or millions of followers) will not finish in one run. Raise the run timeout, pull in batches across runs, and expect X to stop handing over more after a while. This is an X limit, not a bug, and it is the same for every tool that uses one login.
- The Verified followers only mode is the fastest way to get high quality leads from a huge account, since that list is much smaller.

# Actor input Schema

## `profiles` (type: `array`):

The X (Twitter) accounts whose followers or following you want. One per line. Any of these work:
• A handle: elonmusk
• A handle with @: @naval
• A profile link: https://x.com/levelsio
## `relation` (type: `string`):

Get the people who follow each profile, the people each profile follows, or only the verified followers.
## `maxPerProfile` (type: `integer`):

Stop after this many accounts for each profile. X limits how fast one login can read, so big lists take time (figure on roughly 10,000 to 15,000 per hour). For very large accounts, raise the run timeout.
## `cookie` (type: `string`):

Cookie-Editor is a free browser add-on: [get it here](https://cookie-editor.com) (opens in a new tab). When you press Export, choose **As JSON**, then paste it here. Use a spare account, not your main one. We use your cookies only for this run and never store them.
## `proxy` (type: `object`):

A residential proxy is used automatically to protect your account. Advanced.

## Actor input object example

```json
{
  "profiles": [
    "nasa",
    "stripe"
  ],
  "relation": "followers",
  "maxPerProfile": 1000,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
````

# Actor output Schema

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

Each row has the handle, name, bio, bio email, website, location, follower and following counts, verified status, and the profile it came from.

# 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 = {
    "profiles": [
        "elonmusk",
        "@naval",
        "https://x.com/levelsio"
    ],
    "maxPerProfile": 1000
};

// Run the Actor and wait for it to finish
const run = await client.actor("crustapi/twitter-follower-following-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 = {
    "profiles": [
        "elonmusk",
        "@naval",
        "https://x.com/levelsio",
    ],
    "maxPerProfile": 1000,
}

# Run the Actor and wait for it to finish
run = client.actor("crustapi/twitter-follower-following-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 '{
  "profiles": [
    "elonmusk",
    "@naval",
    "https://x.com/levelsio"
  ],
  "maxPerProfile": 1000
}' |
apify call crustapi/twitter-follower-following-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Twitter Follower & Following Scraper (X)",
        "description": "Export the full follower or following list from any X (Twitter) profile. Get clean data for each account: handle, name, bio, website, location, follower counts, and verified status. Bring your own X login. You only pay for accounts we return.",
        "version": "0.0",
        "x-build-id": "tLg2kaZ8IFBgtPbCV"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/crustapi~twitter-follower-following-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-crustapi-twitter-follower-following-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/crustapi~twitter-follower-following-scraper/runs": {
            "post": {
                "operationId": "runs-sync-crustapi-twitter-follower-following-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/crustapi~twitter-follower-following-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-crustapi-twitter-follower-following-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": [
                    "profiles",
                    "cookie"
                ],
                "properties": {
                    "profiles": {
                        "title": "X profiles",
                        "type": "array",
                        "description": "The X (Twitter) accounts whose followers or following you want. One per line. Any of these work:\n• A handle: elonmusk\n• A handle with @: @naval\n• A profile link: https://x.com/levelsio",
                        "items": {
                            "type": "string"
                        }
                    },
                    "relation": {
                        "title": "What to get",
                        "enum": [
                            "followers",
                            "following",
                            "verified_followers"
                        ],
                        "type": "string",
                        "description": "Get the people who follow each profile, the people each profile follows, or only the verified followers.",
                        "default": "followers"
                    },
                    "maxPerProfile": {
                        "title": "Max accounts per profile",
                        "minimum": 1,
                        "maximum": 50000,
                        "type": "integer",
                        "description": "Stop after this many accounts for each profile. X limits how fast one login can read, so big lists take time (figure on roughly 10,000 to 15,000 per hour). For very large accounts, raise the run timeout."
                    },
                    "cookie": {
                        "title": "Your X cookies (download Cookie-Editor → open X logged in → open the extension → Export → As JSON → paste here)",
                        "type": "string",
                        "description": "Cookie-Editor is a free browser add-on: [get it here](https://cookie-editor.com) (opens in a new tab). When you press Export, choose **As JSON**, then paste it here. Use a spare account, not your main one. We use your cookies only for this run and never store them."
                    },
                    "proxy": {
                        "title": "Proxy",
                        "type": "object",
                        "description": "A residential proxy is used automatically to protect your account. Advanced.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
