Skip to content

Tweet Scraper

Try for free

Scrape public posts from X (Twitter) profiles and tweet URLs: text, timestamps, likes, reposts, replies, views, media, and author details, straight from the logged-out page.

🐦 Tweet Scraper

Public posts from X profiles, paginated to the size you ask for, with the author and the engagement counts that response actually includes.

Built for research, social listening, and anyone who needs a clean dataset of public posts without starting a browser.

Watch the video tutorial to see how it works:

✨ Features

  • 👤 Profiles, newest first. A handle (NASA), a profile URL, from:handle, or author by itself returns that account’s posts, newest first, until maxItems. They come from the public profile timeline. For some accounts X shows logged-out visitors an older selection of posts instead of the newest; then recent posts come from the search index (the past day, widening to the past week, month and year, or your start/end range, typically a few hours behind live X) and that selection is added after them. Replies to other accounts are not included; the account’s own threads are. X's logged-out profile timeline sends no view count, so each post that will be saved (up to maxItems) is read back with X's single-post lookup, which adds viewCount; a post whose lookup fails keeps the timeline copy without it. A retweet is one row: the reposted post is in its retweet field (and a quoted post in quote), not saved again as a row of its own, so maxItems and the price count only the account’s own timeline posts. How far back the timeline goes is set by X: logged-out visitors see only part of an account’s timeline (for one busy account in November 2026, its newest 822 posts, about ten days), and the run’s status message says how far back it went. For older posts, turn on Full post history (below). For many small accounts X shows logged-out visitors no profile timeline at all (in November 2026, 17 of 21 company accounts we checked). Their posts then come from the search index and from the post pages the Wayback Machine saved, each read live from X, newest first, and the status message says so; posts neither of them holds can't be reached. When nothing is found, the status message says what X lists for the account: no posts, a private account, or posts that logged-out visitors can't see.
  • 🕰️ Full post history. Turn on fullHistory and a handle (or from:handle with dates) also returns the account’s older posts, back to its first year. Their addresses come from the status pages the Wayback Machine (web.archive.org) saved for that account, and each post is then read live from X, so you get today’s text, counts and media. Coverage depends on what the archive saved: for one embassy account in November 2026 it held about 8,000 of the 12,567 posts and replies the account lists. Posts it never saved, deleted posts and replies to other accounts can’t be reached. Older posts are read at 3 to 5 per second in our tests (about 6,000 in 30 minutes), so the default one-hour run timeout fits roughly 10,000 posts; raise it for more. They cost the same per post as any other.
  • 🔗 Tweet URLs. A status URL returns that post, read with X's single-post lookup; a post X sends along with it (such as the post it quotes) is stored as its own row.
  • 💬 Conversation ids. A conversation id is read as that focal status page.
  • 🔎 Search. A keyword, a search URL, or a wizard query is matched against Google's index of public x.com posts, then each post is read back from X before it is stored. Top returns the most relevant posts. Latest returns recent posts via the search index, newest first: it looks at the past day, then widens to the past week and month. It is typically a few hours behind live X, so posts from the last hour or two may be missing. When the index gives fewer posts than the input may save, X's public search adds the rest (a post already saved for the input is not saved again), after the index's posts; if X has no more either, the status says how many of the limit were found. Location operators (near:, geocode:, place:) are not supported by this route. from:handle with language, image, video, verified, quote, Twitter Blue, and minimum-count filters is read like a handle (see Profiles).
  • 📅 Date window. start and end keep posts on or after the start date and before the end date, in UTC. For a handle, the window covers the part of the timeline X shows logged-out visitors (see Profiles); with Full post history on, it also covers the older posts the Wayback Machine saved. Without it, a range older than the timeline returns no posts, and the status message gives the date the timeline reached.
  • 📊 Engagement that was sent. Retweets, replies, likes, quotes, and bookmarks stay on the item, including a real zero. View count is included when that response sends it.
  • 🖼️ Media, cards, and mentions. Photos, videos, link cards, and @mentions are included when that post contains them.
  • 🛟 One bad input does not abort the run. An unsupported URL or a closed surface is recorded and the next input is still fetched.
  • ⚡ Long lists. Up to 8 inputs (post links, handles, searches) are read at once, each on its own logged-out X session and residential exit, and the rows still come out in the order of your inputs. In our tests a list of 237 post links took about 20 seconds (262 seconds one at a time). Profile timelines hold many posts in memory while they are read, so 8 run at once at the default 512 MB (2 at 256 MB): 40 whole timelines took about 4.5 minutes at 512 MB and 16 minutes at 256 MB. When X refuses many requests, fewer inputs run at once until it answers cleanly again. The same input entered twice (the same post link in any form, the same handle in any case, the same search) is scraped once. Inside one input a post is saved once (Latest + Top on one handle included). Different inputs that return the same post (two keyword searches, a keyword search and a handle whose posts it matches, a quote post link and a link to the post it quotes) each return it; with includeSearchTerms every row's searchTerm names the input it came from. A request that stalls is dropped after a few seconds and tried again on a fresh session. Shortly before the run timeout the run stops cleanly: everything finished is saved, and the inputs not finished are listed in the key-value store record NOT_REACHED and named in the status message.
  • 🎯 Posts from every input. maxItems is the total for the run across all inputs, filled in input order. Set maxItemsPerInput (for example 20) to get up to that many posts from each handle or search, and set maxItems to cover them all (5 handles x 20 = 100).
  • 🧩 Your own fields. customMapFunction receives each post. The object it returns is the row that is stored.

