# Twitter User Following Scraper (`socialdataapi/twitter-user-following-scraper`) Actor

Twitter User Following Scraper lists the accounts an X (Twitter) user follows from handles or profile URLs: name, handle, bio, location, website, follower and post counts, verification, join date. Needs your own auth cookies. Export to JSON, CSV or Excel, or use the API.

- **URL**: https://apify.com/socialdataapi/twitter-user-following-scraper.md
- **Developed by:** [Social Data API](https://apify.com/socialdataapi) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.67 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 User Following Scraper — Followed Accounts, Bios and Counts

Twitter User Following Scraper returns the accounts any X (Twitter) user follows, one row per followed account: name, handle, bio, location, website link, profile picture, banner, follower, following and post counts, blue check, verification type and join date. Every response is structured JSON — ready to pass directly to an LLM, index into a vector store, or feed an audience research pipeline. **Your cookies are stored as encrypted secret inputs and never written to the log.** Start with one handle, then map the networks of every account you track.

![Twitter User Following Scraper lists the accounts a user follows with name, bio, followers and location as JSON](https://api.apify.com/v2/key-value-stores/WYkyEfqs10huyXYxr/records/e-twitter-following-hero.webp)

***

### What data can I extract with Twitter User Following Scraper?

Using this X (Twitter) Following API, you will be able to extract the following X (Twitter) followed-account data:

| 🧑 Source handle (whose list it is) | 📛 Display name | 🏷️ Handle | 🆔 Account ID |
|---|---|---|---|
| 📝 Bio | 📍 Location (if set) | 🔗 Website link (t.co, if set) | 🖼️ Profile picture |
| 🌅 Banner image (if set) | ⬛ Picture shape (circle or square) | 👥 Follower count | ➡️ Following count |
| 🐦 Post count | 🎞️ Media post count | ❤️ Likes given | 📋 Public lists it appears on |
| 💙 Blue check | ✅ Verification type (Business, Government) | 📅 Join date | 🌐 Profile link |
| 📊 Normal followers | ⚡ Fast followers (as reported by X) | | |

***

### How to use Twitter User Following Scraper

Marketers, researchers and analysts use this twitter following scraper to answer "who does a Twitter account follow?" for every handle they paste into one run.

**Copy to your AI assistant:**

```text
Twitter User Following Scraper (Apify Actor ID: socialdataapi/twitter-user-following-scraper, https://apify.com/socialdataapi/twitter-user-following-scraper) is an Apify Actor that returns the accounts an X (Twitter) user follows as structured JSON, one row per followed account: display name, handle, account ID, bio, location, website link, profile picture, follower count, following count, post count, blue check, verification type and join date, plus the source handle. It needs the user's own X session cookies (auth_token and ct0 from a browser logged in to x.com), because X shows following lists only to logged-in users - use it for audience research, influencer discovery, or giving an AI agent the network around an account. Inputs: startUrls (array of strings, X handles with or without @ or profile URLs on x.com or twitter.com; duplicates are scraped once), maxResults (integer 1-10000, followed accounts per handle, default 10), authToken (string, required, secret: the auth_token cookie), ct0 (string, required, secret: the ct0 cookie from the same session), proxyConfiguration (object, optional, off by default). Each saved followed account is one row and one row_result event; a handle that does not exist adds no row and is not charged. Expired or invalid cookies stop the run with an error status and nothing is charged. X limits how many requests one account can make in 15 minutes; when that limit is hit the run waits for the reset if it is close, otherwise it stops cleanly and says how long to wait.
```

#### Twitter User Following Scraper MCP Server: use these Actors from ChatGPT, Claude or Cursor

Point your AI assistant at the Apify MCP server and it can read X following lists on its own: the server starts with this Actor already available as a tool, so your agent can run it with call-actor and then read the followed accounts from the result. No glue code, no scraping logic in your prompts.

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=socialdataapi/twitter-user-following-scraper"
```

#### Step by step

1. [Create a free Apify account](https://console.apify.com/sign-up).
2. Open [Twitter User Following Scraper](https://apify.com/socialdataapi/twitter-user-following-scraper) in the Apify Store.
3. Enter the X handle (with or without @) or profile URL, one per line, and paste your two cookies.
4. Click **Start** (or send your API request).
5. Download or stream your results in JSON, CSV or Excel.

#### How to get your X auth_token and ct0 cookies

1. Log in to x.com in Chrome, Edge or Firefox (a secondary X account is a good idea).
2. Open DevTools (F12) → **Application** (Firefox: **Storage**) → **Cookies** → `https://x.com`.
3. Copy the value of `auth_token` into the auth_token field.
4. Copy the value of `ct0` from the same list into the ct0 field.
5. If a run stops with a cookie message, log in again and copy fresh values; cookies stop working when you log out.

#### How to scale Twitter User Following Scraper to bulk

To scrape twitter following list data for many accounts, paste the whole list of handles or profile URLs into the handles field (or use **Bulk edit**); a handle that appears twice is scraped once. Handles are processed one after another, each up to your limit of followed accounts, with a 1-second pause between pages. X limits requests per account in 15-minute windows, so for very large jobs split the list over several scheduled runs, or loop over batches through the Apify API. Billing has one event: each saved followed account is one row_result event.

***

### ✨ Features

Twitter User Following Scraper fetches clean, structured followed accounts from X (Twitter) ⚡. It's ideal for audience research, influencer discovery, competitor network mapping, or as the twitter following extractor step in a larger pipeline.

It extracts, per followed account:

- **Display name and handle** – who the account is, plus a direct profile link
- **Follower, following and post counts** – reach and activity of every account on the list
- **Bio, location and website link** – the account's own description and links
- **Blue check and verification type** – including Business and Government organisation badges
- **Join date** – when the account was created
- **Source handle** – which of your input handles the row belongs to, so several lists can share one table

⚡ Cookie problems stop the run at once with a clear message instead of retrying, and handles that don't exist are skipped without a charge.

***

### Use cases 💡

- **Influencer marketer** — find who top creators follow and shortlist accounts by follower count.
- **Competitor analyst** — compare which media, tools and people rival brands follow.
- **Researcher** — export twitter following list data for network maps of public figures.
- **Sales team** — list the businesses a target account follows, with website links.
- **AI agent builder** — feed bios and counts of followed accounts into a RAG index.

Building an AI agent? [Connect Twitter User Following Scraper over MCP](#mcp-integration-for-ai-agents) and let it call the actor on its own.

***

### Why choose this actor?

- **163 followed accounts from 3 handles in 8 seconds.** A recorded run read the following lists of three handles (one given as a www.x.com link), up to 75 accounts each, and saved 163 rows in 8.0 seconds on a direct connection.
- **The numbers behind each account.** A recorded row for NASA Hubble, followed by @nasa, came back with 8,901,104 followers, 44 following, 8,464 posts, 3,135 media posts, a blue check and the Government verification type.
- **22 fields per row, up to 10,000 accounts per handle.** Every row keeps the same 22-field layout, and each handle can return up to 10,000 followed accounts.

***

### ⬇️ Input

![Twitter User Following Scraper input: handles or profile URLs, X session cookies and max accounts per handle](https://api.apify.com/v2/key-value-stores/WYkyEfqs10huyXYxr/records/e-twitter-following-input.webp)

The Actor accepts a list of X (Twitter) handles or profile URLs (required) and your two X session cookies, auth_token and ct0 (both required, stored as encrypted secret inputs). The number of followed accounts per handle and the proxy settings are optional.

| Parameter | Required | Type | Description | Example value |
|---|---|---|---|---|
| startUrls | Yes | array of strings | X handles with or without @, or profile URLs on x.com / twitter.com (www. and mobile. links work). Duplicates are scraped once; links that are not a profile are skipped. | `["jordanbpeterson", "https://x.com/Bitcoin"]` |
| maxResults | No | integer | Followed accounts to save per handle, 1–10000. Default 10. | `75` |
| authToken | Yes | string (secret) | The auth_token cookie from a browser logged in to x.com. Encrypted, never logged. | your auth_token value |
| ct0 | Yes | string (secret) | The ct0 cookie from the same browser session. Encrypted, never logged. | your ct0 value |
| proxyConfiguration | No | object | Apify Proxy or your own proxy URLs. Off by default; used only if X blocks the connection. | `{ "useApifyProxy": false }` |

#### Free plan limits

Users on the Apify free plan can fetch up to 20 followed accounts per run (all handles together) and 200 followed accounts per month. When the limit is reached, the run finishes successfully with a status message explaining the limit. Upgrade to any paid Apify plan to remove these limits.

#### Example input

A recorded run scraped these three handles and saved 163 rows in 8.0 seconds (it also had three entries that were skipped before any request: a repeated handle, a non-profile link and an invalid handle). The two cookie fields hold your own values; never share them.

```json
{
  "startUrls": [
    "jordanbpeterson",
    "https://x.com/Bitcoin",
    "https://www.x.com/nasa"
  ],
  "maxResults": 75,
  "authToken": "",
  "ct0": "",
  "proxyConfiguration": { "useApifyProxy": false }
}
```

***

### ⬆️ Output

![Twitter User Following Scraper output: one JSON row per followed account with followers_count, description and is_blue_verified](https://api.apify.com/v2/key-value-stores/WYkyEfqs10huyXYxr/records/e-twitter-following-output.webp)

Every followed account is one typed, normalized JSON item with the same 22 keys on every run, and you can export the dataset as JSON (default), CSV or Excel. There are no summary or error rows: a handle that can't be read simply adds no row.

#### Example output

A recorded row (values as returned by X):

```json
{
  "username": "nasa",
  "id": "14091091",
  "profile_banner_url": "https://pbs.twimg.com/profile_banners/14091091/1669391293",
  "profile_image_url_https": "https://pbs.twimg.com/profile_images/3468011581/efb985f24af0a814a722457a768f3cc5_normal.jpeg",
  "name": "Hubble",
  "screen_name": "NASAHubble",
  "is_blue_verified": true,
  "verified_type": "Government",
  "profile_image_shape": "Square",
  "description": "The official X account for the NASA Hubble Space Telescope, managed and operated by NASA's Goddard Space Flight Center.",
  "url": "https://t.co/3bfzzswzV0",
  "location": "Goddard Space Flight Center",
  "followers_count": 8901104,
  "friends_count": 44,
  "favourites_count": 1243,
  "media_count": 3135,
  "statuses_count": 8464,
  "listed_count": 15231,
  "fast_followers_count": 0,
  "normal_followers_count": 8901104,
  "created_at": "Thu Mar 06 20:15:02 +0000 2008",
  "profile_url": "https://x.com/NASAHubble"
}
```

The website link is X's t.co short link, which opens the site. The fast followers value has been 0 in every row seen so far; it is passed on exactly as X reports it.

***

### How does it work?

X shows following lists only to logged-in users, so the Actor uses your own X session cookies, the same way your browser does. For each handle it looks up the account, then reads the following list page by page with plain HTTP requests (no browser) and a 1-second pause between pages, until it reaches your limit or the end of the list.

There is no proxy by default; if X blocks the connection, the run switches to a proxy and retries. If your cookies are expired or invalid, the run stops at the first request with a clear message and never retries through proxies, which keeps your account safe. If X's per-account request limit is reached, the run waits for the reset when it is a few minutes away, otherwise it stops cleanly. It returns only what your logged-in account can see, and every row follows one fixed schema.

***

### How do you integrate Twitter User Following Scraper into your stack?

It works with what you already use: the Apify REST API from any language, the Apify MCP server for AI agents, and no-code tools.

#### MCP integration for AI agents

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=socialdataapi/twitter-user-following-scraper"
```

This connects your agent to the Apify MCP server with Twitter User Following Scraper already registered as a tool your agent can call directly with call-actor. Sign in with your Apify account when asked. The command is for Claude Code; Cursor and Windsurf connect to the same URL in their MCP settings.

#### No-code tools (n8n, Make, LangChain)

**n8n:** add the Apify node, choose **Run an Actor** and pick this Actor with your handles and cookies. Its dataset items flow into the next node, such as Google Sheets, for a twitter following list to CSV workflow.

**Make:** add the Apify app's **Run an Actor** module with this Actor and your input, then **Get Dataset Items** to pass the followed accounts on. Map the handle and follower count into any later module.

**LangChain:** install `langchain-apify` and load a finished run's dataset with `ApifyDatasetLoader`. Map the bio to the document content and the handle and follower count to metadata.

***

### Is it legal to scrape X (Twitter) data?

Collecting data that is visible to a logged-in X user is generally legal, but X's terms restrict automated access, and you use your own account at your own risk. This Actor returns only what your logged-in account can see: names, handles, bios and counts of the accounts on a following list, with no private messages or protected content you cannot already view. Names, bios and pictures of individuals are personal data under the GDPR, so while scraping data that is public is generally permissible, storing and using it must comply with local data-protection law. This is not legal advice. Consult legal counsel if your use case involves bulk storage of personal data.

***

### Frequently asked questions

#### What fields does Twitter User Following Scraper return?

The top five are the display name, handle, follower count, bio and verification badge of every followed account. See [the data fields section](#what-data-can-i-extract-with-twitter-user-following-scraper) for the full list.

#### Does Twitter User Following Scraper require an X (Twitter) account or login?

Yes — you need your own X session cookies, auth_token and ct0, because X shows following lists only to logged-in users. Both fields are encrypted secret inputs: Apify stores them encrypted, only this Actor's run can read them, and the Actor never writes them to the log. A secondary X account is recommended.

#### How fast does Twitter User Following Scraper run?

A recorded run saved 163 followed accounts from 3 handles in 8.0 seconds on a direct connection; one page of about 70 accounts took under a second. Data is fetched live on every run, not cached.

#### What happens if an account is private or doesn't exist?

A handle that doesn't exist, was suspended or was deleted adds no row, is not charged and is logged as "account not found"; links that are not a profile and repeated handles are skipped before any request. If X returns no following list for an account (for example a protected account your account does not follow), that handle adds no rows and the log says so. In your code, compare the handles you sent with the source handle values in the dataset to find the ones that returned nothing.

#### Can I scrape multiple X (Twitter) following lists at once?

Yes. Put every handle or profile URL in the handles list; they run one after another in one run, each up to your per-handle limit.

#### Does Twitter User Following Scraper work with Claude, ChatGPT, and other AI agent tools?

Yes — it is available as an MCP tool through the Apify MCP server. Register it in Claude Code with `claude mcp add --transport http apify "https://mcp.apify.com?tools=socialdataapi/twitter-user-following-scraper"`; Cursor and Windsurf use the same URL. Any agent that can call an HTTP endpoint can use the Apify REST API directly, which also makes it a twitter followings api for your own code.

#### Does Twitter User Following Scraper return data in a format LLMs can use directly?

Yes. Typed, normalized JSON with consistent field names. No HTML parsing, no selectors. Pass it straight to an LLM, index it into a vector store, or feed it to an agent tool — no transformation step.

#### What happens when X (Twitter) changes its layout or updates its anti-bot system?

The actor is maintained. When X changes, the actor is updated — your calls keep returning the same JSON schema with no changes on your end.

#### Can I use Twitter User Following Scraper without managing proxies or browser infrastructure?

Yes. The run needs no browser, starts without a proxy and switches to a proxy on its own only if X blocks the connection. You send one request with your cookies and get structured JSON back, as a ready-made x following scraper and x following list export with no proxy accounts or headless browser to set up.

#### Which X (Twitter) followed-account fields work best for AI training data and RAG indexing?

For RAG: the bio, display name and location. For training data: the follower, following, post and media counts, the blue check and the verification type. All fields are typed primitives — strings, integers, booleans — no normalization needed.

***

### Your feedback

Found a bug or missing a field? Let us know. Include the input you used (without your cookie values) and the run's log so the problem can be reproduced.

# Actor input Schema

## `startUrls` (type: `array`):

One X (Twitter) account per line: a handle with or without @, or the profile URL.

Handles
• jordanbpeterson
• @elonmusk

Profile URLs
• https://x.com/jordanbpeterson
• https://twitter.com/elonmusk
• https://www.x.com/BillGates

Mix both styles. Duplicates are scraped once; links that are not a profile (e.g. /i/… or /search) are skipped with a note in the log.

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

Stop after this many followed accounts for each handle (1–10000). Default 10.

Free plan: up to 20 followed accounts per run (all handles together) and 200 per month; paid plans have no limit.

## `authToken` (type: `string`):

Required. The value of the auth_token cookie from a browser where you are logged in to x.com. It is stored encrypted and never written to the log.

How to get it

1. Log in to x.com in your browser.
2. Open DevTools > Application (Storage in Firefox) > Cookies > https://x.com.
3. Copy the value of auth_token and paste it here.

Cookies expire when you log out or after some time. If the run stops with a cookie message, copy fresh ones. Tip: use a secondary X account.

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

Required. The value of the ct0 cookie from the same logged-in x.com browser session as auth_token. It is stored encrypted and never written to the log.

How to get it

1. Open DevTools > Application (Storage in Firefox) > Cookies > https://x.com.
2. Copy the value of ct0 and paste it here.

Both cookies must come from the same session.

## `proxyConfiguration` (type: `object`):

Off by default. Turn on Apify Proxy (or add your own proxy URLs) only if runs get blocked. A proxy does not help with expired cookies or X's per-account request limit.

## Actor input object example

```json
{
  "startUrls": [
    "jordanbpeterson"
  ],
  "maxResults": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (type: `string`):

All saved followed accounts in the default view.

# 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 = {
    "startUrls": [
        "jordanbpeterson"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("socialdataapi/twitter-user-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 = {
    "startUrls": ["jordanbpeterson"],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("socialdataapi/twitter-user-following-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 '{
  "startUrls": [
    "jordanbpeterson"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call socialdataapi/twitter-user-following-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,socialdataapi/twitter-user-following-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/fJkvzfiYK0hhViQYy/builds/zuMDCUDCgJQlYLc9u/openapi.json
