# Twitter Followers Scraper - Followers and Following (`toolzerhub/twitter-followers-scraper`) Actor

Export the followers of any public Twitter (X) account, the accounts it follows, or both. Each row is a full profile: handle, name, bio, follower counts, verification and join date. Add many accounts per run and cap the total.

- **URL**: https://apify.com/toolzerhub/twitter-followers-scraper.md
- **Developed by:** [ToolzerHub](https://apify.com/toolzerhub) (community)
- **Categories:** Social media, Marketing, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.54 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

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

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

## How to integrate an Actor?

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

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

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

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

# README

## Twitter Followers Scraper — Followers and Following

Export the followers of any public Twitter (X) account, the accounts it follows, or both. Each row is a profile: handle, name, bio, location, follower and post counts, verification and join date. Add as many accounts as you like and cap the total.

### Input

| Field | Type | Default | What it does |
|---|---|---|---|
| **`handles`** | list of text | — | **Required.** Handles, with or without the @, or profile links, mixed freely. |
| **`relation`** | `followers` / `followings` / `both` | `followers` | Which list to export for each account. `both` reads followers first, then the accounts it follows. |
| **`maxItems`** | integer | `100` | Caps the whole run, across every account and list. `0` means no limit. |

```json
{
  "handles": ["NASA"],
  "relation": "followings",
  "maxItems": 100
}
```

### Output

One row per account in the list.

| Field | What it holds |
|---|---|
| **`id`**, **`handle`**, **`name`**, **`url`** | Who they are, and their profile link |
| **`description`**, **`location`**, **`website`** | Bio, location text, profile link |
| **`followers_count`**, **`following_count`**, **`posts_count`**, **`media_count`**, **`likes_count`** | The five counters |
| **`is_blue_verified`**, **`is_verified`**, **`verified_type`**, **`protected`** | Verification and privacy flags |
| **`created_at`** | When the account was created, ISO 8601 UTC |
| **`input_handle`** | The account whose list this row came from |
| **`relation`** | `followers` or `followings` — which list the row is from |

```json
{
  "id": "1498375883328995332",
  "handle": "astro_hathaway",
  "name": "Jack Hathaway",
  "description": "NASA Astronaut, Group 23 🪰 Naval Aviator & Test Pilot",
  "location": "International Space Station",
  "website": "https://t.co/0uQ1hKagtM",
  "avatar_url": "https://pbs.twimg.com/profile_images/1498376410951561226/LHVhOck4_normal.jpg",
  "banner_url": "https://pbs.twimg.com/profile_banners/1498375883328995332/1665759869",
  "followers_count": 3451,
  "following_count": 74,
  "posts_count": 31,
  "media_count": 4,
  "likes_count": 1,
  "is_verified": false,
  "is_blue_verified": null,
  "verified_type": null,
  "protected": false,
  "created_at": "2022-02-28T19:14:03.000Z",
  "pinned_post_ids": null,
  "is_automated": null,
  "url": "https://x.com/astro_hathaway",
  "input_handle": "NASA",
  "relation": "followings"
}
```

### Pricing

You pay for each account saved. A account that is skipped is never charged.

| Plan | Per 1,000 accounts |
|---|---|
| Free | $1.00 |
| Bronze | $0.85 |
| Silver | $0.69 |
| Gold and above | $0.54 |

Each run also carries a $0.00005 start charge. The Free plan covers the first 50 rows you save with this Actor; after that you need a paid plan.

Work out the cost before you set `maxItems` to `0` on a big account. A million followers is 1,000 times the per-1,000 price in the table.

### Questions

**What order do the accounts come in?**
X decides, and it is neither alphabetical nor by size. Do not build on it — sort the dataset afterwards if you need an order.

**Why are `pinned_post_ids` and `is_automated` null on these rows?**
List rows are lighter than a full profile. Those two fields, and sometimes `is_blue_verified`, come back null here. Run the [Twitter Profile Scraper](https://apify.com/toolzerhub/twitter-profile-scraper) on the handles you care about to fill them in.

**Can I get both lists for several accounts in one dataset?**
Yes. Set `relation` to `both`. `input_handle` says whose list a row belongs to and `relation` says which list, so one table holds everything.

**Is the follower list complete?**
It is what X lists at the time of the run. A big account keeps changing while you read it, so treat one run as a snapshot, not a census.

**Why fewer rows than the account's `followers_count`?**
X's counter and X's list do not always agree. The run saves what X lists and ends when X stops returning pages, so expect the two to be close, not equal.

**What if the handle does not exist?**
No rows, no charge, and a line in the log. Other handles in the list still run.

### Related Actors

| Actor | Use it when |
|---|---|
| [Twitter Profile Scraper](https://apify.com/toolzerhub/twitter-profile-scraper) | You need full profile records, or the About panel, for these accounts |
| [Twitter Tweets Scraper](https://apify.com/toolzerhub/twitter-tweets-scraper) | You want what the accounts in the list have posted |
| [Twitter Scraper](https://apify.com/toolzerhub/twitter-scraper) | You want to find accounts by what they tweet |

### Support

Questions, bugs, or feature requests: **contact@toolzerhub.com**

Browse the rest: [apify.com/toolzerhub](https://apify.com/toolzerhub)

# Actor input Schema

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

One or more accounts. A handle (`openai`), an @handle (`@openai`) or a profile link (`https://x.com/openai`) all work, and one list can mix them.

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

Which accounts to list for each profile.

## `maxItems` (type: `integer`):

Most rows to save in this run, across everything in the list. Set 0 for no limit.

## Actor input object example

```json
{
  "handles": [
    "openai"
  ],
  "relation": "followers",
  "maxItems": 50
}
```

# Actor output Schema

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

Every record collected during this run

# 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": [
        "openai"
    ],
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("toolzerhub/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": ["openai"],
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("toolzerhub/twitter-followers-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "handles": [
    "openai"
  ],
  "maxItems": 50
}' |
apify call toolzerhub/twitter-followers-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,toolzerhub/twitter-followers-scraper"
        }
    }
}
```

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

## OpenAPI specification

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