Twitter (X) Scraper
Pricing
from $0.10 / 1,000 scraped items
Twitter (X) Scraper
Collect public Twitter/X posts, profile search matches, profile network members, and regional trends. Export text, links, author data, media, engagement counts, and source details.
Pricing
from $0.10 / 1,000 scraped items
Rating
5.0
(1)
Developer
Maxime Dupré
Maintained by CommunityActor stats
1
Bookmarked
213
Total users
63
Monthly active users
2.7 hours
Issues response
3 days ago
Last modified
Categories
Share
🔎 Twitter (X) scraper for public data
Twitter Scraper helps researchers, marketers, and developers collect public Twitter/X posts, profile matches, profile network members, and regional trends. Get text, links, authors, media, engagement counts, and source details as structured dataset rows without giving the Actor your Twitter/X login.
- Use the Twitter scraper API to send searches and read saved rows from your code.
- Find public posts and authors with an X scraper search.
- Build a small script around Twitter scraper Python workflows.
- Find accounts by name or topic with Twitter profile search.
- Export current topics by region with a Twitter trends scraper.
- Find posts with images using the Twitter image scraper setup.
📦 Returned data
Post rows can include full text, links, time, language, post kind, author details, engagement counts, media, and conversation links. Profile rows can include identity, bio, images, public counts, verification, and the first source that found the account. Trend rows include rank, region, search link, and reported post volume when X gives it.
The Actor saves a post or profile the first time it is found. Later matches do not change that row or its source fields.
🚀 Running the Actor
- Choose one
target. - Add the matching search, profile, network, or trend input.
- Set filters and the work limit.
- Run the Actor and open its dataset.
You can search public posts by plain text, advanced X syntax, account, list, search URL, post URL, post ID, conversation ID, or quoted post ID. Profile search finds accounts. Network mode collects followers or followed accounts. Trends mode returns topics for one supported region.
🛠️ Input
Every public input field is listed below.
| Field | Type | What it does |
|---|---|---|
target | string | Chooses posts, profile search, network members, or trends. |
trendRegionId | string | Chooses a supported region for trends. |
profileSearchQueries | string[] | Finds profiles with Twitter/X People search. |
directPostUrls | string[] | Collects the exact public posts at these URLs. |
directPostIds | string[] | Collects the exact public posts with these numeric IDs. |
conversationIds | string[] | Finds public posts in these conversations. |
quotedPostIds | string[] | Finds public posts that quote these post IDs. |
networkProfileHandles | string[] | Sets profiles whose followers or following accounts to collect. |
networkType | string | Chooses followers or following accounts. |
postSearchUrls | string[] | Searches from Twitter/X search, profile, list, or post URLs. A post URL here finds quotes. |
searchQuery | string | Uses plain text or advanced Twitter/X search syntax. |
hashtags | string[] | Requires hashtags, without #. |
fromUsers | string[] | Requires authors, without @. |
mentions | string[] | Requires mentioned handles, without @. |
toUsers | string[] | Requires posts addressed to handles, without @. |
searchMode | string | Uses latest, top, or both. Each post is saved once. |
startDate | string | Keeps posts on or after this date. Empty uses the last 30 days. |
endDate | string | Keeps posts on or before this date. |
language | string | Requires a language code such as en. |
near | string | Sets a place name for location search. |
within | string | Sets a radius for near, such as 10mi. |
geocode | string | Sets latitude, longitude, and radius. |
placeId | string | Requires a Twitter/X place ID. |
links | string | Includes all posts, only posts with links, or only posts without links. |
media | string | Includes all posts or requires media, images, or videos. |
postKinds | string[] | Keeps selected original posts, quotes, replies, and reposts. |
minLikes | integer | Sets the least number of likes. |
minReplies | integer | Sets the least number of replies. |
minRetweets | integer | Sets the least number of reposts. |
shouldIncludePromotedPosts | boolean | Keeps promoted search posts when true. |
sinceId | string | Keeps posts after this post ID. |
maxId | string | Keeps posts at or before this post ID. |
maxNbItemsToScrape | integer | Stops after this many rows. Leave it empty to return all available results until the source is exhausted. |
This is the public input from the successful default-input QA run:
{"target": "searchPosts","trendRegionId": "1","networkType": "followers","searchQuery": "OpenAI","searchMode": "latestAndTop","links": "include","media": "include","postKinds": ["originalPosts","quotePosts","replies"],"shouldIncludePromotedPosts": false,"maxNbItemsToScrape": 70}
Post searches need at least one positive selector. Profile searches need a query. Network runs need a profile handle. Trends use only the chosen region.
📄 Output
A run returns only the row shape for its chosen target. Network members use the profile shape.
Post row
| Field | Type | What it does |
|---|---|---|
rowType | string | Is post. |
postKind | string or null | Says if this is an original, reply, quote, or repost. |
postId, postUrl, postText, postDateTime, language | string or null | Gives the post identity, link, text, time, and language. |
authorId, authorHandle, authorDisplayName, authorProfileUrl, authorBio, authorAvatarUrl | string or null | Gives public author identity and profile details. |
authorFollowersCount, authorFollowingCount | number or null | Gives public audience counts. |
authorCreatedAt | string or null | Gives account creation time. |
authorIsVerified, authorIsBlueVerified | boolean or null | Gives verification flags. |
authorVerifiedType | string or null | Gives the verification type. |
nbLikes, nbReposts, nbReplies, quoteCount, nbViews, nbBookmarks | number or null | Gives available engagement counts. |
imageUrls, videoUrls, gifUrls | string[] | Gives media links. |
mediaDetails | object[] | Gives available details for each media file. |
mediaDetails.id, mediaDetails.altText, mediaDetails.type, mediaDetails.url, mediaDetails.thumbnailUrl | string or null | Gives the media ID, text, kind, file link, and preview link. |
mediaDetails.width, mediaDetails.height, mediaDetails.durationMs | number or null | Gives the media size and length. |
mediaDetails.aspectRatio, mediaDetails.contentType | string or null | Gives the media shape and file type. |
mediaDetails.variants | object[] | Gives available video file choices. |
mediaDetails.variants.url, mediaDetails.variants.contentType | string or null | Gives each video file link and type. |
mediaDetails.variants.bitrate | number or null | Gives each video file bitrate. |
hashtags | string[] | Gives hashtags without #. |
quotedPostId, quotedPostText, quotedAuthorHandle | string or null | Gives quoted-post context. |
replyToHandle, replyToPostId, conversationId, inReplyToUserId | string or null | Gives reply and conversation context. |
isPinned | boolean or null | Says if X marks the post as pinned. |
source | string or null | Gives the posting client label. |
searchQuery, sourceUrl, sourceType | string or null | Gives the first input source that found the post. |
resultPosition | number or null | Gives its 1-based place in that source. |
{"rowType": "post","postKind": "reply","postId": "2082145401826607469","postUrl": "https://x.com/quantlinkai/status/2082145401826607469","postText": "Microsoft ended last quarter with $627B of commercial RPO, up 99% year over year. Excluding OpenAI, that backlog grew a more modest 26%.\n\nThe key question: can Azure keep converting that broader demand into growth and margins that support the AI buildout?\n\n2/3 $MSFT https://t.co/ixyMyQWRxQ","postDateTime": "2026-07-28T16:45:22.000Z","authorHandle": "quantlinkai","authorDisplayName": "QuantLink.ai","authorAvatarUrl": "https://pbs.twimg.com/profile_images/2056829078649413632/te_sKDKt_normal.jpg","authorProfileUrl": "https://x.com/quantlinkai","authorBio": "Quant tools for stock analysts and portfolio managers. Global stocks & ETFs, AI agents, ML, factor models, and portfolio optimization.","authorCreatedAt": "2025-10-01T15:54:08.000Z","nbLikes": 0,"nbReposts": 0,"nbReplies": 1,"nbViews": null,"nbBookmarks": 0,"imageUrls": ["https://pbs.twimg.com/media/HOVENWMWMAAxuDy.jpg"],"videoUrls": [],"gifUrls": [],"mediaDetails": [{"id": "2082145398815076352","altText": null,"type": "image","url": "https://pbs.twimg.com/media/HOVENWMWMAAxuDy.jpg","thumbnailUrl": "https://pbs.twimg.com/media/HOVENWMWMAAxuDy.jpg","width": 1200,"height": 696,"durationMs": null,"aspectRatio": null,"contentType": null,"variants": []}],"hashtags": [],"quotedPostId": null,"quotedPostText": null,"quotedAuthorHandle": null,"replyToHandle": "quantlinkai","replyToPostId": "2082145397405810716","quoteCount": 0,"language": "en","source": null,"conversationId": "2082145397405810716","inReplyToUserId": "1973415859856220160","isPinned": null,"authorId": "1973415859856220160","authorFollowersCount": 116,"authorFollowingCount": 66,"authorIsVerified": true,"authorIsBlueVerified": true,"authorVerifiedType": null,"searchQuery": "OpenAI","sourceUrl": null,"sourceType": "searchQuery","resultPosition": 1}
Profile or network-member row
| Field | Type | What it does |
|---|---|---|
rowType | string | Is profile. |
profileId, profileUrl, twitterUrl, handle, displayName, bio, createdAt, location, avatarUrl, bannerUrl | string or null | Gives profile identity and public details. |
followersCount, followingCount, postsCount, likesCount | number or null | Gives public profile counts. |
isVerified | boolean or null | Gives the verification flag. |
pinnedPostIds | string[] | Gives shown pinned post IDs. |
searchQuery | string or null | Gives the query or network source that first found the profile. |
networkOwnerHandle, networkType | string or null | Gives the network source when used. |
scrapedAt | string | Gives collection time. |
resultPosition | number or null | Gives its 1-based place in the source. |
{"rowType": "profile","profileId": "4398626122","profileUrl": "https://x.com/OpenAI","twitterUrl": "https://twitter.com/OpenAI","handle": "OpenAI","displayName": "OpenAI","bio": "OpenAI’s mission is to ensure that artificial general intelligence benefits all of humanity. We’re hiring: https://t.co/dJGr6LgzPA","createdAt": null,"location": null,"avatarUrl": "https://pbs.twimg.com/profile_images/1885410181409820672/ztsaR0JW_normal.jpg","bannerUrl": "https://pbs.twimg.com/profile_banners/4398626122/1777662919","followersCount": 5063673,"followingCount": 4,"postsCount": 2016,"likesCount": 2409,"isVerified": true,"pinnedPostIds": [],"searchQuery": "OpenAI","resultPosition": 1,"scrapedAt": "2026-07-28T16:47:05.569Z"}
Trend row
| Field | Type | What it does |
|---|---|---|
rowType | string | Is trend. |
trendName | string or null | Gives the topic name. |
trendRank | number or null | Gives its rank in the region. |
trendQuery, trendSearchUrl | string or null | Gives the search query and link. |
tweetVolume | number or null | Gives the post volume reported by X. |
regionId, regionName, regionCountry, regionCountryCode | string or null | Gives region details. |
scrapedAt | string | Gives collection time. |
{"rowType": "trend","trendName": "Fauci","trendRank": 1,"trendQuery": "Fauci","trendSearchUrl": "https://x.com/search?q=Fauci","tweetVolume": null,"regionId": "23424977","regionName": "United States","regionCountry": "United States","regionCountryCode": "US","scrapedAt": "2026-07-28T16:54:14.293Z"}
💳 Pricing
This Actor uses pay-per-event pricing. You pay for each post, profile, network member, or trend row saved to the dataset. Runs that save no rows do not charge this event. Use a small work limit for a first test, then raise it if the output fits your work.
🔌 Integrations
Use the Apify API, schedules, webhooks, and dataset exports such as JSON, CSV, Excel, XML, or RSS.
❓ FAQ
Does it need my Twitter/X login?
No. You do not provide Twitter/X cookies, sessions, or credentials.
Does a post URL fetch a thread?
directPostUrls fetches the exact public post. A post URL in postSearchUrls instead finds posts that quote it. The Actor does not expand a full thread.
Can it collect followers and following accounts?
Yes. Choose network members, add public handles, and choose followers or following. Private or protected data is not supported.
Can it return every old post?
No. It can return only public results that Twitter/X makes available.
Is this an official Twitter/X API?
No. Use the official API when you need its contract. Use this Actor for supported public searches with Apify datasets, schedules, and webhooks.
📝 Changelog
0.4: Added direct post collection by URL or ID, conversation and quote discovery, and follower/following network collection. Improved search reliability when Twitter/X returns incomplete responses.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 🫡
🔗 Related Actors
- Twitter Media Scraper — collect image, video, and GIF links from public posts.
- Twitter Retweet Checker — check whether known users reposted public posts.
- Twitter Screenshot Generator — make images of public posts.
- Twitter Organization Affiliates Scraper — map public affiliate accounts for X organizations.
- Social Media Stats Checker — compare public profile stats across X and other sites.
Made with ❤️ by Maxime Dupré