# Twitter (X) Following Scraper | $0.05 / 1K (`api100/twitter-following-scraper`) Actor

Scrape Twitter (X) following lists for $0.05 per 1,000 profiles. Get usernames, bios and follower counts for influencer discovery and network analysis. Choose your profile limit and export results as JSON or CSV. Built on 8 years of web scraping experience.

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

## Pricing

$0.05 / 1,000 following profiles

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 (X) Following Scraper | $0.05 / 1K

Get the accounts a user follows on **X (Twitter)** for **$0.05 per 1,000 delivered profiles**. Collect usernames, bios, follower/following counts and available profile details in a structured Dataset, ready to export as **JSON or CSV**.

| At a glance | Details |
| --- | --- |
| Data | Following list with one account profile per row |
| Price | $0.05 per 1,000 delivered profiles; no Actor start fee |
| Run size | Choose your profile limit for one target account |
| Input | Numeric Twitter / X user ID |
| Export | JSON or CSV |

### What data can you collect?

- **Account identity:** user ID, username and display name.
- **Profile details:** bio, location, website, profile image and account creation date when available.
- **Profile statistics:** follower and following counts when available.
- **Status fields:** verification and profile-protection flags when available.

### What can you use it for?

- **Influencer discovery:** find relevant accounts followed by creators and industry leaders.
- **Competitor research:** explore the accounts a competitor follows and review their public profile details.
- **Network analysis:** use profile IDs and following relationships in your own analysis or data pipeline.

### How to scrape Twitter following

1. Enter the target account's **numeric Twitter / X user ID** in `user_id`.
2. Set `max_items` to the maximum number of following profiles you want (a positive integer), then start the Actor.
3. When the run succeeds, open **Output → Twitter / X following profiles** to view or export the data.

The input requires a numeric ID. An `@username` or profile URL is not accepted.

### Pricing

**$0.05 per 1,000 profiles delivered** ($0.00005 per profile), with no Actor start fee. For example, 100 profiles cost $0.005 and 10,000 profiles cost $0.50. The charge is based on profiles written to the Dataset, rather than the requested maximum. An empty Dataset produces no profile charge. Apify manages billing; no API100 Credits are required.

### Input

| Field | Type | Description |
| --- | --- | --- |
| `user_id` | String, required | Numeric X user ID, 1–25 digits. Usernames and profile URLs are not supported. |
| `max_items` | Integer, required | Maximum profiles to return, as a positive integer. The Console form defaults to 1,000. Your Apify budget may reduce the number returned. |

Replace the example ID with your target user's numeric ID:

```json
{
  "user_id": "123456789",
  "max_items": 10000
}
```

Run the Actor and open **Output → Twitter / X following profiles**. You can export the Dataset as JSON or CSV. When using the Apify API, send the same input JSON to the Actor's Run endpoint, wait for the run to finish, then retrieve its default Dataset. No custom `Idempotency-Key` header is required.

### Output

Each Dataset item represents one account followed by the target user. Duplicate profile IDs within one collection are removed.

| Fields | Meaning |
| --- | --- |
| `id`, `username`, `name` | Numeric ID, handle and display name |
| `description`, `location`, `url` | Bio, location and profile website |
| `profile_image_url` | Profile image URL |
| `created_at` | Account creation time; this is not the time the target followed the account |
| `followers_count`, `following_count` | Profile follower and following counts |
| `protected`, `verified`, `is_blue_verified` | Profile protection and verification flags |
| `_api100` | Delivery identifier and zero-based position used to track output |

Fields other than `id`, `username` and `name` may be unavailable or `null`. This illustrative item is not a real scraped profile:

```json
{
  "id": "1234567890",
  "username": "example_account",
  "name": "Example Account",
  "description": "Example profile",
  "location": null,
  "url": null,
  "profile_image_url": null,
  "created_at": null,
  "followers_count": 1200,
  "following_count": 300,
  "protected": false,
  "verified": false,
  "is_blue_verified": false,
  "_api100": {
    "delivery_id": "example-delivery-id",
    "position": 0
  }
}
```

### Limits and collection summary

**Following** means the accounts your target user follows. **Followers** means the accounts that follow your target user. This Actor collects the **following list** for one target per run; it does not collect the target's followers or tweets. It only returns data available to the service; it cannot provide access to otherwise inaccessible private accounts.

The **Collection summary** output links to `RUN_METADATA` in the run's key-value store. It records `delivered_count`, `complete`, `truncated`, collection timestamps and stop reasons. Reaching `max_items` may return a truncated list. `complete=true` means the upstream pagination contract reported its end (`completion_basis=upstream_contract`); it does not independently prove that X exposed every relationship.

Collection can take up to one hour, including queue time. Leave the default run timeout in place for large requests. Low budgets, unavailable accounts or upstream failures can limit or prevent results. An empty successful collection leaves the Dataset empty. If the budget permits no results, the summary reports `delivery_stop_reason=platform_budget` without starting collection.

Starting a new run creates a new collection and can incur a new charge. Downloading an existing run's Dataset does not start another collection.

### About API100

API100 is built by a team with **8 years of experience delivering web scraping services**. We focus on **stable, efficient and accurate data collection**, providing structured data for research, analysis and automation.

### Support

For help, open an issue on this Actor's Apify page and include the run ID. Do not include API tokens or account credentials.

# Actor input Schema

## `user_id` (type: `string`):

The target user's numeric X (Twitter) ID, as text. Returns the accounts this user follows. Enter an ID, not an @username or profile URL.

## `max_items` (type: `integer`):

Maximum number of followed-account profiles to collect (a positive integer). Your Apify run budget can further limit the number returned.

## Actor input object example

```json
{
  "user_id": "44196397",
  "max_items": 5
}
```

# Actor output Schema

## `profiles` (type: `string`):

One profile per account followed by the target X (Twitter) user, with identifiers, bio and available profile statistics.

## `metadata` (type: `string`):

Delivered count, completeness, collection timestamps and stop reason.

# 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 = {
    "user_id": "44196397",
    "max_items": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("api100/twitter-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 = {
    "user_id": "44196397",
    "max_items": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("api100/twitter-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 '{
  "user_id": "44196397",
  "max_items": 5
}' |
apify call api100/twitter-following-scraper --silent --output-dataset

```

## MCP server setup

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