# X (twitter) User Following (`datamagnet/x-twitter-user-following`) Actor

Get the accounts a Twitter/X user is following in a simple, readable list.

- **URL**: https://apify.com/datamagnet/x-twitter-user-following.md
- **Developed by:** [Datamagnet](https://apify.com/datamagnet) (community)
- **Categories:** Social media, Lead generation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 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/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 Following Scraper

Twitter Following Scraper is an easy way to collect the accounts followed by any Twitter/X username and turn that list into clean, readable data. It is built for marketers, researchers, recruiters, creators, and analysts who want to understand who a profile follows without manually scrolling through long following lists. Use it to extract Twitter/X following data, review profile details, and quickly build a structured list of accounts with usernames, display names, bios, follower counts, and more. If you need a simple Twitter/X following list scraper that saves time and delivers useful profile insights, this actor is designed for you.

### Key Features

- Extract the accounts followed by any Twitter/X username in a clean, organized list.
- Collect detailed profile information for each followed account, including bio, follower count, and profile image.
- Return verified status and other follow-related details to help you assess account quality at a glance.
- Automatically continue loading more results when the following list is long.
- Limit the total number of results so you only get the amount you need.
- Export data that is easy to review, filter, and use in spreadsheets or reports.
- Save time by turning a manual profile review task into a repeatable data collection workflow.

### Use Cases

#### Competitive Research
Brand and social media teams can see which accounts a competitor or public figure follows to better understand their interests, partnerships, and content influences. The returned usernames, display names, bios, and follower counts help you spot relevant creators, brands, and communities worth tracking.

#### Influencer Discovery
Agencies and marketers can use the following list to discover creators and niche voices connected to a target account. Profile bios, verified status, and profile image URLs make it easier to shortlist accounts for outreach, collaboration, or campaign planning.

#### Audience and Community Analysis
Analysts can review who a target user follows to identify the communities, topics, and personalities that shape their network. Fields like following count, follower count, and account URL help you compare account size and relevance across the list.

#### Lead Generation
Sales and partnership teams can build prospect lists from accounts followed by a relevant industry profile. By reviewing display names, bios, and account URLs, you can quickly identify potential leads, partners, or decision-makers without manual searching.

#### Brand Safety and Vetting
Teams responsible for brand reputation can check the accounts followed by a public profile before approving collaborations or sponsorships. Verified status, bio text, and follower metrics help you assess whether an account looks credible and aligned with your standards.

### Input

| Field | Type | Required | Description | Example |
|---|---|---:|---|---|
| Username | string | Yes | Enter the Twitter/X username whose following list you want to retrieve. | elonmusk |
| Max results | integer | No | The maximum number of followed accounts to return in total. | 10 |

### Output

| Field | Type | Description |
|---|---|---|
| Username | string | The account handle of the followed profile, so you can identify it quickly. |
| Display name | string | The public name shown on the profile, which is often easier to recognize than the handle. |
| User ID | string | The unique account identifier used to distinguish one profile from another. |
| Profile bio | string | The short description from the profile, useful for understanding who the account belongs to. |
| Verified status | boolean | Shows whether the account appears to be verified, which can help with trust and credibility checks. |
| Follower count | integer | How many followers the account has, giving you a sense of reach and popularity. |
| Following count | integer | How many accounts this profile follows, which can help you judge account behavior and scale. |
| Profile image URL | string | A link to the profile picture, useful for visual review or record matching. |
| Account URL | string | The public profile link for opening or sharing the account directly. |
| Any available follow-related metadata | string or object | Extra details that may help you understand the relationship or profile context better. |

### Sample Output

```json
{
  "user_id": "95092020",
  "screen_name": "jordanbpeterson",
  "description": "Best-Selling Author | Clinical Psychologist | #1 Education Podcast | Co-founder of @petersonacademy | Order my new book \"We Who Wrestle With God\" here:",
  "profile_image": "https://pbs.twimg.com/profile_images/1407056014776614923/TKBC60e1_normal.jpg",
  "statuses_count": 51538,
  "followers_count": 6178004,
  "friends_count": 1652,
  "website": "http://jordanbpeterson.com/books",
  "media_count": 7374,
  "name": "Dr Jordan B Peterson",
  "created_at": "Sun Dec 06 23:33:02 +0000 2009"
}
````

### How It Works

1. You enter the Twitter/X username whose following list you want to review.
2. You choose how many results you want, or keep the default limit for a quick run.
3. The actor gathers the followed accounts and keeps loading more until it reaches your requested total.
4. It organizes the results into a clean list with profile details that are easy to read.
5. You download or review the output and use it in your workflow, report, or spreadsheet.

### Getting Started

Getting started is simple and does not require coding knowledge. Click **Try for free**, enter the username you want to check, choose the maximum number of results if needed, and click **Run**. In a short time, you will get a clean list of followed accounts with useful profile details. Your results are available in **JSON, CSV, or Excel**, making it easy to review, share, or import into your own tools.

### Frequently Asked Questions

#### Do I need technical skills?

No. This actor is designed for business users, marketers, researchers, and anyone who wants a simple way to collect a Twitter/X following list. You only need to enter a username and start the run.

#### How fast does it run?

Speed depends on how many accounts you request and how long the following list is. Smaller lists usually finish quickly, while larger lists may take a bit longer because the actor keeps loading more results until it reaches your limit.

#### What format is the output?

You can work with the results in formats that are easy to use in spreadsheets and reporting tools, including JSON, CSV, and Excel. This makes it simple to sort by follower count, review bios, or share the data with your team.

#### Is this legal to use?

You should always use data responsibly and in line with applicable laws, platform rules, and your own internal policies. This actor is intended for legitimate research, analysis, and business workflows, and you are responsible for how you use the results.

#### Can I schedule it to run automatically?

Yes, you can set it up to run on a schedule if you want regular updates. That is useful for monitoring changes over time, refreshing prospect lists, or tracking the accounts followed by a target profile on an ongoing basis.

# Actor input Schema

## `screenname` (type: `string`):

Enter the Twitter/X username whose following list you want to retrieve.

## `max_results` (type: `integer`):

The maximum number of followed accounts to return in total.

## Actor input object example

```json
{
  "screenname": "elonmusk",
  "max_results": 10
}
```

# 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 = {
    "screenname": "elonmusk"
};

// Run the Actor and wait for it to finish
const run = await client.actor("datamagnet/x-twitter-user-following").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 = { "screenname": "elonmusk" }

# Run the Actor and wait for it to finish
run = client.actor("datamagnet/x-twitter-user-following").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 '{
  "screenname": "elonmusk"
}' |
apify call datamagnet/x-twitter-user-following --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "X (twitter) User Following",
        "description": "Get the accounts a Twitter/X user is following in a simple, readable list.",
        "version": "0.0",
        "x-build-id": "NuIbEIilNCdvZcg50"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/datamagnet~x-twitter-user-following/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-datamagnet-x-twitter-user-following",
                "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/datamagnet~x-twitter-user-following/runs": {
            "post": {
                "operationId": "runs-sync-datamagnet-x-twitter-user-following",
                "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/datamagnet~x-twitter-user-following/run-sync": {
            "post": {
                "operationId": "run-sync-datamagnet-x-twitter-user-following",
                "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": [
                    "screenname"
                ],
                "properties": {
                    "screenname": {
                        "title": "Username",
                        "type": "string",
                        "description": "Enter the Twitter/X username whose following list you want to retrieve."
                    },
                    "max_results": {
                        "title": "Max results",
                        "type": "integer",
                        "description": "The maximum number of followed accounts to return in total.",
                        "default": 10
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
