Twitter X Posts Scraper & Replies avatar

Twitter X Posts Scraper & Replies

Pricing

Pay per usage

Go to Apify Store
Twitter X Posts Scraper & Replies

Twitter X Posts Scraper & Replies

๐Ÿฆ Twitter X Posts Scraper extracts tweets from profiles, hashtags & searches โ€” with text, timestamps, authors, links, likes, retweets & replies. โšก Perfect for social listening, trend tracking, competitor analysis & content research. ๐Ÿ“Š Exports CSV/JSON for analytics.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

SimpleAPI

SimpleAPI

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Share

Twitter X Posts Scraper & Replies

Scrape posts from any X (Twitter) profile and the real replies underneath each post โ€” reply text, reply author, reply likes and who they're answering โ€” in one run. Most X post scrapers stop at the post itself and leave the reply count as a bare number; this one follows that count down into the actual conversation thread.

Give it a list of profiles, your own X session cookies, and it returns every post with an embedded repliesList of the actual reply objects, paged through X's conversation endpoint until it hits your depth cap.

What is Twitter X Posts Scraper & Replies?

It's an Apify actor that scrapes a profile's posts through X's GraphQL timeline, then โ€” for every post that comes back โ€” follows the conversation thread (TweetDetail) to pull the real reply text, reply author and reply engagement, not just the post's replies count. Reply collection needs your own logged-in X session (auth_token + ct0 cookies), because X requires authentication to read conversation threads; without a session the actor still returns posts, just without the repliesList filled in.

What data can I extract with Twitter X Posts Scraper & Replies?

Post fields (one row per post, charged_event_name: "row_result"):

FieldDescription
id / urlPost ID and permalink.
user_posted / name / is_verifiedAuthor username, display name, blue-check status.
descriptionPost text.
date_postedISO 8601 UTC timestamp.
likes / reposts / quotes / replies / views / bookmarksEngagement counters as reported by X.
hashtags / tagged_usersExtracted hashtags and @mentions.
photos / videosMedia URLs (highest-bitrate video variant first).
quoted_postNested object for a quote-tweet's own text/author/ID.
followers / following / posts_count / biography / profile_image_linkAuthor profile snapshot at scrape time.
repliesListArray of the actual reply objects collected for this post (text, author, likes, in-reply-to).
repliesFetchedHow many replies were actually collected for this post.
repliesTruncatedtrue if X's own thread ranking cut off replies before your cap was reached.

Every reply in repliesList is also pushed individually to a separate, uncharged child dataset (replies-<runId>), so you can query the full reply set on its own without re-parsing every post's embedded array.

Why not build this yourself?

X's public guest access to reading conversation threads was shut off โ€” replies are only readable to an authenticated session, and the conversation GraphQL query IDs X uses change without notice. This actor discovers the current query IDs at run start, pages the conversation cursor per post, follows ShowMoreThreads branches for nested replies when asked, and routes authenticated calls through a sticky residential proxy session (X blocks datacenter IPs for logged-in GraphQL). Building and maintaining that yourself means tracking X's query-ID churn on every run.

One thing worth knowing: the repliesList embedded on each post and the same replies pushed to the child dataset are not double-charged โ€” only the post row itself (with its replies attached) counts against row_result; the child-dataset copies are free duplicates for easier querying.

How to use data extracted from Twitter X Posts Scraper & Replies?

  • Community and social managers โ€” see the actual sentiment and content of replies to a brand's posts, not just a reply count, to catch complaints or viral moments early.
  • Researchers and journalists โ€” pull full reply threads on a public figure's posts for discourse analysis without manually opening each thread.
  • Growth marketers โ€” identify who's replying to a competitor's top posts as a warm-lead or influencer-outreach list.
  • Support teams โ€” monitor reply threads under a company's own posts to catch customer questions buried in the comments.

๐Ÿ”ผ Input sample

ParameterRequiredTypeDescriptionExample
startUrlsYesarrayProfiles to scrape โ€” full X URL, bare username, @username or numeric user ID.["elonmusk"]
authTokenYesstring (secret)Your logged-in X auth_token cookie. Required for reply fetching; without it the actor falls back to a logged-out guest engine and skips replies."a1b2c3..."
csrfTokenYesstring (secret)Your logged-in X ct0 cookie (CSRF token), from the same session as authToken."d4e5f6..."
sortOrderNostringOrder posts before replies are attached: recent, oldest, popular. Default "recent"."recent"
maxTweetsNointegerPosts to pull per profile before replies are fetched for each. Default 10, max 100.10
includeRepliesNobooleanTurn on reply-thread collection. Off = posts only (reply count still included). Default true.true
maxRepliesPerTweetNointegerMax replies to collect per post. 0 disables reply fetching. Default 30, max 500. Common pitfall: X's own thread ranking truncates viral threads before your cap โ€” check repliesTruncated on the row.30
includeNestedRepliesNobooleanAlso follow replies-to-replies, not just direct answers to the post. More requests. Default false.false
proxyConfigurationNoobjectPost scraping runs logged-out with a fallback ladder; reply fetching is always routed through a sticky residential proxy session automatically.{"useApifyProxy": false}
{
"startUrls": ["elonmusk"],
"authToken": "YOUR_X_AUTH_TOKEN",
"csrfToken": "YOUR_X_CT0_TOKEN",
"maxTweets": 10,
"maxRepliesPerTweet": 30
}

