X (Twitter) Following Scraper avatar

X (Twitter) Following Scraper

Pricing

from $5.00 / 1,000 following founds

Go to Apify Store
X (Twitter) Following Scraper

X (Twitter) Following Scraper

Scrape the accounts a Twitter/X user follows — username, bio, follower counts, location. Provider-backed, cookieless, no login required.

Pricing

from $5.00 / 1,000 following founds

Rating

0.0

(0)

Developer

Khadin Akbar

Khadin Akbar

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

2

Monthly active users

6 days ago

Last modified

Share

X (Twitter) Following Scraper

This Apify Actor is built for analysts, operators, and AI agents that need the public accounts an X user follows. It accepts X usernames or full profile URLs, and each input handle produces one batch of following records. Each record represents one followed account and includes fields such as username, display name, bio, follower count, following count, verified status, blue verification status, location, website, account creation time, profile image URL, user ID, source username, and scrape timestamp. The outcome is structured dataset items ready for review, enrichment, export, or downstream automation.

Best fit and connected workflows

This Actor fits workflows centered on public X following graphs, including audience mapping, brand and creator research, lead discovery, and agent pipelines that need structured profile metadata.

It is useful when you want to:

  • turn one or more X profiles into a list of followed accounts,
  • collect profile-level fields for enrichment or filtering,
  • cap the number of rows per person or across multiple inputs,
  • run the Actor through Apify MCP as a focused workflow component.

Focused standalone workflow

X (Twitter) Following Scraper is designed as a focused standalone workflow.

Practical scenario

A market researcher starts with the public profile natgeo and wants a compact view of the accounts it follows. They provide the username and a per-user cap, then receive records with fields like username, display_name, bio, follower_count, location, and source_username. The researcher can then sort by follower count, scan bios for topical relevance, and pass selected rows into a CRM, spreadsheet, or another Apify Actor for enrichment.

Input fields

