X (Twitter) Profile Scraper
Pricing
from $2.00 / 1,000 posts
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
Actor stats
2
Bookmarked
2
Total users
1
Monthly active users
9 hours ago
Last modified
Categories
Share
X Profile Scraper
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
- Open on Apify Console
- Enter your profile URLs
- Click Run
- Download results from the Dataset tab
{"profileUrls": [{ "url": "https://x.com/Topuriailia" }, { "url": "https://x.com/cristiano" }],"maxPosts": 20}
Input Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
profileUrls | array | Yes | - | X (Twitter) profile URLs to scrape |
maxPosts | integer | No | 20 | Maximum 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
| Field | Type | Description |
|---|---|---|
username | string | X username (without @) |
displayName | string | Profile display name |
bio | string? | Profile biography |
location | string? | Profile location |
website | string? | Website URL from profile |
profileImageUrl | string? | Profile picture URL |
bannerImageUrl | string? | Profile banner URL |
followersCount | number | Number of followers |
followingCount | number | Number of accounts followed |
postsCount | number | Total posts displayed on profile |
isVerified | boolean | Whether account is verified |
isPrivate | boolean | Whether account is private |
posts | Post[] | Array of scraped posts |
scrapedAt | string | ISO 8601 timestamp when data was collected |
Post Fields
| Field | Type | Description |
|---|---|---|
postId | string | Unique X post ID (required) |
text | string | Post text content (required) |
createdAt | string? | ISO 8601 timestamp |
likes | number | Number of likes |
retweets | number | Number of retweets |
replies | number? | Number of replies |
views | number? | Number of views (impressions) |
isPinned | boolean | Whether post is pinned |
isReply | boolean | Whether post is a reply |
mediaUrls | string[] | URLs of attached media |
hashtags | string[] | Hashtags used in post |
Features
| Feature | Description |
|---|---|
| Profile Extraction | Username, display name, bio, location, website |
| Media Collection | Profile image, banner image |
| Follower Stats | Followers and following counts |
| Post Scraping | Up to 100 posts per profile with engagement metrics |
| Engagement Metrics | Likes, retweets, replies, views |
| Media Extraction | Images, videos from posts |
| Hashtag Detection | Extracts hashtags from posts |
| Data Validation | Zod schemas ensure structured output |
| Incremental Scroll | Efficient 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
| Feature | This Actor | Manual Search | Third-Party APIs |
|---|---|---|---|
| Cost | $0.50 per profile | Free (labor cost) | $1.00-5.00 per profile |
| Speed | 40 profiles/min | 1 profile/min | Varies |
| Data depth | Full profile + posts | Limited | Varies |
| Engagement | Complete metrics | Manual count | Often limited |
| Media | Full URLs | Manual | Rarely |
| Data format | Clean JSON | Copy-paste | Varies |
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.
Is this legal?
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.
Related Tools
- X Platform — Official X website
- Apify Platform — Actor hosting platform
- Apify SDK Documentation — Actor development
Pricing
This actor supports pay-per-event pricing. Each scraped profile charges for the number of posts extracted (configured as posts event).
Legal Notice
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.