Twitter X User Scraper avatar

Twitter X User Scraper

Pricing

from $0.40 / 1,000 results

Go to Apify Store
Twitter X User Scraper

Twitter X User Scraper

Scrape public X (Twitter) user profiles and the users that appear in their recent posts: name, bio, follower and post counts, verification and account details. No login needed.

Pricing

from $0.40 / 1,000 results

Rating

0.0

(0)

Developer

Social Data API

Social Data API

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Categories

Features

Limited permissions

Share

Twitter X User Scraper returns public X (Twitter) user profiles for any list of handles: display name, bio, follower and following counts, post and media counts, verification, avatar, banner and account creation date, plus the users that appear in each profile's recent posts. Every response is structured JSON — ready to pass directly to an LLM, index into a vector store, or feed a social listening pipeline. It works without login; your own session cookies add related users from the whole timeline. Start with one account, then scale up.


What data can I extract with Twitter X User Scraper?

Using this X User API, you will be able to extract the following X user data:

👤 Username🏷️ Display name🆔 User ID🔗 Profile URL
📝 Bio (with full links)📍 Location👥 Follower count➡️ Following count
🗨️ Post count🖼️ Media count✅ Verified badge🔒 Protected account
🧑 Profile picture🌄 Cover picture📅 Account creation date💼 Professional account type
📌 Pinned post IDs🏢 Affiliate label⚠️ Possibly sensitive flag🔗 Bio and website links
🌍 Account based in (about block)🕰️ Verified since (about block)🔁 Related to (input profile)🚫 Unavailable reason (suspended accounts)

How to use Twitter X User Scraper

Twitter X User Scraper is for social media analysts, marketers and researchers who need clean X account details for a list of handles, plus the accounts those profiles quote and repost, in one run.

Copy to your AI assistant:

`socialdataapi/twitter-x-user-scraper` (Apify Actor ID: socialdataapi/twitter-x-user-scraper, https://apify.com/socialdataapi/twitter-x-user-scraper) is an Apify Actor that returns public X (Twitter) user profiles, and the users that appear in each profile's recent posts, as structured JSON: username, display name, bio, follower and following counts, post and media counts, verification badge, profile and cover pictures, account creation date and an optional about block. Use it whenever someone needs X account details without cookies, a login, or a browser - building an influencer list, checking follower counts for a watchlist, or mapping which accounts a profile quotes and reposts. Run it with curl: curl -X POST "https://api.apify.com/v2/acts/socialdataapi~twitter-x-user-scraper/run-sync-get-dataset-items?token=APIFY_TOKEN" -H "Content-Type: application/json" -d '{"startUrls":["https://x.com/NASA","elonmusk"],"maxItems":10,"getAbout":true}'. Or in Python: ApifyClient("APIFY_TOKEN").actor("socialdataapi/twitter-x-user-scraper").call(run_input={"startUrls":["https://x.com/NASA"],"maxItems":10}) then client.dataset(run["defaultDatasetId"]).list_items().items. Inputs: startUrls (array of profile URLs or handles, required), maxItems (integer, rows per input profile including the profile itself, 1-10000, default 10), authToken (string, optional secret x.com auth_token cookie), csrfToken (string, optional secret x.com ct0 cookie, needed together with authToken), getRetweeters (boolean, also return the users that appear in the profile's recent posts, default true), getFollowers (boolean, keep the follower count, default true), getFollowing (boolean, keep the following count, default true), getAbout (boolean, add the about block with verification date, profile image shape, account source and location, default false), includeUnavailableUsers (boolean, add rows for suspended or unavailable accounts, default false), proxyConfiguration (object, optional proxy settings). Every row has type "user"; related-user rows carry followerOf with the input profile; suspended accounts come back with isUnavailable true and unavailableReason when includeUnavailableUsers is on. Each saved row is billed as one result. Without session cookies a profile usually gives 1-9 rows (the profile plus the users in its few recent posts); with both cookies the whole timeline is read up to maxItems. Full input schema, every enum and default, and the complete output field list: GET https://api.apify.com/v2/acts/socialdataapi~twitter-x-user-scraper/builds/default

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

Point your AI assistant at this Actor and it can read X on its own: user profiles, follower and post counts, verification and the accounts each profile quotes or reposts. No glue code, no scraping logic in your prompts.

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

Step by step

  1. Create a free Apify account.
  2. Open Twitter X User Scraper in the Apify Store.
  3. Enter the X handles or profile URLs (with or without @), one per line.
  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

The cookies are optional. Add them only when you want related users from the whole timeline instead of the few recent posts X shows to visitors.

  1. Log in to x.com in your browser.
  2. Open DevTools (F12) and go to Application > Cookies > https://x.com.
  3. Copy the value of auth_token into X auth_token cookie.
  4. Copy the value of ct0 into X ct0 cookie. Both fields are stored as secrets and never shown in logs.

How to scale Twitter X User Scraper to bulk

To scrape X profiles in bulk, put every handle into startUrls; three profiles are read at the same time and each row is saved as soon as it is ready. Use Max items per profile to control how many related users you get per account. To export Twitter users to CSV on a schedule, schedule the run in Apify Console or loop the API call over your watchlist; a recorded local run read 74 profiles and saved 120 rows in 22.0 seconds.


✨ Features

Twitter X User Scraper fetches clean, structured X user data from public profiles ⚡. It's ideal for influencer research, audience mapping, brand and competitor watchlists, and checking X account data before outreach — a Twitter user scraper and Twitter bio scraper in one run.

It extracts, per user:

  • Username and display name – the @handle, the name shown on the profile and the numeric user ID
  • Follower and following counts – the Twitter followers count and how many accounts the user follows
  • Bio and location – the bio text with full links instead of short links, and the profile location
  • Activity counts – number of posts and of photos and videos
  • Verification – blue badge, protected flag and, with the about block, the date the account was verified
  • Pictures – profile picture and cover picture URLs
  • Related users – the accounts quoted or reposted in the profile's recent posts, each with its own full row

⚡ Fields X does not show to visitors come back as null, never as a made-up 0.


Use cases 💡

  • Influencer marketer — scrape Twitter users from a shortlist and rank them by follower count.
  • Social media analyst — track bio, post count and verification changes across a watchlist.
  • PR team — see which accounts a brand profile quotes and reposts most often.
  • Researcher — collect Twitter user data and account creation dates for a study sample.
  • AI agent builder — give an agent live X account details as context before it drafts outreach.

Building an AI agent? Connect Twitter X User Scraper over MCP and let it call the actor on its own.


Why choose this actor?

  • Many accounts in one run. A recorded local run read 74 X profiles and saved 120 user rows in 22.0 seconds, three profiles at a time.
  • Full numbers behind each account. A recorded row for SpaceX came back with 41,956,210 followers, 128 following, 11,996 posts, 4,807 media items and a verification date.
  • 39 fields per user. From username and bio to professional account type, pinned post IDs and the optional about block.

⬇️ Input

The actor takes a list of X handles or profile URLs (startUrls, required); @jack, jack, https://x.com/jack and https://twitter.com/jack all work. Session cookies are optional.

ParameterRequiredTypeDescriptionExample value
startUrlsYesarrayX / Twitter profile URLs or handles, one per line.["https://x.com/NASA", "elonmusk"]
maxItemsNointegerRows per input profile; the profile itself counts as one. Default 10, 1 to 10,000.10
authTokenNostringYour own x.com auth_token cookie (secret). With csrfToken, related users come from the whole timeline."<your auth_token>"
csrfTokenNostringThe ct0 cookie that belongs to the auth_token above (secret)."<your ct0>"
getRetweetersNobooleanAlso return the users that appear in the profile's recent posts (quoted and reposted authors). Default true.true
getFollowersNobooleanKeep the follower count in each row. Default true.true
getFollowingNobooleanKeep the following count in each row. Default true.true
getAboutNobooleanAdd the about block: verification date, profile image shape, account source and location. Default false.true
includeUnavailableUsersNobooleanAdd rows for suspended or unavailable accounts. Default false.false
proxyConfigurationNoobjectOptional proxy settings. By default the actor connects directly and retries on a fresh connection when a request is refused.{"useApifyProxy": false}

Free plan limits

Users on the Apify free plan can fetch up to 20 rows per run (all profiles together) and 200 rows 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

{
"startUrls": [
"https://x.com/NASA",
"elonmusk",
"https://twitter.com/openai"
],
"maxItems": 10,
"authToken": "",
"csrfToken": "",
"getRetweeters": true,
"getFollowers": true,
"getFollowing": true,
"getAbout": true,
"includeUnavailableUsers": false,
"proxyConfiguration": {
"useApifyProxy": false
}
}

⬆️ Output

Every user is one typed, normalized JSON item with the same schema on every run; export it as JSON (default), CSV or Excel. Related-user rows name the input profile they came from, and suspended accounts (when you ask for them) come back as a short row with the reason; a copy of all rows grouped by display name is also saved in the run's key-value store.

Example output

{
"inputSource": "https://x.com/elonmusk",
"type": "user",
"userName": "SpaceX",
"url": "https://x.com/SpaceX",
"twitterUrl": "https://twitter.com/SpaceX",
"id": "34743251",
"name": "SpaceX",
"isVerified": true,
"hasNftAvatar": false,
"profilePicture": "https://pbs.twimg.com/profile_images/1697749409851985920/HbrI04tM_normal.jpg",
"coverPicture": "https://pbs.twimg.com/profile_banners/34743251/1681251194",
"description": "SpaceX designs, manufactures and launches the world’s most advanced rockets and spacecraft",
"location": "Earth",
"followers": 41956210,
"following": 128,
"protected": false,
"status": "",
"canDm": null,
"canMediaTag": null,
"createdAt": "Thu Apr 23 21:53:30 +0000 2009",
"entities": {
"description": {},
"url": {
"urls": [
{
"display_url": "spacex.com",
"expanded_url": "http://spacex.com",
"url": "https://t.co/VOJ6qEctND"
}
]
}
},
"fastFollowersCount": null,
"favouritesCount": null,
"listedCount": null,
"hasCustomTimelines": null,
"isTranslator": null,
"mediaCount": 4807,
"statusesCount": 11996,
"affiliatesHighlightedLabel": {},
"professional": {
"category": [],
"id": "UHJvZmVzc2lvbmFsOjE2ODE4MzkzMjIwMjk1MDI0NjQ=",
"professional_type": "Business"
},
"possiblySensitive": false,
"pinnedTweetIds": [],
"profileInterstitialType": "",
"hasGraduatedAccess": false,
"about": {
"accountBasedIn": "Earth",
"locationAccurate": false,
"profileImageShape": "Square",
"avatarUrl": "https://pbs.twimg.com/profile_images/1697749409851985920/HbrI04tM_normal.jpg",
"usernameChangeCount": "0",
"accountCreatedAt": "Thu Apr 23 21:53:30 +0000 2009",
"accountSource": "",
"verifiedSince": "1326298354088"
},
"followerOf": "elonmusk"
}

How does it work?

For each handle, the actor reads the public profile page any visitor can open, using plain HTTP requests and no browser. It takes the profile details from that page, then the users that appear in the profile's recent posts, and reads each of those users' own public profile so their rows are just as complete. When you add your own session cookies, related users come from the whole timeline instead. If X refuses a request, the actor retries on a fresh connection and, on the Apify platform, through a residential proxy. It returns only publicly visible data, and the output schema stays the same across runs.


How do you integrate Twitter X User Scraper into your stack?

Twitter X User Scraper works with what you already use: the REST API from any language, MCP for AI agents, and no-code tools.

Using Twitter X User Scraper with the Apify API

import requests
resp = requests.post(
"https://api.apify.com/v2/acts/socialdataapi~twitter-x-user-scraper/run-sync-get-dataset-items",
params={"token": "APIFY_TOKEN"},
json={"startUrls": ["https://x.com/NASA", "elonmusk"], "maxItems": 10},
)
for user in resp.json():
print(user["userName"], user.get("followers"), user.get("followerOf"))

Works in Go, Ruby, Node.js, cURL — any language that can make an HTTP request.

MCP integration for AI agents

Register the actor once and your agent gets a tool that returns X account details, follower counts and related users for any handle:

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

This registers Twitter X User Scraper as a tool your agent can call directly. It works in Claude Code, Cursor and Windsurf, so an agent can do a Twitter account lookup in the middle of a task.

No-code tools (n8n, Make, LangChain)

n8n: add the Apify node with "Run an Actor", pick socialdataapi/twitter-x-user-scraper, or use the HTTP Request node pointed at the run-sync endpoint with your token.

Make: use the Apify app's "Run an Actor" module, then "Get Dataset Items" to send each user row to your sheet or CRM.

LangChain: install langchain-apify and load ApifyActorsTool("socialdataapi/twitter-x-user-scraper") as an agent tool.


Scraping publicly available X profile data is generally legal when you collect only what any visitor can see without logging in. Twitter X User Scraper returns only public profile details; the optional session cookies are your own and only change which related users are found. Under GDPR, collecting public data is generally permissible, but storing and using it must comply with local data-protection law. Consult legal counsel if your use case involves bulk storage of personal data.


Frequently asked questions

What fields does Twitter X User Scraper return?

It returns the username, display name, bio, follower count and following count, plus post and media counts, verification, pictures and the account creation date. See the data fields section.

Does Twitter X User Scraper require an X account or login?

No. Profiles and the users in their recent posts are read without a login. Your own auth_token and ct0 cookies are optional and only make related users come from the whole timeline.

How fast does Twitter X User Scraper run?

A recorded local run read 74 profiles and saved 120 rows in 22.0 seconds; 3 profiles gave 9 rows in 2.6 seconds. Data is fetched live on every run, not cached.

What happens if a user is private or doesn't exist?

A handle that does not exist gives no row, and text that is not a valid handle is skipped with a warning; the run still finishes successfully. Suspended accounts give a row with an unavailable flag and the reason when Include unavailable users is on. Protected accounts still return their public profile details, with the protected flag set to true.

Can I scrape multiple X users at once?

Yes. Put every handle or profile URL into startUrls; three profiles are read at the same time and Max items per profile applies to each one.

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

Yes — Twitter X User Scraper is available as an MCP tool. Register it in Claude Code, Cursor or Windsurf with:

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

Any agent that can call an HTTP endpoint can use the REST API directly.

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

Yes. Every row is 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.

What happens when X changes its layout or updates its anti-bot system?

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

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

Yes. Retries on a fresh connection and the residential proxy fallback run on the actor's side, and no browser is needed. You send one request and get structured JSON back.

Which X user fields work best for AI training data and RAG indexing?

For RAG, use the bio, display name, location and professional account category. For training data, use the follower, following, post and media counts, the verified and protected flags and the account creation date. All fields are typed strings, integers, booleans, lists and objects — no normalization needed.


ScraperWhat it extracts
Twitter X Tweets ScraperPosts from X profiles, newest first
Twitter Profile ScraperProfile details of X accounts
Twitter User Following ScraperAccounts an X user follows
Twitter Email ScraperPublic emails linked to X accounts

Your feedback

Found a bug or missing a field? Let us know through the actor's Issues tab in Apify Console. The team reads every report and ships fixes.