FieldTypePurposeExample
usernamesarray of stringsOne or more X handles. Accepts bare handles or profile URLs. Each handle becomes one batch of following records.["natgeo", "apify"]
startUrlsarray of objectsFull X profile URLs. The username is parsed from the path.[{ "url": "https://x.com/natgeo" }]
maxFollowingPerUserintegerMaximum following accounts to return per input handle. Pagination stops at this value.200
maxResultsintegerGlobal cap across all input handles.1000
authTokenstringBrowser fallback auth cookie value from a logged-in X session. Use the TWITTER_AUTH_TOKEN secret env var."<secret>"
csrfTokenstringBrowser fallback CSRF cookie value from a logged-in X session. Use the TWITTER_CSRF_TOKEN secret env var."<secret>"
proxyConfigurationobjectProxy settings passed to Apify Proxy. The default uses Apify Residential US.{ "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }

Focused JSON example

{
"usernames": ["natgeo", "apify"],
"maxFollowingPerUser": 50,
"maxResults": 100
}

Output fields

The dataset view exposes following-account records with these fields.

FieldTypeMeaning
usernamestringX handle of the followed account
display_namestringDisplay name on the profile
biostringProfile bio
follower_countnumberPublic follower count
following_countnumberPublic following count
verifiedbooleanVerified status
is_blue_verifiedbooleanBlue verification status
locationstringProfile location
websitestringWebsite listed on the profile
created_atstringProfile creation timestamp
profile_image_urlstringProfile image URL
user_idstringNumeric X user ID
source_usernamestringInput account whose following list produced the row
scraped_atstringISO timestamp for the scrape
datasetItemsstringDataset items API URL in the output contract
outputSummarystringOUTPUT record URL in the output contract
runSummarystringRUN_SUMMARY record URL in the output contract

Illustrative JSON record

{
"username": "nasa",
"display_name": "NASA",
"bio": "Explore the universe and discover our home planet.",
"follower_count": 98500000,
"following_count": 312,
"verified": false,
"is_blue_verified": true,
"location": "Washington, DC",
"website": "https://www.nasa.gov",
"created_at": "Wed Jul 15 00:00:00 +0000 2009",
"profile_image_url": "https://pbs.twimg.com/profile_images/...",
"user_id": "11348282",
"source_username": "natgeo",
"scraped_at": "2026-08-19T12:34:56.789Z"
}

How it works

This Actor uses a provider-backed primary path with SociaVault, which resolves user IDs and paginates the following list server-side. When that path is unavailable, it can use a Playwright browser fallback that reads X's private GraphQL API with the authToken and csrfToken cookies from a logged-in session.

The Actor runs with Apify Proxy by default, using the Residential group in the supplied contract. It stores results in the default dataset and also exposes output records in the key-value store via OUTPUT and RUN_SUMMARY.

Pricing

X (Twitter) Following Scraper uses Pay per event pricing on the Apify platform. The contract includes a small execution initialization event and a per-following-account event, plus standard platform usage. For current rates, open the live Pricing tab on the Apify Store page.

As an example, if a workflow returns one hundred following accounts, the final cost includes one actor start event, one hundred following-found events, and platform usage for the run.

Use with AI agents (MCP)

This Actor is available as an Apify Actor usable through Apify MCP. It is a structured tool for retrieving public X following lists and returning dataset rows that agents can read, filter, and pass into later steps.

Exact Actor identity: khadinakbar/x-following-scraper

Pull the public following list for natgeo, return the first 25 accounts, and include profile fields that help me group the rows by topic and verification status.

The output is provenance-friendly because each row includes source_username and scraped_at. Agents can use those fields to trace which input produced each record and when it was collected. Pagination is controlled by maxFollowingPerUser, while maxResults adds a global cap that is useful in multi-step agent pipelines. Because the Actor is pay-per-event, agents can keep scope tight by setting practical limits before launching a run.

Apify API example

const { ApifyClient } = require('apify-client');
const client = new ApifyClient({
token: process.env.APIFY_TOKEN,
});
async function main() {
const run = await client.actor('khadinakbar/x-following-scraper').call({
usernames: ['natgeo'],
maxFollowingPerUser: 25,
});
const dataset = client.dataset(run.defaultDatasetId);
const { items } = await dataset.listItems();
console.log(items);
}
main().catch((err) => {
console.error(err);
process.exit(1);
});

Best results and outcome guidance

Use clear handles or profile URLs as input, then set maxFollowingPerUser and maxResults to match the scope of the task. For agent pipelines, a smaller first pass helps identify which followed accounts are relevant before you expand the crawl. When you need stable proxy handling, keep the default proxy configuration from the Actor input.

For multi-handle jobs, think in batches: one handle equals one following list, and maxResults governs the total row count across all handles. If you are building an AI workflow, the combination of username, display_name, bio, follower_count, following_count, verified, is_blue_verified, location, and website is usually enough to support clustering, screening, and enrichment.

Focused standalone workflow

X (Twitter) Following Scraper is designed as a focused standalone workflow for the public input and structured output contract described above.

Design note

I found that the live output contract exposes three top-level output links - datasetItems, outputSummary, and runSummary - while the dataset view itself is centered on per-account following rows.

FAQ

Can I use this Actor with a plain X username?

Yes. The usernames input accepts bare handles such as natgeo.

Can I use profile URLs instead of handles?

Yes. The startUrls input accepts full x.com profile URLs and parses the username from the path.

What kind of record does one row represent?

One row represents one public account that the input user follows.

Can I cap the amount of data returned?

Yes. Use maxFollowingPerUser for each input handle and maxResults for a global cap across all handles.

Is this Actor usable through Apify MCP?

Yes. It is an Apify Actor designed for MCP-based automation and agent workflows.

What fields are available for downstream filtering?

The dataset view includes username, display_name, bio, follower_count, following_count, verified, is_blue_verified, location, website, created_at, profile_image_url, user_id, source_username, and scraped_at.

Responsible use

X and Twitter is a trademark of its owner. This independent Actor is not affiliated with, associated with, or endorsed by X and Twitter.

Use public profile data in ways that fit your legal, contractual, and organizational obligations.