X (Twitter) Profile Scraper avatar

X (Twitter) Profile Scraper

Pricing

from $2.00 / 1,000 posts

Go to Apify Store
X (Twitter) Profile Scraper

X (Twitter) Profile Scraper

X Profile Scraper automates extraction of X (Twitter) profiles, posts, likes, retweets, and engagement metrics. Ideal for social media analytics, competitor research, brand monitoring and marketing.

Pricing

from $2.00 / 1,000 posts

Rating

0.0

(0)

Developer

Jose Fernando Álvarez Romero

Jose Fernando Álvarez Romero

Maintained by Community

Actor stats

2

Bookmarked

2

Total users

1

Monthly active users

9 hours ago

Last modified

Share

X Profile Scraper

Apify TypeScript Bun Playwright Zod

Last updated: 27 March 2026 | Apify Platform | Documentation


What is X Profile Scraper?

X Profile Scraper is an Apify Actor that extracts profile information and posts from X (Twitter). It retrieves usernames, display names, bios, locations, websites, profile and banner images, follower counts, and recent posts with full engagement metrics. The scraper uses Playwright with Firefox browser for reliable data extraction and Zod for data validation.

This tool is designed for social media analysts, researchers, marketers, and developers who need to collect X profile data programmatically. It efficiently collects posts by scrolling through the profile, extracting as much 100 posts per profile with likes, retweets, replies, views, media URLs, and hashtags.


Quick Start

  1. Open on Apify Console
  2. Enter your profile URLs
  3. Click Run
  4. Download results from the Dataset tab
{
"profileUrls": [{ "url": "https://x.com/Topuriailia" }, { "url": "https://x.com/cristiano" }],
"maxPosts": 20
}

Input Parameters

ParameterTypeRequiredDefaultDescription
profileUrlsarrayYes-X (Twitter) profile URLs to scrape
maxPostsintegerNo20Maximum posts to scrape per profile (5-100)

Output Example

{
"username": "Topuriailia",
"displayName": "Ilia Topuria",
"bio": "El Matador • Double UFC World Champion • Prove them wrong • Undefeated 17 - 0",
"location": "Alicante, España",
"website": "links.iliatopuriaoficial.com",
"profileImageUrl": "https://pbs.twimg.com/profile_images/1967302527025598466/w153u0mM_200x200.jpg",
"followersCount": 563800,
"followingCount": 87,
"postsCount": 690,
"isVerified": false,
"isPrivate": false,
"posts": [
{
"postId": "1880858384427327883",
"text": "Islam, if I want to, I can finish you.if I want to, I can knock you out. I'll make it look easy. Se you soon ",
"createdAt": "2025-01-19T06:02:38.000Z",
"likes": 97000,
"retweets": 8700,
"replies": 3300,
"views": 13000000,
"isPinned": false,
"isReply": true,
"mediaUrls": ["https://abs-0.twimg.com/emoji/v2/svg/1f609.svg"]
},
{
"postId": "1759134716832407716",
"text": "Cada gota de sangre valió la pena.\n#AndNew #15 ",
"createdAt": "2024-02-18T08:36:14.000Z",
"likes": 87000,
"retweets": 13000,
"replies": 1600,
"views": 3600000,
"isPinned": false,
"isReply": true,
"mediaUrls": [
"https://abs-0.twimg.com/emoji/v2/svg/1f339.svg",
"https://pbs.twimg.com/ext_tw_video_thumb/1759134558216499200/pu/img/Fqn2kUe4Ewyo3L_L.jpg"
],
"hashtags": ["AndNew"]
},
{
"postId": "1852700468637520324",
"text": "I didn't expect someone like you to be unable to distinguish between confidence and arrogance. But, at the end of the day, we all reflect our own reality onto others. I wish you the best for what remains of your career, and God bless your family.",
"createdAt": "2024-11-02T13:13:07.000Z",
"likes": 85000,
"retweets": 6900,
"replies": 2300,
"views": 8800000,
"isPinned": false,
"isReply": true
}
],
"scrapedAt": "2026-03-27T12:21:15.067Z"
}

Output Fields

