Twitter (X) Scraper avatar

Twitter (X) Scraper

Pricing

from $0.10 / 1,000 scraped items

Go to Apify Store
Twitter (X) Scraper

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é

Maxime Dupré

Maintained by Community

Actor stats

1

Bookmarked

213

Total users

63

Monthly active users

2.7 hours

Issues response

3 days ago

Last modified

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.

📦 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

  1. Choose one target.
  2. Add the matching search, profile, network, or trend input.
  3. Set filters and the work limit.
  4. 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.

FieldTypeWhat it does
targetstringChooses posts, profile search, network members, or trends.
trendRegionIdstringChooses a supported region for trends.
profileSearchQueriesstring[]Finds profiles with Twitter/X People search.
directPostUrlsstring[]Collects the exact public posts at these URLs.
directPostIdsstring[]Collects the exact public posts with these numeric IDs.
conversationIdsstring[]Finds public posts in these conversations.
quotedPostIdsstring[]Finds public posts that quote these post IDs.
networkProfileHandlesstring[]Sets profiles whose followers or following accounts to collect.
networkTypestringChooses followers or following accounts.
postSearchUrlsstring[]Searches from Twitter/X search, profile, list, or post URLs. A post URL here finds quotes.
searchQuerystringUses plain text or advanced Twitter/X search syntax.
hashtagsstring[]Requires hashtags, without #.
fromUsersstring[]Requires authors, without @.
mentionsstring[]Requires mentioned handles, without @.
toUsersstring[]Requires posts addressed to handles, without @.
searchModestringUses latest, top, or both. Each post is saved once.
startDatestringKeeps posts on or after this date. Empty uses the last 30 days.
endDatestringKeeps posts on or before this date.
languagestringRequires a language code such as en.
nearstringSets a place name for location search.
withinstringSets a radius for near, such as 10mi.
geocodestringSets latitude, longitude, and radius.
placeIdstringRequires a Twitter/X place ID.
linksstringIncludes all posts, only posts with links, or only posts without links.
mediastringIncludes all posts or requires media, images, or videos.
postKindsstring[]Keeps selected original posts, quotes, replies, and reposts.
minLikesintegerSets the least number of likes.
minRepliesintegerSets the least number of replies.
minRetweetsintegerSets the least number of reposts.
shouldIncludePromotedPostsbooleanKeeps promoted search posts when true.
sinceIdstringKeeps posts after this post ID.
maxIdstringKeeps posts at or before this post ID.
maxNbItemsToScrapeintegerStops 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

FieldTypeWhat it does
rowTypestringIs post.
postKindstring or nullSays if this is an original, reply, quote, or repost.
postId, postUrl, postText, postDateTime, languagestring or nullGives the post identity, link, text, time, and language.
authorId, authorHandle, authorDisplayName, authorProfileUrl, authorBio, authorAvatarUrlstring or nullGives public author identity and profile details.
authorFollowersCount, authorFollowingCountnumber or nullGives public audience counts.
authorCreatedAtstring or nullGives account creation time.
authorIsVerified, authorIsBlueVerifiedboolean or nullGives verification flags.
authorVerifiedTypestring or nullGives the verification type.
nbLikes, nbReposts, nbReplies, quoteCount, nbViews, nbBookmarksnumber or nullGives available engagement counts.
imageUrls, videoUrls, gifUrlsstring[]Gives media links.
mediaDetailsobject[]Gives available details for each media file.
mediaDetails.id, mediaDetails.altText, mediaDetails.type, mediaDetails.url, mediaDetails.thumbnailUrlstring or nullGives the media ID, text, kind, file link, and preview link.
mediaDetails.width, mediaDetails.height, mediaDetails.durationMsnumber or nullGives the media size and length.
mediaDetails.aspectRatio, mediaDetails.contentTypestring or nullGives the media shape and file type.
mediaDetails.variantsobject[]Gives available video file choices.
mediaDetails.variants.url, mediaDetails.variants.contentTypestring or nullGives each video file link and type.
mediaDetails.variants.bitratenumber or nullGives each video file bitrate.
hashtagsstring[]Gives hashtags without #.
quotedPostId, quotedPostText, quotedAuthorHandlestring or nullGives quoted-post context.
replyToHandle, replyToPostId, conversationId, inReplyToUserIdstring or nullGives reply and conversation context.
isPinnedboolean or nullSays if X marks the post as pinned.
sourcestring or nullGives the posting client label.
searchQuery, sourceUrl, sourceTypestring or nullGives the first input source that found the post.
resultPositionnumber or nullGives 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

FieldTypeWhat it does
rowTypestringIs profile.
profileId, profileUrl, twitterUrl, handle, displayName, bio, createdAt, location, avatarUrl, bannerUrlstring or nullGives profile identity and public details.
followersCount, followingCount, postsCount, likesCountnumber or nullGives public profile counts.
isVerifiedboolean or nullGives the verification flag.
pinnedPostIdsstring[]Gives shown pinned post IDs.
searchQuerystring or nullGives the query or network source that first found the profile.
networkOwnerHandle, networkTypestring or nullGives the network source when used.
scrapedAtstringGives collection time.
resultPositionnumber or nullGives 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

FieldTypeWhat it does
rowTypestringIs trend.
trendNamestring or nullGives the topic name.
trendRanknumber or nullGives its rank in the region.
trendQuery, trendSearchUrlstring or nullGives the search query and link.
tweetVolumenumber or nullGives the post volume reported by X.
regionId, regionName, regionCountry, regionCountryCodestring or nullGives region details.
scrapedAtstringGives 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 🫡

Made with ❤️ by Maxime Dupré