Twitter (X) Scraper
Pricing
from $0.10 / 1,000 scraped items
Twitter (X) Scraper
The best Apify Twitter (X) scraper. It offers a variety of filter options without needing any account credentials.
Pricing
from $0.10 / 1,000 scraped items
Rating
0.0
(0)
Developer
Maxime Dupré
Maintained by CommunityActor stats
1
Bookmarked
166
Total users
42
Monthly active users
2.7 hours
Issues response
13 days ago
Last modified
Categories
Share
🔎 Twitter scraper API for posts, profiles, and trends
Twitter Scraper turns public Twitter/X search into structured dataset rows. Use it to collect posts, discover profiles, or export current trends with IDs, URLs, text, author data, engagement counts, media links, and search provenance.
- Twitter scraper API exports public post search results for a topic, brand, person, URL, hashtag, mention, or advanced X search query.
- X scraper collects newest or top-ranked X posts with media, link, language, date, location, and engagement filters.
- Twitter profile search discovers matching public accounts from People search queries with profile bio, counts, verification, and ranking data.
- Twitter trends scraper exports current Twitter/X trending topics for Worldwide or a verified country-level region.
- Twitter image scraper finds image posts by combining search terms, authors, hashtags, language, dates, and the image-only media filter.
📦 Returned data
- 🔎 Post rows include IDs, URLs, raw text, timestamps, author fields, engagement counts, media URLs, hashtags, language, and search provenance.
- 👤 Profile rows include handles, names, profile URLs, bios, locations, avatars, follower and following counts, verification fields, query text, and result position when X exposes them.
- 📈 Trend rows include trend names, ranks, search URLs, tweet volume when available, selected region data, and scrape time.
- 🔗 Source fields keep canonical URLs and IDs so your team can review, join, or dedupe results later.
- 💬 Quote and reply fields preserve conversation context when X exposes it in the search result.
- 🛟 Partial runs keep already saved rows when a later page cannot be completed.
🚀 How to run
- Open the Input tab and keep
Search queryas the prefilledOpenAI, paste a supported post search URL, or replace it with your own query. - Keep
What to collectset toSearch postsfor post rows, switch toSearch profilesand add one or morePeople search queries, or switch toTrending topicsand choose a verifiedTrend region. - Keep
Include original posts,Include quote posts, andInclude replieson. LeaveInclude repostsoff unless you also want reposts without added text. - Keep
Search modeset toLatest + Top postsfor a broad starter sample, keep the date fields empty unless you need a time window, and leaveMaximum items across the whole runat70for a useful first run. - Run the actor, then review the dataset rows in the finished run or through the API.
⚙️ Search options
- 🔎 Runs post searches from supported X/Twitter search, profile, list, and status URLs, or from a query plus authors, mentions, hashtags, dates, language, location, media, link, and engagement filters.
- 👤 Searches Twitter/X profiles from query text and emits flat profile rows with profile identity, public bio fields, follower/following counts, ranking position, and scrape time when X exposes them in People search.
- 📈 Emits current trending-topic rows for Worldwide or verified country-level regions.
- 🧾 Emits flat post rows with text, author identity, timestamps, engagement metrics, media URLs, hashtags, quote/reply context, author counts, verification fields, language, source, and search provenance.
- 🧭 Switches between latest-style results, X top-search ordering, and Latest + Top with post-ID dedupe.
- 🎛️ Lets you include or exclude original posts, reposts, quote posts, and replies.
- 🩹 Keeps rows even when some X fields are unavailable.
- 📚 Keeps dataset order aligned with the selected search mode.
📄 Output example
See the full Output tab for the complete contract.
Search Posts runs emit post rows. Search Profiles runs emit profile rows. Trending Topics runs emit trend rows; the actor does not mix post, profile, and trend rows in one dataset.
Example
{"postId": "2042296046009626989","postUrl": "https://x.com/OpenAI/status/2042296046009626989","postText": "Our existing $200 Pro tier still remains our highest usage option. And as a thank you to our existing Pro users on the $200 tier, we’re extending our 2x Codex usage promo (until May 31st) and we’ve reset your Codex rate limits (yes, again).","postDateTime": "2026-04-09T17:38:16.000Z","authorHandle": "OpenAI","authorDisplayName": "OpenAI","authorAvatarUrl": "https://pbs.twimg.com/profile_images/1885410181409820672/ztsaR0JW_normal.jpg","nbLikes": 5231,"nbReposts": 291,"nbReplies": 366,"nbViews": 765606,"nbBookmarks": 440,"imageUrls": [],"videoUrls": [],"hashtags": [],"quotedPostId": "2042295688323875316","quotedPostText": "We’re updating our ChatGPT Pro and Plus subscriptions to better support the growing use of Codex.\n\nWe’re introducing a new $100/month Pro tier. This new tier offers 5x more Codex usage than Plus and is best for longer, high-effort Codex sessions. \n\nIn ChatGPT, this new Pro tier still offers access to all Pro features, including the exclusive Pro model and unlimited access to Instant and Thinking models.\n\nTo celebrate the launch, we’re increasing Codex usage for a limited time through May 31st so that Pro $100 subscribers get up to 10x usage of ChatGPT Plus on Codex to build your most ambitious ideas.","quotedAuthorHandle": "OpenAI","replyToHandle": null,"replyToPostId": null,"quoteCount": 128,"language": "en","source": "Twitter Web App","conversationId": "2042296046009626989","inReplyToUserId": null,"isPinned": false,"authorId": "4398626122","authorFollowersCount": 10942000,"authorFollowingCount": 3,"authorIsVerified": true,"authorIsBlueVerified": true,"authorVerifiedType": "Business","searchQuery": "openai","sourceUrl": null,"sourceType": "searchQuery","resultPosition": 1}
Params
| Field | Type | Description |
|---|---|---|
postId | string or null | X post ID when available. |
postUrl | string or null | Canonical X post URL when available. |
postText | string or null | Raw post text. |
postDateTime | string or null | Post timestamp in ISO 8601 format. |
authorHandle | string or null | Author handle without @. |
authorDisplayName | string or null | Author display name. |
authorAvatarUrl | string or null | Author avatar image URL. |
nbLikes | number or null | Like count. |
nbReposts | number or null | Repost count. |
nbReplies | number or null | Reply count. |
nbViews | number or null | View count. |
nbBookmarks | number or null | Bookmark count. |
imageUrls | string[] | Image media URLs from the post. |
videoUrls | string[] | Video media URLs from the post. |
hashtags | string[] | Hashtags extracted from the post. |
quotedPostId | string or null | Quoted post ID when the result quotes another post. |
quotedPostText | string or null | Quoted post text when available. |
quotedAuthorHandle | string or null | Quoted post author handle when available. |
replyToHandle | string or null | Replied-to handle when the post is a reply. |
replyToPostId | string or null | Replied-to post ID when available. |
quoteCount | number or null | Quote count when available. |
language | string or null | X language code when available. |
source | string or null | Posting client/source when available. |
conversationId | string or null | X conversation ID when available. |
inReplyToUserId | string or null | Replied-to user ID when available. |
isPinned | boolean or null | Pinned flag when available. |
authorId | string or null | X author user ID when available. |
authorFollowersCount | number or null | Author follower count when available. |
authorFollowingCount | number or null | Author following count when available. |
authorIsVerified | boolean or null | Author verified flag when available. |
authorIsBlueVerified | boolean or null | Author blue-verified flag when available. |
authorVerifiedType | string or null | Verification type when available. |
searchQuery | string or null | Search query or derived X syntax that produced the row. |
sourceUrl | string or null | Input URL that produced the row, when applicable. |
sourceType | string or null | Source kind, such as searchQuery or profileUrl. |
resultPosition | number or null | 1-based position within that source search. |
Trending topic row params
| Field | Type | Description |
|---|---|---|
rowType | trend | Identifies a trending-topic row. |
trendName | string | Trend name returned by Twitter/X. |
trendRank | number | Position in the selected region's trend list. |
trendQuery | string or null | Search query associated with the trend when exposed. |
trendSearchUrl | string or null | Search-ready X URL for posts about the trend. |
tweetVolume | number or null | Tweet volume when Twitter/X exposes it. |
regionId | string | Verified trend-region ID used for the run. |
regionName | string | Verified trend-region name used for the run. |
regionCountry | string | Country or global label for the region. |
regionCountryCode | string or null | ISO country code, or null for Worldwide. |
scrapedAt | string | Time the trend list was scraped, in ISO 8601 format. |
Profile row params
| Field | Type | Description |
|---|---|---|
rowType | profile | Identifies a profile-search row. |
profileId | string or null | X profile ID when exposed in the profile search result. |
profileUrl | string or null | Canonical X profile URL. |
twitterUrl | string or null | twitter.com profile URL. |
handle | string or null | Profile handle without @. |
displayName | string or null | Profile display name. |
bio | string or null | Bio text when exposed in the search result. |
location | string or null | Public profile location when exposed in the search result. |
avatarUrl | string or null | Profile avatar image URL. |
bannerUrl | string or null | Profile banner image URL when exposed in the search result. |
followersCount | number or null | Follower count when exposed in the search result. |
followingCount | number or null | Following count when exposed in the search result. |
postsCount | number or null | Public post count when exposed in the search result. |
likesCount | number or null | Public like count when exposed in the search result. |
isVerified | boolean or null | Verification flag when exposed in the search result. |
pinnedPostIds | string[] | Pinned post IDs when exposed in the search result. |
searchQuery | string | Submitted profile search query that produced the row. |
resultPosition | number | 1-based position within that submitted profile search query. |
scrapedAt | string | Time the profile search run scraped the row, in ISO 8601 format. |
🛠️ Input
Example
{"postSearchUrls": ["https://x.com/search?q=openai"],"searchQuery": "from:OpenAI codex","fromUsers": ["OpenAI"],"language": "en","searchMode": "latestAndTop","startDate": "2026-03-15","maxNbItemsToScrape": 25}
{"target": "searchProfiles","profileSearchQueries": ["AI researcher","developer tools founder"],"maxNbItemsToScrape": 25}
Params
| Param | Type | Description | Default / empty behavior |
|---|---|---|---|
target | searchPosts / searchProfiles / trendingTopics | Choose whether the run emits post rows, profile rows, or trending-topic rows. | Defaults to searchPosts. |
trendRegionId | string | Verified Twitter/X trend region for Trending Topics runs. | Defaults to Worldwide. |
profileSearchQueries | string[] | People search queries for Search Profiles runs. | Empty means unused unless target is searchProfiles. |
postSearchUrls | string[] | Supported X/Twitter search, profile, list, or status URLs for Search Posts runs. | Empty means unused. Status URLs search for posts quoting that status. |
searchQuery | string | Plain text or X/Twitter advanced search syntax for Search Posts runs. | Empty means unused. |
mentions | string[] | Require posts that mention these handles. Do not include @. | Empty means unused. |
fromUsers | string[] | Require posts from these handles. Do not include @. | Empty means unused. |
hashtags | string[] | Require these hashtags. Do not include #. | Empty means unused. |
toUsers | string[] | Require posts addressed to these handles. Do not include @. | Empty means unused. |
shouldIncludeOriginalPosts | boolean | Keep original posts in the output. | Defaults to true. |
shouldIncludeReposts | boolean | Keep reposts without added text in the output. | Defaults to false. |
shouldIncludeQuotePosts | boolean | Keep quote posts in the output. | Defaults to true. |
shouldIncludeReplies | boolean | Keep replies in the output. | Defaults to true. |
links | include / onlyLinks / onlyWithoutLinks | Include all posts, only posts with links, or only posts without links. | Defaults to include. |
media | include / onlyMedia / onlyImages / onlyVideos | Include all posts, only media posts, only image posts, or only video posts. | Defaults to include. |
searchMode | latest / top / latestAndTop | Use latest-style results, X top-search ordering, or both with post-ID dedupe. | Defaults to latest; the starter form prefills latestAndTop. |
startDate | string | Only include posts on or after this ISO 8601 or YYYY-MM-DD value. | Empty searches from 30 days before run start. |
endDate | string | Only include posts on or before this ISO 8601 or YYYY-MM-DD value. | Empty leaves the upper bound open. |
language | string | Restrict the search to a language code such as en. | Empty means unused. |
near | string | X location text such as San Francisco. | Empty means unused. |
within | string | Radius such as 15mi or 25km, usually paired with near. | Empty means unused. |
geocode | string | Raw X geocode syntax such as 37.776,-122.417,10km. | Empty means unused and takes priority over near/within. |
placeId | string | X place ID filter. | Empty means unused. |
maxId | string | Only include posts at or before this X post ID. | Empty means unused. |
sinceId | string | Only include posts after this X post ID. | Empty means unused. |
minLikes | integer | Only include posts with at least this many likes. | Empty means unused. |
minReplies | integer | Only include posts with at least this many replies. | Empty means unused. |
minRetweets | integer | Only include posts with at least this many reposts. | Empty means unused. |
maxNbItemsToScrape | integer | Maximum number of dataset rows to emit. | Defaults to 0, which emits all matching rows after filtering and ordering. |
shouldIncludePromotedPosts | boolean | Keep promoted search results in the output. | Defaults to false. |
Important
- Search Posts runs must provide at least one positive selector:
postSearchUrls,searchQuery,mentions,fromUsers,hashtags, ortoUsers. - Supported post search URLs are X/Twitter search URLs, profile URLs, list URLs, and status URLs. Status URLs search for posts quoting that status; they do not fetch a single post or thread.
- Unsupported non-empty X/Twitter URLs stop cleanly before scraping so users can fix the input.
- Search Profiles runs must provide at least one
profileSearchQueriesvalue. They emit one row per matched People search result and do not scrape profile timelines, followers, following, or profile-about pages. - Trending Topics runs use verified region choices only and do not automatically scrape posts for each trend.
- At least one of
shouldIncludeOriginalPosts,shouldIncludeReposts,shouldIncludeQuotePosts, orshouldIncludeRepliesmust staytrue. - Latest mode emits newest-first results. Top mode preserves X top-search ordering. Latest + Top runs both and dedupes by post ID.
maxNbItemsToScrape: 0emits all matching rows after filtering and ordering.- You only provide search filters. Source access is managed inside the actor.
⚠️ Error handling
- Invalid input combinations fail before any Twitter/X requests start. This includes runs with no positive selector, runs with all four content-type switches turned off, or date windows where the start date is after the end date.
- If the actor cannot initialize the required Apify proxy path, the run fails before sending live Twitter/X traffic.
- When Twitter/X temporarily blocks a page, the actor retries the page when possible.
- If Twitter/X cannot complete the first search page after bounded recovery, the run completes gracefully with 0 rows and a clear status so users are not charged for missing output.
- If a later page fails after rows were already collected, the run still finishes successfully with partial results and a concise status message explaining the early stop.
💳 Pricing
Twitter Scraper uses pay-per-event pricing. You are charged $0.0001 for each returned post, profile, or trend item saved to the dataset.
Runs that stop before saving rows do not charge the dataset-item event. Keep Maximum items across the whole run small for your first run, then raise it when the output fits your workflow.
🔌 Integrations
- Run this Actor through the Apify API with the same input fields shown in the Input tab.
- Schedule repeat searches for watchlists, brand terms, hashtags, or trend regions.
- Export results to JSON, CSV, Excel, XML, or RSS from the Apify dataset.
- Send finished runs to webhooks or downstream tools that read Apify dataset URLs.
❓ FAQ
Does Twitter Scraper need my Twitter/X login?
No. You do not need to provide Twitter/X cookies, sessions, or credentials. The actor manages public-data access for supported searches.
Can it work as a Twitter scraper API?
Yes. You can call the Actor through the Apify API and pass the same post search, profile search, or trend input you would use in the web form.
Can it scrape images from Twitter/X posts?
Yes. For post searches, set media to onlyImages to keep posts with image media and return their imageUrls when X exposes them.
Can it scrape Twitter/X profiles?
Yes. Set target to searchProfiles and provide one or more People search queries. It returns matching profile rows, not profile timelines, followers, or following lists.
Can it scrape trending topics?
Yes. Set target to trendingTopics and choose a verified trend region. The actor returns trend rows only; it does not automatically scrape posts for each trend.
Why not use the Twitter/X API?
Use the Twitter/X API when you need an official API contract and have access to the endpoints you need. Use this Actor when you need Apify runs, exports, scheduling, webhooks, or supported public search outputs without building your own scraper.
What are Twitter/X alternatives?
For public conversation research, you can also use Reddit, Product Hunt, or web search data depending on where your audience talks. Twitter/X is useful when the job depends on posts, profiles, hashtags, media, or trends from X itself.
📝 Changelog
0.3: Added post search URLs, advanced search query support, Latest + Top search, link/media/location filters, richer flat post fields, and cleaner handled input stops for unsupported X URLs.0.2: Added Search Profiles for query-based Twitter/X profile discovery with flat profile rows and search provenance.0.1: Added Trending Topics, verified trend regions, grouped target-specific inputs, 256 MB runtime default, and pay-per-event pricing.
🆘 Support
For issues, questions, or feature requests, file a ticket and I'll fix or implement it in less than 24h 🫡
🔗 Other actors
- Twitter Media Scraper ↗ - Export image, video, and GIF media URLs from public Twitter/X posts.
- Twitter Retweet Checker ↗ - Check whether known usernames retweeted specific public Twitter/X posts.
- Twitter Screenshot Generator ↗ - Capture PNG or JPEG screenshots of public Twitter/X posts.
- Twitter Organization Affiliates Scraper ↗ - Export public affiliate accounts shown on verified X organization profiles.
- Reddit Scraper ↗ - Search Reddit posts, comments, subreddits, and users for public conversation research.
Made with ❤️ by Maxime Dupré