FieldTypeDescription
usernamestringX username (without @)
displayNamestringProfile display name
biostring?Profile biography
locationstring?Profile location
websitestring?Website URL from profile
profileImageUrlstring?Profile picture URL
bannerImageUrlstring?Profile banner URL
followersCountnumberNumber of followers
followingCountnumberNumber of accounts followed
postsCountnumberTotal posts displayed on profile
isVerifiedbooleanWhether account is verified
isPrivatebooleanWhether account is private
postsPost[]Array of scraped posts
scrapedAtstringISO 8601 timestamp when data was collected

Post Fields

FieldTypeDescription
postIdstringUnique X post ID (required)
textstringPost text content (required)
createdAtstring?ISO 8601 timestamp
likesnumberNumber of likes
retweetsnumberNumber of retweets
repliesnumber?Number of replies
viewsnumber?Number of views (impressions)
isPinnedbooleanWhether post is pinned
isReplybooleanWhether post is a reply
mediaUrlsstring[]URLs of attached media
hashtagsstring[]Hashtags used in post

Features

FeatureDescription
Profile ExtractionUsername, display name, bio, location, website
Media CollectionProfile image, banner image
Follower StatsFollowers and following counts
Post ScrapingUp to 100 posts per profile with engagement metrics
Engagement MetricsLikes, retweets, replies, views
Media ExtractionImages, videos from posts
Hashtag DetectionExtracts hashtags from posts
Data ValidationZod schemas ensure structured output
Incremental ScrollEfficient post collection by scrolling

Use Cases

Social Media Analytics

{
"profileUrls": ["https://x.com/nasa", "https://x.com/spacex"],
"maxPosts": 100
}

Analyze engagement metrics across multiple profiles to understand audience behavior, content performance, and growth trends.

Brand Monitoring

{
"profileUrls": ["https://x.com/yourbrand"],
"maxPosts": 100
}

Track your brand's X presence, analyze post performance, and monitor engagement over time.

Competitor Research

{
"profileUrls": ["https://x.com/competitor1", "https://x.com/competitor2"],
"maxPosts": 100
}

Compare competitor posting patterns, engagement rates, and content strategies.

Content Research

{
"profileUrls": ["https://x.com/influencer"],
"maxPosts": 100
}

Study content patterns, hashtag usage, and viral posts from industry influencers.


Comparison: X Profile Scraper vs. Other Methods

FeatureThis ActorManual SearchThird-Party APIs
Cost$0.50 per profileFree (labor cost)$1.00-5.00 per profile
Speed40 profiles/min1 profile/minVaries
Data depthFull profile + postsLimitedVaries
EngagementComplete metricsManual countOften limited
MediaFull URLsManualRarely
Data formatClean JSONCopy-pasteVaries

Tech Stack

  • Apify SDK — Actor platform for cloud execution
  • Bun — JavaScript runtime for fast performance
  • Playwright — Browser automation with Firefox
  • TypeScript — Type safety and better developer experience
  • Zod — Schema validation for data integrity

Frequently Asked Questions

How does this scraper work?

The actor uses Playwright with Chromium browser to navigate to X profile pages. It extracts profile information from the page DOM, then scrolls through the profile to collect posts with their engagement metrics. Data is validated using Zod schemas and stored in the Apify dataset.

This tool scrapes publicly available profile data from X. It should be used for legitimate data collection purposes only. Ensure compliance with X's Terms of Service. This is not affiliated with X (formerly Twitter).

How many posts can I collect?

The maxPosts parameter allows you to set a limit up to 100 posts per profile. The default is 20 posts to balance data collection with execution time. The minimum number of posts to collect is 5.

Does this work with private accounts?

No. Private accounts require authentication and the scraper cannot access their content.

How fast is the scraper?

The actor processes approximately 40 profiles per minute, depending on the number of posts requested. Each post requires scrolling to load, so higher post counts take longer.



Pricing

This actor supports pay-per-event pricing. Each scraped profile charges for the number of posts extracted (configured as posts event).


This tool is for legitimate data collection purposes only. Ensure compliance with X's Terms of Service. This tool is not affiliated with, endorsed by, or connected to X Corp.