Twitter Profile Scraper avatar

Twitter Profile Scraper

Pricing

from $2.49 / 1,000 results

Go to Apify Store
Twitter Profile Scraper

Twitter Profile Scraper

Scrapes public Twitter/X profiles, including usernames, bios, follower counts, verification status, location, profile images, and account statistics.

Pricing

from $2.49 / 1,000 results

Rating

0.0

(0)

Developer

ScrapeAI

ScrapeAI

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

11 days ago

Last modified

Categories

Features

Limited permissions

Share

Returns X (Twitter) profiles: bio, follower counts, verification, location, images (with a token) or just name and handle (without).

Where the data comes from

X does not allow automated access to its pages: the robots.txt of x.com, syndication.twitter.com and publish.twitter.com disallows it. This Actor therefore never requests x.com. It has two sources:

1. Official X API v2 with your own bearer token (full data)

Add your app-only bearer token (create an app at developer.x.com) in the field X API bearer token. The Actor then calls only api.x.com: GET /2/users/by/username/:username. Records contain the data the API returns (counts, dates, media, authors, followers ...). The token is stored encrypted, sent only to api.x.com and never written to the dataset or the log. Which endpoints you can use, and how many requests you get, depends on your X API plan; the Actor reports X's error (401, 403, 429) in the run status.

2. Without a token: public Google results

Name and handle of each account, read from the title Google shows for its profile page or posts. Nothing else is shown there: no bio, no follower counts, no location, no images.

The Google results are read through Apify's GOOGLE_SERP proxy group: one Google Images page per search, never repeated to get a different layout, no cookies, no browser User-Agent. x.com itself is not contacted. The creation time of a post is decoded from its post id (X ids contain the time); everything else is exactly what Google shows.

Input

FieldTypeDescription
profileUrlsarrayX profile URLs, for example https://x.com/apify.
usernamesarrayX handles without the @, for example apify.
xBearerTokenstring (secret)Your own app-only bearer token for the official X API v2 (create an app at developer.x.com). With a token the Actor returns full data (counts, dates, media, followers) from api.x.com; the token is stored encrypted and sent only to api.x.com. Leave it empty to read public Google results instead (limited data, see the README).
dataSourcestringAutomatic: the X API when a bearer token is given, otherwise public Google results. X API: always the X API (needs a token). Google results: always Google results, even when a token is given.
maxItemsintegerMaximum number of records to write to the dataset.
maxRequestsintegerMaximum number of requests per run: X API calls, or Google result pages (one per search term or account).
includeRawDatabooleanX API only: add the raw API object to each record. Keep disabled unless needed.
debugLogbooleanEnable diagnostic logs without logging credentials.

Example input (the same as the default input of the Actor):

{
"profileUrls": [
"https://x.com/X"
],
"usernames": [
"X"
],
"dataSource": "auto",
"maxItems": 10,
"maxRequests": 5,
"includeRawData": false,
"debugLog": false
}

Output

Record read from Google results (dataOrigin: google-serp-images):

{
"platform": "twitter",
"actorMode": "profile",
"recordType": "profile",
"username": "apify",
"displayName": "Apify",
"profileUrl": "https://x.com/apify",
"handleShownInProfileTitle": true,
"retrievalMethod": "google-serp-images",
"dataOrigin": "google-serp-images",
"serpQuery": "site:x.com/apify",
"scrapedAt": "2026-11-14T12:00:00.000Z"
}

Records read from the X API (retrievalMethod: x-api-v2) carry the full API data: text, createdAt, counts (likeCount, replyCount, retweetCount, viewCount ...), author, media, links, mentions; profiles carry bio, location, follower and following counts and verification.

Limits

  • Without a token the Actor returns no counts, no follower numbers and no complete timelines: Google lists only part of what exists on X. Fields that Google does not show are left out, never filled in.
  • A run that finds nothing fails with a message instead of returning an empty dataset.
  • Run npm test in the Actor folder to execute the unit tests (they use saved results and a fake X API; no network).