Twitter/X Followers Scraper avatar
Twitter/X Followers Scraper

Pricing

$19.00/month + usage

Go to Apify Store
Twitter/X Followers Scraper

Twitter/X Followers Scraper

Developed by

XTCodeTech

XTCodeTech

Maintained by Community

Scrape any Twitter/X account’s Followers, Following, and Verified Followers via a single API call, it outputs clean CSV/JSON datasets ready for analysis.

0.0 (0)

Pricing

$19.00/month + usage

0

3

3

Last modified

14 days ago

What You Can Scrape

  • Followers: Everyone who follows the target user.
  • Following: Accounts the user follows.
  • Verified followers: All verified followers of a specific User
  • Rich profile metadata for every retrieved user (ID, username, name, bio, stats, creation date, …)

Why Scrape Followers/Following

With 400 M+ active users, Twitter/X is a goldmine for social-graph intelligence. Teams use this actor to:

  • Discover influencers & outreach targets within a niche
  • Map competitor audiences and refine ad-targeting or content strategy
  • Generate lead lists from followers that match specific intent signals
  • Build research datasets for academic or sentiment analysis

Output Data Fields

Each exported user contains the following 18 fields:

FieldTypeDescription
🆔 IDstringTwitter user unique identifier
👤 HandlestringTwitter user handle (e.g., "elonmusk")
📛 NamestringDisplay name of the user
📝 BiostringUser biography/description
💬 CanDMbooleanWhether the user can receive direct messages
📅 AccountCreateDatestringAccount creation date in ISO format
📍 LocationstringUser location as specified in profile
👥 FollowersCountnumberNumber of followers
🔗 FollowingCountnumberNumber of accounts following
❤️ TotalFavouritesByUsernumberTotal number of likes given by user
🖼️ MediaCountnumberNumber of media files posted
🌐 UserPageURLstringDirect URL to user profile page
🖼️ ProfileBannerURLstringURL to profile banner image
📷 ProfileURLstringURL to profile image
🎭 AvatarURLstringURL to user avatar image
📊 PostCountnumberTotal number of posts/tweets
VerifiedbooleanLegacy verification status
🔵 IsBlueVerifiedbooleanTwitter Blue verification status

Example output (JSON)

{
"TaskId": "20250907104346422435",
"ID": "2285608116",
"Handle": "TheMarriageFdn",
"Name": "The Marriage Foundation",
"Bio": "A one-time divorce mediator I became a marriage healer in 2003 and founded the nonprofit in 2009. We helped thousands achieve a permanently happy marriage.",
"CanDM": true,
"AccountCreateDate": "1/11/2014, 4:34:22 AM",
"Location": "San Diego, CA",
"FollowersCount": 794,
"FollowingCount": 1938,
"TotalFavouritesByUser": 403,
"MediaCount": 325,
"UserPageURL": "https://x.com/TheMarriageFdn",
"ProfileBannerURL": "https://pbs.twimg.com/profile_banners/2285608116/1677992995",
"ProfileURL": "https://t.co/NIYKSSM9Cx",
"AvatarURL": "https://pbs.twimg.com/profile_images/1632246989739159554/exnm2NBP_normal.png",
"PostCount": 794,
"Verified": false,
"IsBlueVerified": false
}

Getting Started

1.Getting Twitter/X Cookies

Install the Cookie Editor Chrome extension.

Log in to your Twitter/X account in the same browser window.

Click the Cookie-Editor icon in the toolbar.

In the popup, click Export button (at bottom-right corner).

Choose “Header String”.

Paste that string into the cookie field of this actor’s input (or pass it in your API call).

Getting Twitter/X Cookies

🛡️ note:Your cookie is stored as a secret input on Apify—automatically encrypted and never exposed in logs, so it remains completely secure.

2. Configure Your Actor Run

Now you're ready to configure the actor. Here's how to set up your input parameters:

FieldTypeRequiredDescription
handlestringTwitter user handle (e.g., @elonmusk)
exportTypestringType of data to export: "followers", "followings", or "verified_followers"
cookiestringComplete Twitter cookie string for authentication
maxResultsnumberMaximum number of users to export (default: 1000, you can set a large number for extensive scraping)
delaynumberDelay between requests in seconds (default: 10, recommended: 10s)
proxyConfigurationobjectOptional proxy settings. Leave empty for default behavior, configure only if needed for special cases

3. Run it through APIFY Console or API

3.1 Run in Apify Console (very easy to use)

  • Open Apify Console, go to this Actor page, and click “Run” (or create a Task first and run it).
  • In the Input panel, fill in:
    • handle: Target username (without @), e.g., elonmusk.
    • exportType: Select from the dropdown: Followers / Following / Verified Followers.
    • cookie: Paste the cookie obtained with the Cookie Editor extension described above.
    • maxResults: Number of users to export for this run, e.g., 10000.
    • delay: Request interval in seconds; recommended 10–20 (default 10).
    • proxyConfiguration: Usually not required; leave empty unless you have special needs.
  • Click “Run”.

During the run and reviewing results:

  • Dataset tab: View/download results as JSON/CSV/NDJSON.
  • Logs: Check logs

3.2 Run via API

  • handle: Target username (without @), e.g., elonmusk.
  • exportType must be one of: "followers", "following", "verified_followers".
  • cookie: Paste the cookie obtained with the Cookie Editor extension described above.

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 = {
handle: 'elonmusk',
exportType: 'Followers',
cookie: 'auth_token=...; ct0=...; ...',
maxResults: 1000,
};
// Run the Actor and wait for it to finish
const run = await client.actor('xtcodetech/twitter-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);
});

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 = {
"handle": "elonmusk",
"exportType": "Followers",
"cookie": "auth_token=...; ct0=...; ...",
"maxResults": 1000,
}
# Run the Actor and wait for it to finish
run = client.actor("xtcodetech/twitter-x-followers-scraper").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)