🚀 Why teams use this

  • Fast and light. There is no browser startup.
  • Production runs. The actor uses residential proxy sessions, one per input read at once. A blocked or rate-limited call is retried on a new session.
  • A failed URL does not kill the run. The rest of the handles and URLs still land in the dataset.
  • No invented fields. If a response does not include a flag or a count, that key is left off the item.

💡 Use cases

  • Monitor what an account or brand posts on X, with engagement counts.
  • Collect tweets for research, sentiment analysis, or news tracking.
  • Archive public posts from a list of handles or tweet URLs.

🧪 Example input

{
  "maxItems": 20,
  "sort": "Latest",
  "tweetLanguage": "en",
  "twitterHandles": [
    "NASA"
  ]
}

🧾 Sample output

One item from a real run of the example input, shortened. Long text is cut and lists show their first entries.

{
  "type": "tweet",
  "id": "2109435410850193473",
  "url": "https://x.com/NASA/status/2109435410850193473",
  "twitterUrl": "https://twitter.com/NASA/status/2109435410850193473",
  "text": "RT @NASAJohnson: One. More. Day.\n\nFlight director applications close TOMORROW. Sharpen your pencils, steady your focus, and get ready to ma…",
  "retweetCount": 76,
  "replyCount": 0,
  "likeCount": 0,
  "quoteCount": 0,
  "createdAt": "Mon Oct 12 00:06:08 +0000 2026",
  "lang": "en",
  "bookmarkCount": 0,
  "author": {
    "type": "user",
    "userName": "NASA",
    "url": "https://x.com/NASA",
    "twitterUrl": "https://twitter.com/NASA",
    "id": "11348282",
    "name": "NASA",
    "isBlueVerified": true,
    "verifiedType": "Government",
    "profilePicture": "https://pbs.twimg.com/…",
    "followers": 92326677,
    "following": 115
  },
  "mentions": [
    {
      "id": "50115087",
      "userName": "NASAJohnson"
    }
  ],
  "isRetweet": true
}

📥 Input

Use the same field names as the console form.

