X Twitter Thread Scraper avatar

X Twitter Thread Scraper

Pricing

from $1.08 / 1,000 thread tweet exporteds

Go to Apify Store
X Twitter Thread Scraper

X Twitter Thread Scraper

Unroll X (Twitter) threads from post URLs or IDs. Exports only the author's own thread tweets in order, with text, media, links, timestamps and engagement. Start from any post in the thread. No login or cookies.

Pricing

from $1.08 / 1,000 thread tweet exporteds

Rating

0.0

(0)

Developer

Automation Lab

Automation Lab

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

3

Monthly active users

3 days ago

Last modified

Categories

Features

Limited permissions

Share

Unroll public X (Twitter) threads from post URLs or IDs and export only the tweets the author wrote, in reading order, with text, media, links, timestamps and engagement counts.

X Twitter Thread Scraper takes any post of a thread — the first post, one in the middle, or the last one — finds where the thread starts, follows the author's own replies to the end, and saves one clean row per thread tweet. Replies from other people are left out, so the dataset is the thread exactly as the author published it. No X account, login or cookies are needed.

What does this X thread scraper do?

For each post URL or ID you supply, the Actor:

  1. validates the URL or numeric ID (x.com, twitter.com and mobile links work);
  2. loads X's public logged-out post page;
  3. walks up the chain of the author's self-replies to the first post of the thread;
  4. follows the author's self-replies down until X shows no further continuation;
  5. drops every post written by other accounts;
  6. numbers the thread tweets from 1 (oldest) to N and saves them to the dataset.

If two inputs belong to the same thread, the thread is exported once. A post that is not a thread is returned as a one-tweet thread.

Who is it for?

  • Researchers and archivists preserving long-form threads before they are edited or deleted.
  • Content teams and newsletter writers turning creator threads into articles, summaries or quote collections.
  • Social media analysts comparing how each part of a thread performs (likes, reposts, views per position).
  • AI and data engineers feeding complete, ordered thread text into LLM summarization, RAG or training pipelines.
  • Brand and competitor monitors saving announcement threads from companies and public figures.

Choose this Actor when you already know which posts you want. It does not search X by keyword and does not list a profile's posts.

Why use this Actor?

  • Author-only output. Other people's replies never appear as thread items, unlike generic "thread" tools that mix in the reply section.
  • Start anywhere. A link to tweet 17 of 40 still returns tweets 1-40 in order.
  • Complete threads. The Actor opens every thread tweet whose replies are not all visible yet, so long threads are not cut at the first page and later additions (such as an "Updated:" reply years later) are found.
  • Ready for reading order. threadPosition, threadLength, threadRootId and parentPostId make it trivial to rebuild or join threads.
  • Clean text. Leading reply handles are removed and t.co links are expanded to their real destination.
  • No login, no cookies, no browser. Lightweight HTTP requests keep runs fast and inexpensive.
  • Clear failures. Deleted, private or unavailable posts are reported in the log and status message instead of producing misleading empty success.

What X thread data can I extract?

FieldMeaning
postId, postUrlID and canonical URL of the thread tweet
threadRootId, threadRootUrlFirst post of the thread
threadPosition, threadLengthPosition (1 = first) and number of exported thread tweets
isThreadRoottrue for the first post
sourceInput, sourcePostIdThe input value that led to this thread
parentPostId, parentUsernameThe post this tweet replies to (the previous thread tweet, or the post the thread answers)
textVisible text with t.co links expanded
createdAt, language, isEditedPublication time, language code, edit status
authorId, authorUsername, authorNameThread author
authorProfileUrl, authorAvatarUrlProfile and 400x400 avatar URLs
authorFollowers, authorFollowingPublic follower and following counts
authorVerified, authorVerifiedTypeBlue verification and organisation type (Business, Government)
replyCount, repostCount, likeCount, quoteCount, bookmarkCount, viewCountEngagement counts per tweet
mediaPhotos, videos and GIFs: type, url (best MP4 for videos), previewUrl, width, height, durationMs
links, hashtags, mentionsExpanded links, hashtags and mentioned usernames
quotedPostId, quotedPostUrlQuoted post, when the tweet quotes one
scrapedAtWhen the row was produced

