# X (Twitter) Followers Scraper (`coregent/x-followers-scraper`) Actor

Export the public followers and following lists of X (Twitter) accounts. One row per relationship with the account's handle, name, bio, location, website, follower counts and verification. No login, no cookies. Pay only for rows saved.

- **URL**: https://apify.com/coregent/x-followers-scraper.md
- **Developed by:** [Delowar Munna](https://apify.com/coregent) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.25 / 1,000 relationship 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

## X (Twitter) Followers Scraper

![X (Twitter) Followers Scraper](https://raw.githubusercontent.com/coregentdevspace/x-followers-scraper-assets/main/thumbnail-x-followers-scraper.png)

Export the public **followers** and **following** lists of X (Twitter) accounts. Every relationship comes back as one flat row: which account it belongs to, which list, and the listed account's handle, name, follower count, verification, location and join date, plus bio, following, tweet and media counts on the following list (or on both lists with **Include full profiles**) and the website on the following list. Export to JSON, CSV, Excel or Google Sheets, or call it from the API, Make, Zapier, n8n or an AI agent.

- **No login, no cookies, no X account.** Public data only.
- **Followers, following, or both** for up to 100 accounts per run, by handle or profile URL.
- **Fair limits.** Accounts are read in turns, a page each, so one huge account can't use up your total limit.
- **Full profiles when you need them.** X's followers list is short on detail; turn on **Include full profiles** to add each follower's bio and counts.
- **Audience filters:** minimum and maximum followers, verified only, has a website, exclude protected accounts.
- **Skip list** for accounts you already have, so repeat runs only pay for new rows.
- **Pay only for rows saved.** Duplicates, rows your filters or skip list drop, failed accounts and empty runs are free.
- **Clear status messages.** Every run says how many rows it saved, which accounts failed and why, and why it stopped.

### What can you do with it?

| Use case | What to enter | Typical setup |
|---|---|---|
| **Influencer and creator discovery** | A niche leader's handle, **Followers** | Minimum followers 1,000, maximum 100,000, export the Profiles view |
| **Competitor audience research** | Competitor handles, **Followers** | Compare who follows whom; the run summary counts accounts that follow several of them |
| **Lead generation** | Industry accounts, **Following** (who they follow) or **Followers** with full profiles | On the following list, only accounts with a website, then enrich the websites in your CRM |
| **Partnership and PR mapping** | A brand or journalist, **Following** | See whom they follow and engage with |
| **Account audits** | Your own handle, **Both** | Followers and following side by side, with counts and verification |
| **Research datasets** | A list of accounts, **Both** | Large one-off run, JSON into your network analysis |

### How to use it

1. Add one or more **X accounts** (handles such as `nasa`) or **Profile URLs**.
2. Pick the **List**: Followers, Following or Both.
3. Set **Maximum results (total)** and, for several accounts, **Maximum results per account and list**.
4. Optionally turn on **Include full profiles**, or add **filters** or a **skip list**.
5. Click **Start**, then download the results from the **Output** tab.

Run it with the defaults and it returns about 20 followers of `NASA`.

#### Accounts

Enter handles (`nasa`, `@nasa`) or profile URLs (`https://x.com/nasa`, `twitter.com/nasa/followers`). The same account entered twice runs once. Entries that aren't an X account (a tweet link, a search page, another website) are skipped and listed in the run log.

Protected accounts don't have public lists. They're reported in the status message without spending anything, and the run carries on. Accounts that don't exist or are suspended are reported the same way.

#### Followers, following or both

- **Followers**: accounts that follow the account you entered. Rows have `relation_type: "follower"`.
- **Following**: accounts the account you entered follows. Rows have `relation_type: "following"`.
- **Both**: both lists. Each list gets its own per-account limit.

#### What each list includes

X gives less detail in a followers list than in a following list:

| Field | Following list | Followers list | Followers list + **Include full profiles** |
|---|---|---|---|
| Handle, name, user ID, avatar, join date | ✓ | ✓ | ✓ |
| Follower count, verified, protected, location (when set) | ✓ | ✓ | ✓ |
| Bio, following, tweet and media counts | ✓ | — (`null`) | ✓ |
| Website (when set) | ✓ | — (`null`) | — (`null`): X gives no website for followers |

**Include full profiles** looks up each follower's full profile, one lookup per account. It's billed as a separate `profile-enrichment` event, once per account and only for rows that are saved. The following list already has these fields, so it needs no lookups. Every row has `target_full_profile`: `true` when the bio and counts were available, `false` when they weren't fetched.

#### Filters and skip list

| Option | What it keeps |
|---|---|
| Minimum followers / Maximum followers | Listed accounts within that follower range (0 = off) |
| Only verified accounts | Accounts with a verified badge |
| Only accounts with a website | Accounts that show a website on their profile. Following list only: X gives no website for followers, so the filter isn't applied to followers rows |
| Exclude protected accounts | Drops accounts whose tweets are protected |
| Skip these accounts | Leaves out user IDs, handles or profile URLs you list |

Filters work on each page after it's fetched. Rows they drop are never charged, but the pages still have to be read, so a strict filter makes a run take longer to reach your limit.

### Input examples

**Followers and following of two accounts, 5 per list, with full profiles** (the run behind the sample output below):

```json
{
    "sourceHandles": ["NASA", "SpaceX"],
    "relationType": "both",
    "maxResults": 20,
    "maxResultsPerSource": 5,
    "includeFullProfiles": true
}
```

**Followers of one account, default size:**

```json
{
    "sourceHandles": ["NASA"],
    "relationType": "followers",
    "maxResults": 20
}
```

**Followers and following of two accounts, 250 per list:**

```json
{
    "sourceHandles": ["NASA", "apify"],
    "relationType": "both",
    "maxResults": 1000,
    "maxResultsPerSource": 250
}
```

**Mid-sized creators who follow a niche leader, with bios (full profiles on):**

```json
{
    "sourceProfileUrls": ["https://x.com/apify"],
    "relationType": "followers",
    "maxResults": 500,
    "includeFullProfiles": true,
    "minFollowers": 1000,
    "maxFollowers": 100000
}
```

**A repeat run that skips accounts collected before:**

```json
{
    "sourceHandles": ["apify"],
    "maxResults": 500,
    "skipIds": ["44196397", "nasa", "https://x.com/someone"]
}
```

### Output

One row per relationship.

| Field | Description |
|---|---|
| `recordType` | Always `relationship_result` |
| `id` | Stable row ID: account, list and listed user |
| `relation_type` | `follower` or `following` |
| `source_username`, `source_user_id`, `source_input` | The account you entered |
| `target_user_id`, `target_username`, `target_name`, `target_url` | The listed account |
| `target_description` | Its bio *(see "What each list includes")* |
| `target_location`, `target_website` | As shown on its profile, when set (website: following list only) |
| `target_followers_count` | Its follower count |
| `target_following_count`, `target_tweet_count`, `target_media_count` | Its other counts *(see "What each list includes")* |
| `target_is_verified` | Verified badge |
| `target_is_protected` | Whether its tweets are protected |
| `target_created_at` | When it joined X (ISO, UTC) |
| `target_avatar_url` | Its profile picture |
| `target_full_profile` | `true` when bio and counts were available for this row |
| `provider`, `collected_at` | Data source and when the row was collected |

A value X doesn't provide is `null`, never a guess.

The **Output** tab has two views: **Overview** (who follows whom, with the key counts) and **Profiles** (the listed accounts' profile fields). Both views show the same dataset; they only pick different columns. The samples below are real rows from the first input example above, trimmed to each view's columns.

#### Overview

![Overview view](https://raw.githubusercontent.com/coregentdevspace/x-followers-scraper-assets/main/x-followers-scraper-output-overview-table-view.png)

A follower of @NASA, with **Include full profiles** on:

```json
{
    "source_username": "NASA",
    "relation_type": "follower",
    "target_avatar_url": "https://pbs.twimg.com/profile_images/1697749409851985920/HbrI04tM_normal.jpg",
    "target_url": "https://x.com/SpaceX",
    "target_username": "SpaceX",
    "target_name": "SpaceX",
    "target_followers_count": 41953937,
    "target_following_count": 128,
    "target_is_verified": true,
    "target_location": "Earth",
    "target_description": "SpaceX designs, manufactures and launches the world’s most advanced rockets and spacecraft"
}
```

#### Profiles

![Profiles view](https://raw.githubusercontent.com/coregentdevspace/x-followers-scraper-assets/main/x-followers-scraper-output-profiles-table-view.png)

An account @SpaceX follows (following rows include the website):

```json
{
    "target_username": "Erdayastronaut",
    "target_user_id": "3167257102",
    "target_name": "Everyday Astronaut",
    "target_description": "Professional rocket orientation specialist, explainer of flamey stuff and rocket chaser. Bringing space down to Earth for everyday people 🚀",
    "target_website": "http://astroawards.live",
    "target_location": "Iowa, United States",
    "target_followers_count": 2073226,
    "target_following_count": 647,
    "target_tweet_count": 27217,
    "target_media_count": 3860,
    "target_is_verified": true,
    "target_is_protected": false,
    "target_created_at": "2015-04-14T21:15:35.000Z",
    "target_full_profile": true,
    "source_username": "SpaceX",
    "relation_type": "following"
}
```

A run summary is saved in the key-value store as `RUN_SUMMARY`: accounts, pages read, rows found and saved, duplicates, skipped and filtered rows, accounts that follow more than one of your accounts, and, for each account and list, its status, rows saved, the count shown on the account, and why it stopped.

### Pricing

This Actor uses **pay-per-event** pricing: you pay one `relationship-result` event per unique row saved to the dataset. With **Include full profiles** on, you also pay one `profile-enrichment` event per follower whose full profile was looked up (once per account, saved rows only). Nothing else is charged:

- duplicate rows,
- rows dropped by your filters or skip list,
- accounts that fail, are protected or don't exist,
- the run summary, and runs that save nothing.

The prices are on the Actor's **Pricing** tab in the Apify Console, and it can differ by Apify plan. This README deliberately doesn't quote figures, so it never goes out of date. Set a **maximum cost per run** in the run options and the Actor stops saving before it would exceed it.

### Limits and good to know

- **Public data only.** Protected accounts, private lists and anything that needs a login aren't available.
- **Very long lists end early.** X stops serving a list after a certain depth, so for accounts with millions of followers you get the most recent part of the list, not all of it. The status message and `RUN_SUMMARY` say when a list ended before the account's own count.
- **Order** is X's order (usually most recent followers first).
- **No follow dates.** X doesn't show when someone followed an account, so there's no date filter.
- **Counts change.** Follower counts are a snapshot taken when the run happened.
- **Timeouts.** If a run gets close to its timeout, it stops by itself, keeps every row already saved and says so in the status message.

### FAQ

**Do I need an X account or API key?** No.

**Is scraping X legal?** This Actor collects publicly available data only. You're responsible for how you use it: follow X's terms, data-protection laws such as GDPR, and don't collect personal data without a lawful reason. This is an independent tool, not affiliated with X Corp.

**Can I get tweets too?** Not in this Actor. For tweets by keyword, hashtag or profile, use our [X Tweet Scraper](https://apify.com/coregent/x-tweet-scraper).

**Can I get only new followers each day?** Put the accounts you already have in **Skip these accounts** (IDs or handles), and only new rows are saved and charged.

**Can I use it from code or an AI agent?** Yes. Call it through the Apify API, the Apify client libraries or the Apify MCP server, and read the dataset as JSON.

### Feedback

Found a problem or need a field that's missing? Open an issue on the Actor's **Issues** tab and include the run link.

# Actor input Schema

## `sourceHandles` (type: `array`):

X handles whose followers or following lists you want, one per entry (e.g. <code>nasa</code>, <code>@apify</code>). Profile URLs work here too.

## `sourceProfileUrls` (type: `array`):

X profile URLs, one per entry (e.g. <code>https://x.com/nasa</code>, <code>twitter.com/apify/followers</code>). Combined with the accounts above; the same account given twice runs once.

## `relationType` (type: `string`):

<b>Followers</b>: accounts that follow each account. <b>Following</b>: accounts each account follows. <b>Both</b>: both lists; each row says which one it came from.

## `maxResults` (type: `integer`):

Stops the whole run after this many saved rows, across all accounts and lists.

## `maxResultsPerSource` (type: `integer`):

Stops each account's followers (or following) list after this many saved rows. Accounts are read in turns, a page each, so one huge account can't use up the total limit.

## `minFollowers` (type: `integer`):

Only keep listed accounts with at least this many followers. 0 = off.

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

Only keep listed accounts with at most this many followers (e.g. to find smaller creators). 0 = off.

## `onlyVerified` (type: `boolean`):

Only keep listed accounts with a verified badge.

## `onlyWithWebsite` (type: `boolean`):

Only keep listed accounts that show a website on their profile. Works on the following list only: X gives no website for followers.

## `excludeProtected` (type: `boolean`):

Drop listed accounts whose tweets are protected.

## `includeFullProfiles` (type: `boolean`):

X's followers list only gives each follower's handle, name, follower count, verified badge, location and join date. Turn this on to also get the bio, following count, tweet count and media count, with one extra lookup per follower, billed as a separate profile-enrichment event once per account. The following list already includes these fields, so it needs no extra lookups. X gives no website for followers, even with this on.

## `skipIds` (type: `array`):

User IDs, handles or profile URLs to leave out, e.g. accounts you already collected in an earlier run. Skipped rows are never charged.

## `debug` (type: `boolean`):

Saves the first raw provider pages to the key-value store (DEBUG_RAW_PAGE_1…3) for troubleshooting.

## Actor input object example

```json
{
  "sourceHandles": [
    "NASA"
  ],
  "relationType": "followers",
  "maxResults": 20,
  "maxResultsPerSource": 1000,
  "minFollowers": 0,
  "maxFollowers": 0,
  "onlyVerified": false,
  "onlyWithWebsite": false,
  "excludeProtected": false,
  "includeFullProfiles": false,
  "skipIds": [],
  "debug": false
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `profiles` (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 = {
    "sourceHandles": [
        "NASA"
    ],
    "relationType": "followers",
    "maxResults": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("coregent/x-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 = {
    "sourceHandles": ["NASA"],
    "relationType": "followers",
    "maxResults": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("coregent/x-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 '{
  "sourceHandles": [
    "NASA"
  ],
  "relationType": "followers",
  "maxResults": 20
}' |
apify call coregent/x-followers-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,coregent/x-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/xcpt6y8Kqu7LwQ3kF/builds/pWxc8xBsG7CBd6vke/openapi.json
