Twitter Profile Scraper avatar

Twitter Profile Scraper

Pricing

from $10.00 / 1,000 results

Go to Apify Store
Twitter Profile Scraper

Twitter Profile Scraper

Extract comprehensive Twitter/X profile data and tweets including all engagement metrics (likes, retweets, replies, quotes, bookmarks, views), profile details, media URLs, hashtags, and mentions with anti-detection features and authenticated scraping support.

Pricing

from $10.00 / 1,000 results

Rating

5.0

(26)

Developer

Crawler Bros

Crawler Bros

Maintained by Community

Actor stats

24

Bookmarked

91

Total users

7

Monthly active users

11 days ago

Last modified

Categories

Share

Scrape tweets and full profile data from any public Twitter / X account. Extract every engagement metric (likes, retweets, replies, bookmarks, views), media URLs, hashtags, mentions, and complete author metadata — without using the official API.

Twitter session cookies are required for reliable extraction. See the Authentication section below.

What you get

Each item in the dataset is one tweet, enriched with the author's profile metadata.

Tweet fields

FieldDescription
tweet_idTweet ID
tweet_urlDirect tweet URL
textFull tweet text (with hashtags / mentions intact)
timestampISO 8601 timestamp the tweet was posted
likes_countLike count
retweets_countRetweet count
replies_countReply count
bookmarks_countBookmark count
views_countView count
is_retweettrue if the tweet is a retweet
is_replytrue if the tweet is a reply
reply_toUsername being replied to (when is_reply=true)
media_urlsImage / video URLs attached to the tweet
hashtagsHashtags used (without #)
mentionsUsernames mentioned (without @)
urlsExternal URLs in the tweet
scrapedProfileUsername that was scraped
authorMetaFull profile snapshot — see below

authorMeta fields

FieldDescription
usernameTwitter/X handle
display_nameFull display name
bioProfile biography
locationLocation text from the profile
websiteWebsite URL listed on the profile
joined_dateAccount creation date as shown on profile
followers_countFollower count
following_countFollowing count
tweets_countTotal post count
verifiedtrue for Blue/verified accounts
profile_image_urlProfile picture URL (400×400)
profile_banner_urlHeader / banner image URL
scraped_atISO 8601 UTC timestamp

Empty fields are dropped from each record so the dataset stays clean.

Input

ParameterTypeDefaultDescription
usernamesArrayrequiredTwitter/X usernames to scrape (with or without @).
maxTweetsInteger50Max tweets to collect per profile (1-500).
includeRepliesBooleanfalseInclude reply tweets.
includeRetweetsBooleantrueInclude retweets.
cookiesStringrequiredTwitter/X session cookies in JSON format. See Authentication.
proxyConfigurationObjectOptional proxy. Leave off unless you hit IP-based blocks.

Example input — minimal

{
"usernames": ["elonmusk"],
"cookies": "[{\"name\":\"auth_token\",\"value\":\"YOUR_TOKEN\",\"domain\":\".x.com\"}]"
}

Example input — multiple profiles, replies excluded

{
"usernames": ["elonmusk", "openai", "github"],
"maxTweets": 200,
"includeReplies": false,
"includeRetweets": true,
"cookies": "[...]"
}

Example output

{
"tweet_id": "1881234567890123456",
"tweet_url": "https://twitter.com/elonmusk/status/1881234567890123456",
"text": "Mars by 2030.",
"timestamp": "2026-04-15T14:32:00.000Z",
"likes_count": 480000,
"retweets_count": 32000,
"replies_count": 8200,
"bookmarks_count": 4100,
"views_count": 18400000,
"is_retweet": false,
"is_reply": false,
"media_urls": ["https://pbs.twimg.com/media/AbCdEf123.jpg"],
"hashtags": [],
"mentions": [],
"urls": [],
"scrapedProfile": "elonmusk",
"authorMeta": {
"username": "elonmusk",
"display_name": "Elon Musk",
"bio": "Tesla, SpaceX, Neuralink, The Boring Company",
"location": "Texas, USA",
"website": "https://tesla.com",
"joined_date": "Joined June 2009",
"followers_count": 228100000,
"following_count": 1219,
"tweets_count": 47800,
"verified": true,
"profile_image_url": "https://pbs.twimg.com/profile_images/.../photo_400x400.jpg",
"profile_banner_url": "https://pbs.twimg.com/profile_banners/.../banner.jpg",
"scraped_at": "2026-05-05T13:42:18Z"
}
}

Authentication

Twitter/X locks profile content behind a login wall — without valid cookies, the platform serves a curated old-tweets feed instead of the chronological timeline you see when logged in. The cookies input is a JSON array of your browser cookies for x.com.

How to export your cookies

  1. Log into x.com in Chrome or Firefox.
  2. Install the Cookie-Editor extension.
  3. Click the extension icon → Export → Export as JSON.
  4. Paste the JSON array into the cookies input field.

auth_token and ct0 are the two cookies that must be present. Cookies typically last 30-60 days before they need refreshing.

[
{ "name": "auth_token", "value": "YOUR_AUTH_TOKEN", "domain": ".x.com", "path": "/", "httpOnly": true, "secure": true },
{ "name": "ct0", "value": "YOUR_CT0_VALUE", "domain": ".x.com", "path": "/", "httpOnly": false, "secure": true }
]

Keep your cookies private — they grant access to your X account.

Use cases

  • Influencer analysis — Pull complete tweet history from key accounts in your niche.
  • Brand monitoring — Track tweets and engagement on your own brand handles or competitors'.
  • Lead enrichment — Augment CRM records with bio, website, follower counts, and verified status.
  • Content audits — Export an account's posts for analytics, archiving, or compliance.
  • Trend analysis — Compare engagement curves across multiple accounts in the same vertical.
  • Sentiment monitoring — Feed tweet text into NLP / sentiment pipelines.

FAQ

Why am I getting old tweets instead of recent ones? Without valid cookies, Twitter shows a "Highlights" feed of popular old tweets rather than the chronological timeline. Re-export fresh cookies and retry.

Can I scrape private / protected profiles? Only if you authenticate with cookies from an account that follows the protected profile. The actor cannot bypass Twitter's privacy controls.

How many tweets per profile? Up to 500 (maxTweets maximum). For very large profiles, run multiple passes with different filter combinations or pull replies / retweets separately.

What if my cookies are expired? The actor probes the cookie validity at startup. If the session is dead, it emits a single sentinel record { type: "twitter_profile_blocked", reason: "expired_cookies", ... } and exits cleanly so you know to refresh.

Will my account get banned? The actor uses random delays, scrolls naturally, and mimics human browsing. Risk is low for typical usage. Use a dedicated account, not your primary one, if you're running heavy workloads (500 tweets × many profiles back-to-back).

Does this work without a proxy? Yes — proxy is off by default. Enable proxyConfiguration only if you encounter persistent IP-based blocks.

How current is the data? Live — every run hits Twitter/X at request time. Schedule the actor for hourly or daily refreshes.

Limitations

  • Cannot access truly private / protected accounts without being an authenticated follower.
  • Cookies expire — refresh every ~30-60 days for steady performance.
  • Very high maxTweets values (300+) take longer and carry a higher block risk.
  • Engagement counts for very old tweets may differ slightly from the official API.