Fields X does not show to logged-out visitors are null (for example viewCount on posts from before X counted views).

How to get started

  1. Open the Actor on Apify and click Try for free.
  2. Paste one or more post URLs or IDs into Post URLs or IDs, for example https://x.com/naval/status/1002103360646823936.
  3. Optionally lower Maximum tweets per thread to cap very long threads.
  4. Click Start and wait a few seconds per thread.
  5. Open the Thread tweets view in the Output tab, or export the dataset as JSON, CSV, Excel or HTML.

Input parameters

ParameterTypeDefaultDescription
postUrlsarray of stringsrequiredPost URLs (https://x.com/<user>/status/<id>, twitter.com, mobile links, /photo/1 suffixes and query strings are fine) or numeric post IDs. Up to 500 per run. Any post of a thread works.
maxTweetsPerThreadinteger100Maximum tweets exported per thread, counted from the first post. Range 1-1000.
requestDelayMsinteger300Pause before each X page request. Raise it for very large batches.

Example input:

{
"postUrls": [
"https://x.com/naval/status/1002103360646823936",
"2087601629486813499"
],
"maxTweetsPerThread": 100
}

Invalid URLs (not an X post link and not a numeric ID) and an empty list stop the run before anything is charged, with a clear message, so a misconfigured batch costs nothing. The start fee is charged once the input is valid, even if every post later turns out to be deleted or private.

Output example

One row from a 10-tweet NASA thread, requested with an ID from the middle of the thread:

{
"postId": "2087592100812452254",
"postUrl": "https://x.com/NASA/status/2087592100812452254",
"threadRootId": "2087588849308344702",
"threadRootUrl": "https://x.com/NASA/status/2087588849308344702",
"threadPosition": 3,
"threadLength": 10,
"isThreadRoot": false,
"sourceInput": "2087601629486813499",
"sourcePostId": "2087601629486813499",
"parentPostId": "2087591782922031307",
"parentUsername": "NASA",
"text": "Protect your eyes during the eclipse! Use eclipse glasses – not sunglasses – to look at the Sun. ... More tips: https://science.nasa.gov/eclipses/safety/",
"createdAt": "2026-08-12T17:28:37.000Z",
"language": "en",
"isEdited": false,
"authorId": "11348282",
"authorUsername": "NASA",
"authorName": "NASA",
"authorProfileUrl": "https://x.com/NASA",
"authorAvatarUrl": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg",
"authorFollowers": 92295970,
"authorFollowing": 115,
"authorVerified": true,
"authorVerifiedType": "Government",
"replyCount": 13,
"repostCount": 48,
"likeCount": 350,
"quoteCount": 8,
"bookmarkCount": 18,
"viewCount": 115709,
"media": [
{
"type": "video",
"url": "https://video.twimg.com/amplify_video/2087591953508564992/vid/avc1/3840x2160/a_6DPFVboIYFb3ks.mp4?tag=29",
"previewUrl": "https://pbs.twimg.com/amplify_video_thumb/2087591953508564992/img/z2iVU-FCCUse0YDW.jpg",
"width": 3840,
"height": 2160,
"durationMs": 101205
}
],
"links": ["https://science.nasa.gov/eclipses/safety/"],
"hashtags": [],
"mentions": [],
"quotedPostId": null,
"quotedPostUrl": null,
"scrapedAt": "2026-11-01T07:10:23.266Z"
}

How much does it cost to scrape an X Twitter thread?

The Actor uses pay-per-event pricing: a small fee when a run starts plus a fee for each thread tweet saved to the dataset. You pay nothing per thread for inputs that fail to load.

EventFREEBRONZESILVERGOLD / PLATINUM / DIAMOND
Run started (once per run)$0.0005$0.0005$0.0005$0.0005
Thread tweet exported$0.0020654$0.001796$0.0014009$0.0010776

Example Actor charges at the BRONZE rate:

What you exportActor charge
A single post (1 tweet)about $0.0023
A 10-tweet threadabout $0.018
A 41-tweet thread such as naval's "How to Get Rich"about $0.074
100 thread tweets in one runabout $0.18
1,000 thread tweets in one runabout $1.80

Apify shows the applicable price for your plan before every run, and you can set a maximum charge per run. The Actor never saves a tweet it could not charge for: when the maximum charge is reached it stops cleanly, keeps the tweets already saved (their thread length matches what was saved), and says so in the run's status message. If the maximum charge does not cover even one tweet after the start fee, no post is fetched. Use Maximum tweets per thread to cap spending on unexpectedly long threads.

Thread rules: what counts as part of a thread?

A thread is the chain of posts in which an author replies to their own previous post.

  • The first post is the earliest post in that chain. If the author started the thread as a reply to someone else, parentPostId and parentUsername on the first row point to that other post, but the other post is not exported.
  • If the author replies to their own thread tweet more than once (a branch), every branch is included and rows are ordered by publication time. The Actor opens the page of every thread tweet whose reply count is higher than the replies already seen, including tweets that already have a known continuation, so a branch that X hides on the first page is still followed. Tweets with no replies need no extra page.
  • Replies by other accounts, and the author's answers to those replies, are not part of the thread.
  • Quoted posts are referenced through quotedPostId / quotedPostUrl and are not exported as separate rows.

Integrations and workflow ideas

  • Thread-to-article pipeline: run the Actor from Make, Zapier or n8n when a creator posts a thread, join text by threadPosition, and send it to an LLM for a blog draft.
  • Research archive: schedule a daily run over a list of tracked thread URLs and store results in Google Sheets, Airtable or a database to keep a copy even if posts are deleted.
  • Engagement analysis: load the dataset into a notebook and chart likeCount and viewCount by threadPosition to see where readers drop off.
  • Webhooks: trigger your own endpoint when a run finishes and fetch the dataset items through the Apify API.
  • Pair with replies: use X Twitter Post Replies Scraper for what other people answered.

API usage

Run the Actor and fetch results with cURL:

curl -X POST "https://api.apify.com/v2/acts/automation-lab~x-author-thread-tweets-from-known-posts/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"postUrls": ["https://x.com/naval/status/1002103360646823936"], "maxTweetsPerThread": 100}'

JavaScript (apify-client):

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('automation-lab/x-author-thread-tweets-from-known-posts').call({
postUrls: ['https://x.com/naval/status/1002103360646823936'],
maxTweetsPerThread: 100,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
const thread = items.sort((a, b) => a.threadPosition - b.threadPosition).map((t) => t.text).join('\n\n');
console.log(thread);

Python (apify-client):

from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("automation-lab/x-author-thread-tweets-from-known-posts").call(run_input={
"postUrls": ["https://x.com/naval/status/1002103360646823936"],
"maxTweetsPerThread": 100,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item["threadPosition"], item["text"])

Use with Apify MCP

Connect AI assistants to this Actor through the Apify MCP server. For Claude Code:

claude mcp add --transport http apify \
"https://mcp.apify.com?tools=automation-lab/x-author-thread-tweets-from-known-posts"

For Claude Desktop, Cursor or VS Code, add this to the MCP configuration:

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com?tools=automation-lab/x-author-thread-tweets-from-known-posts"
}
}
}

Selecting this Actor also adds the helper tools get-actor-run, get-dataset-items, get-key-value-store-record and abort-actor-run, so the assistant sees a small fixed set of tools rather than exactly one. Let the client list the tools (tools/list) to see their actual names and arguments. Listing tools is read-only and does not run or abort anything. A reliable assistant workflow:

  1. Start once and keep the run. Call the Actor once and keep the returned run ID, status and dataset ID (defaultDatasetId). The call waits at most 45 seconds (30 by default), so a long batch may still be running when it returns. Set the client's request timeout longer than that wait.
  2. Follow the same run, never restart it. If the run is not finished, check that same run with get-actor-run using short, growing waits (for example 2, 4, 8, then 10 seconds) up to a stated deadline such as 2 minutes. If the client itself times out, look up the known run instead of starting a new one. If the run ID is unknown, say so rather than blindly running again. At the deadline, report the run as pending with its ID. Report a failed run honestly: rows it saved are a partial result, not a complete thread.
  3. Read results in bounded pages. Once the run has succeeded, call get-dataset-items with the dataset ID, an explicit limit and offset, and only the fields you need (for example threadPosition,text,postUrl). A sensible budget is pages of 20 rows from offset 0, at most 100 rows and at most 64 KiB of serialized result text in the conversation, whichever comes first. Count dataset offsets, not rows after any filtering. Check each page's size before it reaches the model: if a page or a single long tweet would exceed the byte budget, leave it out or summarize it and say so. If your client cannot inspect responses before the model sees them, treat the byte budget as a goal, not a guarantee, and keep pages small. When you stop before the end, report how many rows were read, the next offset to continue from, and that the result is partial.
  4. Keep full exports out of the chat. For a complete archive, download the dataset (JSON, CSV or Excel) from Apify Console or the API, or process it in your own code. These limits are context budgets for the assistant only; they do not change what the Actor collects.

Token or cost savings from MCP depend on the client, model and caching setup, so no specific saving is promised here. The waits and budgets above are example choices, not Apify defaults.

Example prompts:

  • "Unroll this X thread and summarize it in five bullet points: https://x.com/naval/status/1002103360646823936"
  • "Export these three threads and tell me which tweet in each got the most likes."
  • "Turn this thread into a blog post draft, keeping the author's order."

Coverage and limitations

  • Only public posts visible to logged-out visitors can be exported. Protected accounts, age-restricted, withheld or deleted posts are reported as failed inputs.
  • Engagement counts are a snapshot at run time.
  • If a tweet in the middle of a thread was deleted, the thread is exported up to the gap; X no longer links the remaining posts to it.
  • Thread tweets that have replies are usually opened once each, up to 250 X page loads per thread. If that safety limit is reached, the run log says so.
  • The Actor does not search X, list a profile's posts, or export the reply section; use our related Actors for those jobs.

Troubleshooting

The run failed with "No thread could be exported". Every input failed to load. Open the post in a private browser window: if X asks you to log in, or shows "This post is unavailable", it cannot be exported anonymously.

I got fewer tweets than the thread shows. Check maxTweetsPerThread, and check whether the author deleted a tweet in the middle. Tweets that the author posted as replies to other people's comments are not part of the thread by design.

A row says null for views. X did not count views for older posts, or does not show them for that post.

I see temporary X errors on big batches. Raise requestDelayMs to 1000-2000 ms and split very large lists into several runs.

Data handling and dependencies

The Actor requests public X post pages directly and does not use your X account. Failed operations send sanitized diagnostic input, exceptions, and Actor/build/run IDs to our private GlitchTip service for repair. Secret fields and URL queries are removed; reports are retained for 30 days.

Responsible use and legality

This Actor collects data that X shows publicly to anyone without logging in. Public data can still include personal data, so make sure your use complies with the GDPR, CCPA and other laws that apply to you, and with X's terms. Use the data for legitimate purposes such as research, archiving and analysis, keep only what you need, and do not use it for spam, harassment or profiling of private individuals. If you are unsure, consult a lawyer. See also Apify's guide Is web scraping legal?.

FAQ

Do I need an X account, API key or cookies? No. The Actor reads the same public pages a logged-out visitor sees.

Can I paste a link to a tweet in the middle of a thread? Yes. The Actor walks up to the first post and returns the whole thread in order.

Can I use numeric IDs instead of URLs? Yes, for example 1002103360646823936.

Are other people's replies included? No. Only the author's own thread tweets are exported. Use the related replies Actor for responses.

What happens if I submit two links from the same thread? The thread is exported and charged once.

How fast is it? About one page request per thread tweet that has replies. With the default requestDelayMs of 300, a 40-tweet thread takes about a minute.