๐Ÿ”ฝ Output sample

{
"id": "1234567890123456789",
"url": "https://x.com/elonmusk/status/1234567890123456789",
"user_posted": "elonmusk",
"description": "Example post text",
"date_posted": "2026-07-20T14:03:00.000Z",
"likes": 45230,
"replies": 1820,
"reposts": 3110,
"views": 5200000,
"repliesFetched": 30,
"repliesTruncated": true,
"repliesList": [
{
"id": "1234567890123456999",
"description": "This is a reply",
"user_posted": "some_user",
"likes": 42,
"parent_tweet_id": "1234567890123456789",
"parent_user_posted": "elonmusk"
}
]
}

โ–ถ๏ธ Want to try other scrapers?

ActorWhat it does
twitter-x-reply-scraper-with-replier-contact-leadsPull repliers to a specific X post as contact leads.
x-twitter-posts-search-by-advanced-keyword-filtersSearch X posts with advanced keyword filters.
twitter-trends-scraper-by-city-multiple-countriesTrack trending topics across cities and countries.

How to extract X posts and replies programmatically

from apify_client import ApifyClient
client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("SimpleAPI/twitter-x-posts-scraper-replies").call(run_input={
"startUrls": ["elonmusk"],
"authToken": "YOUR_X_AUTH_TOKEN",
"csrfToken": "YOUR_X_CT0_TOKEN",
"maxTweets": 10,
"maxRepliesPerTweet": 30,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item["user_posted"], item["repliesFetched"], "replies")

Every run's dataset can also be exported straight to JSON, CSV, Excel or an API endpoint from the Apify Console โ€” no code needed for a one-off pull.

Scraping publicly accessible data is generally lawful in the US under the precedent set in hiQ Labs v. LinkedIn, which held that scraping data not gated behind a login does not violate the Computer Fraud and Abuse Act. This actor reads posts and replies that are publicly visible to any logged-in X user โ€” the session cookie it uses is only a viewing credential, not a way to access private or restricted content. If you extract data tied to identifiable people, GDPR (EU) and CCPA (California) still govern what you do with it, so review your own use case, especially for storage, resale or profiling.

โ“ FAQ

Why do I need to provide my own X auth_token and ct0 cookies? X requires an authenticated session to read conversation/reply threads โ€” the logged-out guest API for that endpoint was shut off. Post scraping alone works without a session (falling back to a logged-out guest engine), but replies won't be collected.

How do I get my auth_token and ct0 cookie values? Log into x.com in your browser, open DevTools โ†’ Application โ†’ Cookies for x.com, and copy the auth_token and ct0 values. Both must come from the same logged-in session.

Are my cookies stored or exposed anywhere? No. Both fields are marked as secret input, stored encrypted by Apify, and are never written into the output dataset.

Why does repliesFetched sometimes come in below my maxRepliesPerTweet cap? Either the post genuinely has fewer replies than your cap, or X's own thread-ranking algorithm truncated the visible thread before the cap was reached โ€” check repliesTruncated on that row to tell the two apart.

Are replies charged separately from posts? No. Only the post row (with its repliesList embedded) is charged under row_result. The same replies are also pushed to a free, uncharged child dataset (replies-<runId>) purely for convenience if you want to query replies without unpacking every post's array.

What happens if I don't provide authToken/csrfToken at all? The actor falls back to a logged-out guest engine for post scraping (often blocked on Apify's datacenter IPs) and skips reply collection entirely โ€” includeReplies has no effect without a valid session.

Does includeNestedReplies fetch the entire thread tree? It follows one additional level โ€” replies to replies via X's "Show more replies" branches โ€” not unlimited depth. It costs more requests per post, so leave it off unless you specifically need reply-to-reply context.

How is this different from other X reply scrapers on Apify? As observed on the Apify Store on 2026-07-26, most X post scrapers we reviewed return the post's reply count only, or require a separate actor run per post to fetch its thread. This actor fetches posts and their reply threads together in a single run, keyed per profile.

Conclusion

Twitter X Posts Scraper & Replies turns a profile's post list into full conversation data โ€” post text, engagement, and the actual replies underneath, paged and capped exactly how you configure it, with your own X session doing the authentication.