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

Export visible X followers and following rows with public profile details, source provenance, and bounded per-profile limits.

- **URL**: https://apify.com/fetch\_cat/x-followers-scraper.md
- **Developed by:** [Hanna Nosova](https://apify.com/fetch_cat) (community)
- **Categories:** Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.09 / 1,000 item processeds

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

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

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

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Twitter Followers Scraper — X follower and following data

Export visible public X follower and following relationships as clean, analysis-ready profile rows. This Twitter followers scraper helps creator marketers, social-listening teams, researchers, and lead-generation teams compare audiences, monitor growth, and discover public prospects.

### What you get

Each dataset row represents one visible relationship between a requested X profile and a follower or account it follows. Use the stable profile IDs and URLs to join exports over time or compare several audiences.

- Export **followers**, **following**, or both for each profile.
- Submit X handles or public `x.com` / `twitter.com` profile URLs.
- Keep source-profile provenance on every row.
- Get conservative public-bio email extraction when an address is explicitly present.
- Preserve rows already collected if another requested profile is restricted.

### Ready-to-run examples

- [Export GitHub following profiles on X](https://apify.com/fetch_cat/x-followers-scraper/examples/export-github-x-following)
- [Export NASA follower profiles on X](https://apify.com/fetch_cat/x-followers-scraper/examples/export-nasa-x-followers)
- [Compare GitHub followers and following on X](https://apify.com/fetch_cat/x-followers-scraper/examples/compare-github-x-relations)

### Input recipe

```json
{
  "handles": ["NASA"],
  "mode": "followers",
  "maxItems": 20,
  "includeProfileDetails": true
}
```

### Input recipes

Use these low-volume recipes to validate a public target before increasing the limit.

### Example inputs

#### Compare a creator audience

```json
{
  "handles": ["NASA", "NatGeo"],
  "mode": "followers",
  "maxItems": 50
}
```

#### Export Twitter following data from a profile URL

```json
{
  "profileUrls": ["https://x.com/github"],
  "mode": "following",
  "maxItems": 100,
  "includeProfileDetails": true
}
```

### Output fields

| Field | Description |
|---|---|
| `sourceInput`, `sourceHandle`, `sourceUserId`, `sourceProfileUrl` | Requested profile and source provenance. |
| `edgeType` | Relationship exported: `followers` or `following`. |
| `relatedUserId`, `relatedHandle`, `relatedName`, `relatedProfileUrl` | Visible related-profile identity and canonical X URL. |
| `bio`, `location`, `websiteUrl`, `email` | Public profile text, link, and conservatively extracted bio email. |
| `profileImageUrl`, `profileBannerUrl` | Visible public profile media URLs. |
| `followersCount`, `followingCount`, `listedCount`, `likesCount`, `postsCount`, `mediaCount` | Visible public account counts. |
| `createdAt`, `isVerified`, `isBlueVerified`, `isProtected` | Visible account metadata. |
| `scrapedAt` | UTC time at which the row was collected. |

### Input settings

| Input | Purpose |
|---|---|
| `handles` | One or more X handles, with or without `@`. |
| `profileUrls` | One or more public X or Twitter profile URLs. |
| `mode` | Choose `followers`, `following`, or `both`. |
| `maxItems` | Maximum visible rows per selected profile and relationship, from 1 to 500. |
| `includeProfileDetails` | Include visible public biography, counts, and profile metadata. |
| `failOnBlocked` | Fail the run if a requested relationship is inaccessible; otherwise retain other successful rows. |

### Pricing

This Actor charges a small start fee and per exported profile-edge row. Current rates and plan discounts are shown on the [X Followers Scraper Pricing tab](https://apify.com/fetch_cat/x-followers-scraper/pricing). Set a low `maxItems` first to confirm the requested public relationship and control spend.

### Who is it for?

- **Audience-overlap analysis:** export follower lists for public accounts and compare normalized profile IDs.
- **Creator and influencer research:** identify public accounts following relevant creators or brands.
- **Social listening:** collect a repeatable Twitter following scraper export for periodic change analysis.
- **Prospect discovery:** filter public profile fields such as bio, website, location, and public contact details.

### API usage

Node.js:

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('fetch_cat/x-followers-scraper').call({
  handles: ['NASA'],
  mode: 'followers',
  maxItems: 20,
});
console.log(run.defaultDatasetId);
```

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("fetch_cat/x-followers-scraper").call(run_input={
    "handles": ["NASA"], "mode": "followers", "maxItems": 20
})
print(run["defaultDatasetId"])
```

cURL:

```bash
curl -X POST "https://api.apify.com/v2/acts/fetch_cat~x-followers-scraper/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"handles":["NASA"],"mode":"followers","maxItems":20}'
```

Retrieve the default dataset from the completed run to download JSON, CSV, or Excel output.

### MCP and AI agents

Use [Apify MCP](https://mcp.apify.com?tools=fetch_cat/x-followers-scraper) to run this X follower data API from an AI agent.

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=fetch_cat/x-followers-scraper"
```

```json
{ "mcpServers": { "apify": { "url": "https://mcp.apify.com?tools=fetch_cat/x-followers-scraper" } } }
```

Example prompt: "Export up to 20 visible followers for NASA and summarize the public bio and audience fields."

### Tips and limits

- Start with a small `maxItems` to validate the target and relationship.
- Only data visible through X's public web experience for the configured managed session can be exported.
- Private accounts, DMs, engagement automation, customer-supplied cookies, and paid/private X data are out of scope.
- X may restrict a target or change public visibility. When possible, successful rows for other targets are preserved and the run summary identifies restricted work.

### FAQ

#### What data can I export with twitter followers scraper?

You can export visible public followers or following rows with stable identity, profile URLs, public profile text, selected counts, verification state, and source provenance. Optional public fields can be absent on an individual profile and are returned as `null` rather than guessed.

#### Can I run X Followers Scraper through an API, schedule, or MCP client?

Yes. Use the Apify API example above, schedule the Actor from Apify, or call it through the configured Apify MCP tool. All three use the same handle/profile-URL inputs and produce the same dataset shape.

#### How much does it cost to use X Followers Scraper?

The start fee and per-result prices are displayed on the Actor Pricing tab. Your total depends on the number of visible rows exported, so use `maxItems` to keep each run within your intended budget.

#### Can I export private followers or bring my own X cookie?

No. The Actor exports only public-web-visible rows using an operator-managed session. It does not accept customer cookies and cannot access private-account membership or DMs.

#### What happens when one profile is blocked or unavailable?

By default, the Actor preserves successful output from other targets and records the restricted profile in its run summary. Set `failOnBlocked` when your workflow needs the run to fail instead.

### Related Actors

- [X Profile Tweets Scraper](https://apify.com/fetch_cat/x-profile-tweets-scraper) — monitor public posts from the profiles found in your follower export.
- [X User Profile Scraper](https://apify.com/fetch_cat/x-user-profile-scraper) — enrich a known public X profile.
- [Instagram Mentions Scraper](https://apify.com/fetch_cat/instagram-mentions-scraper) — monitor public Instagram mentions alongside audience research.
- [Reddit Scraper](https://apify.com/fetch_cat/reddit-scraper) — collect public community conversations for social listening.
- [TikTok Profile Scraper](https://apify.com/fetch_cat/tiktok-profile-scraper) — compare public audience signals across social platforms.

### Support

Open an issue on the Actor page with the profile URL, relationship mode, a sanitized run link, and the expected public result. Do not include cookies or other credentials.

# Actor input Schema

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

Public X handles without @.

## `profileUrls` (type: `array`):

Public x.com or twitter.com profile URLs.

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

Choose followers, following, or both relationships.

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

Maximum visible relationship rows to export for each selected profile.

## `includeProfileDetails` (type: `boolean`):

Include public biography, counts, and profile metadata when visible.

## `failOnBlocked` (type: `boolean`):

Fail the run when a requested profile relationship is inaccessible.

## Actor input object example

```json
{
  "handles": [
    "NASA"
  ],
  "profileUrls": [],
  "mode": "followers",
  "maxItems": 20,
  "includeProfileDetails": true,
  "failOnBlocked": false
}
```

# Actor output Schema

## `overview` (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": [
        "NASA"
    ],
    "profileUrls": [],
    "mode": "followers",
    "maxItems": 20,
    "includeProfileDetails": true,
    "failOnBlocked": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("fetch_cat/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 = {
    "handles": ["NASA"],
    "profileUrls": [],
    "mode": "followers",
    "maxItems": 20,
    "includeProfileDetails": True,
    "failOnBlocked": False,
}

# Run the Actor and wait for it to finish
run = client.actor("fetch_cat/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 '{
  "handles": [
    "NASA"
  ],
  "profileUrls": [],
  "mode": "followers",
  "maxItems": 20,
  "includeProfileDetails": true,
  "failOnBlocked": false
}' |
apify call fetch_cat/x-followers-scraper --silent --output-dataset

```

## MCP server setup

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