FieldWhat it does
twitterHandlesProfiles to read. @ is optional.
startUrlsProfile URLs, tweet URLs, list URLs, search URLs, or profile tabs.
searchTermsAdvanced-search text. from:handle with the supported filters is read like a handle, newest first.
conversationIdsFocal status ids.
maxItemsThe most posts for the whole run, in total across all handles, search terms, URLs and conversation ids (default 20). Inputs run in the order you entered them, so the first ones can use up the whole limit and later ones get no posts; the status message then names the inputs that were not run. For posts from each input, also set maxItemsPerInput and set maxItems to at least that times the number of inputs (5 handles x 20 = 100).
maxItemsPerInputOptional. The most posts from each handle, search term, URL or conversation id (all sorts of one input together), so every input gets its share. maxItems still caps the whole run. Empty: no limit per input.
sortLatest, Top, or Latest + Top. For keyword search, Latest means recent posts via a search index (typically a few hours behind live X). For a handle, Latest returns its newest posts first (see Profiles above), and Top returns the public profile timeline in the order X gives it, which for some accounts is popular posts in no date order. Latest + Top does not fetch the same profile twice.
tweetLanguagelang: filter on a from:handle timeline. X's own code is sent where it differs from ISO 639-1: Indonesian id -> in, Hebrew he -> iw, Norwegian nb/nn -> no; each post's lang shows X's code.
onlyVerifiedUsersKeep verified or Twitter Blue authors on that timeline.
onlyTwitterBlueKeep Twitter Blue authors on that timeline.
onlyImage / onlyVideo / onlyQuoteKeep posts with a photo, a video, or a quote.
author, inReplyTo, mentioningKept when the post is from that account, a reply to that account, or mentions that account. author by itself returns that account’s posts like a handle; inReplyTo or mentioning by itself searches for posts replying to or mentioning that account.
minimumRetweets, minimumFavorites, minimumRepliesMinimum counts on a from:handle timeline.
start / endDate window (UTC) for keyword search, handles and from:handle. For a handle it covers the posts X shows logged-out visitors (see Profiles), plus older archived posts when fullHistory is on.
fullHistoryFull post history for handles and from:handle: adds the account’s older posts found through the Wayback Machine, each read live from X. Off by default. Allow a long run timeout for thousands of posts.
includeSearchTermsAdds searchTerm with the input that found the post: the handle, the query, the link or the conversation id.
customMapFunctionJavaScript function that receives each post. The object it returns is stored. If it throws, or returns nothing for a post, the run stores no rows.
geotaggedNear, withinRadius, geocode, placeObjectIdPlace-tagged posts for that place. A radius keeps places whose center falls inside it.

A /highlights profile URL reads that account’s highlights timeline. /media keeps posts that have a photo or video. /with_replies keeps replies written by that account. A list URL keeps posts from that list. /articles reads that account’s articles timeline. An account with no articles stores no posts and no failed item.

📤 Output

Each post is one dataset item. Keys appear only when the response sent a value.

FieldMeaning
id, url, twitterUrl, text, createdAt, langThe post. createdAt is the UTC timestamp from the response.
fullTextThe whole post text. For a long post this is the expanded note text, where text is cut short.
conversationId, sourceThread id and posting client, when the response sends them (profile timelines do).
retweetCount, replyCount, likeCount, quoteCount, bookmarkCountCounts from the response, including zero.
viewCountPresent when the response includes a view count. Profile timeline pages often omit it, and X has no view counts for posts from before December 2022.
possiblySensitivePresent when the response sends it, including false.
authoruserName, name, id, url, twitterUrl, isBlueVerified, verifiedType, profilePicture, followers, following, plus description, location, createdAt, statusesCount, mediaCount, favouritesCount, coverPicture, isProtected when sent.
mediatype, mediaUrl, expandedUrl, width, height, altText (when the author wrote one), and videoUrl / durationMillis for videos.
mentions, hashtags, urls, cardIncluded when the post has them.
isReply, inReplyToId, inReplyToUserName, inReplyToUserIdSet when the post is a reply.
isRetweet, retweetSet when the post is a retweet. retweet is the reposted post with the same fields.
isQuote, quoteId, quoteSet when the post is a quote. quoteId only when an id was sent; quote is the quoted post when X embeds it.
searchTermSet when includeSearchTerms is on.

A failed input does not create a dataset row. It is listed in the run's OUTPUT key-value record as failedInputs: [{input, reason}] and summarised in the status message, for example "Saved 235 posts from 235 of 237 inputs. 2 of 237 inputs gave nothing (2 post or timeline not available): ...". reason is a short status such as HTTP 404 list_unavailable, user_unavailable, no public posts matched the search, or a sentence for a handle or post link that gave nothing, e.g. "@example has not posted anything (X lists 0 posts)" or "X shows logged-out visitors no post at this link (it may be deleted, private or age-restricted)". It does not include the response body.

Run locally

pip install -r requirements.txt
python -m src

On Scrapely the actor asks for a residential proxy session and 1024 MB.

❓ FAQ

Can I schedule it or use the API? Yes. Save your input as a task and schedule it, or start runs and read the results through the Scrape.ly API, CLI, or from AI agents through the Scrape.ly MCP server.

The internet is full of data.
Start owning yours.

Scrape.ly gives you the infrastructure, the tooling, and the team to extract, process, and operationalize web data at any scale. Setup takes minutes.

No credit card. No setup calls.