Pricing
$10.00/month + usage
Go to Apify Store
X(twitter) user profile and tweets scraper
scrapes user timelines from X (Twitter) to extract tweets, user information, and engagement metrics. It works in guest mode without requiring authentication and can retrieve tweets from any public Twitter account.
Pricing
$10.00/month + usage
Rating
0.0
(0)
Developer
Actor stats
1
Bookmarked
13
Total users
2
Monthly active users
7 months ago
Last modified
Categories
Share
X (Twitter) User Timeline Actor
This Apify Actor scrapes user timelines from X (Twitter) to extract tweets, user information, and engagement metrics. It works in guest mode without requiring authentication and can retrieve tweets from any public Twitter account.
Features
- Timeline scraping - Extract tweets from any public X (Twitter) user timeline
- User information - Retrieve user profile data including verification status
- Engagement metrics - Get retweet, like, and reply counts for each tweet
- Media detection - Identify tweets with attached media (images, videos)
- Guest mode operation - Works without authentication requirements
- Proxy support - Uses Apify's residential proxy for reliable requests
- Structured output - Results include comprehensive tweet and user data
- Configurable limits - Control the number of tweets retrieved
Input Parameters
| Field | Type | Required | Description |
|---|---|---|---|
username | String | Yes | The username of the Twitter account to scrape (without @ symbol) |
count | Number | No | Number of tweets to retrieve (default: 20, max: 100) |
includeReplies | Boolean | No | Whether to include reply tweets in the results (default: false) |
includeRetweets | Boolean | No | Whether to include retweets in the results (default: true) |
Example Input
{"username":"elonmusk","count":10,"includeReplies":false,"includeRetweets":true}
How It Works
- The actor validates the input parameters (username and count)
- It initializes a proxy configuration using Apify's residential proxy
- It fetches the user's timeline page from X (Twitter)
- It parses the HTML to extract tweet data, user information, and engagement metrics
- Results are pushed to the dataset with structured tweet and user information
Output
The actor outputs a structured object containing:
{"username":"elonmusk","user_id":"44196397","tweet_count":20,"tweets":[{"id":"1234567890","text":"Tweet content here","created_at":"2025-07-07T12:34:56","retweet_count":1000,"favorite_count":5000,"reply_count":200,"is_retweet":false,"is_reply":false,"user":{"id":"44196397","name":"Elon Musk","screen_name":"elonmusk","verified":true},"media":[{"type":"photo","url":"https://pbs.twimg.com/media/example.jpg"}]}]}
Example Usage
Get Elon Musk's Timeline
{"username":"elonmusk","count":10}
Get Timeline with Replies
{"username":"nasa","count":20,"includeReplies":true,"includeRetweets":false}
Limitations
- Works in guest mode, so some data may be limited compared to authenticated access
- Rate limiting may apply based on Twitter's policies
- Some tweets or media might not be accessible in guest mode
- Private accounts cannot be scraped
