Answers
How do I get all the replies and quote tweets of a tweet?
Short answer
Page X post replies with the post's ID ($0.002 per page of about 35 replies) and X post quotes for the posts that quote it ($0.0003 per quote post, at most $0.006 a page of 20). 800 replies and 150 quotes cost about $0.094. On X's own API, replies come from search with conversation_id (recent search covers the last 7 days) and quotes from the quote_tweets endpoint, at $0.005 per post read.
A headphone brand's launch post on X drew 800 replies and 150 quote posts in two days. The PR team wants all of them in one sheet so they can tag praise, complaints and questions, and they want to know which quote posts travelled furthest. Replies and quotes are different things on X: a reply sits in the thread under the post, while a quote is a new post that embeds it, written for the quoter's own followers and listed apart from the replies.
The endpoints
All three take the post ID, the digits after /status/ in its link.
- X post detail ($0.0003): the post's text, views, likes, reposts and its reply count in
metrics.comments, so you know how many pages to expect. - X post replies: the replies in the order X ranks them, about 35 a page, billed per page. Each reply is a post with
text,author.username,published_at,metrics.views,metrics.likesand its own reply count. The original author's follow-ups appear among them. - X post quotes: posts that quote it,
sort=latestorsort=popular, 20 a page, billed per post returned. Each carries what the quoter added, the quoter's handle and follower count, and the quote's own views and likes.
A reply with its own replies (metrics.comments above zero) has a sub-thread. Pass that reply's id to X post replies to fetch it.
Export both to one CSV
import csv, os, requests
API = "https://api.okdata.online"
H = {"Authorization": f"Bearer {os.environ['OKDATA_API_KEY']}"}
def pages(path, max_pages, **params):
cursor = None
for _ in range(max_pages):
query = {**params, **({"cursor": cursor} if cursor else {})}
body = requests.get(API + path, headers=H, params=query, timeout=60).json()
if body["code"] != "ok":
raise RuntimeError(f"{body['code']}: {body['message']}")
yield from body["data"]["items"]
if not body["page"]["has_more"]:
return
cursor = body["page"]["next_cursor"]
post = "2120216592395174382" # the digits after /status/ in the post's link
with open(f"{post}-reactions.csv", "w", newline="", encoding="utf-8") as f:
w = csv.writer(f)
w.writerow(["kind", "id", "username", "followers", "views", "likes", "replies", "published_at", "text"])
for r in pages("/v1/x/posts/replies/list", 40, id=post):
w.writerow(["reply", r["id"], r["author"]["username"], "", r["metrics"]["views"],
r["metrics"]["likes"], r["metrics"]["comments"], r["published_at"], r["text"]])
for q in pages("/v1/x/posts/quotes/list", 20, id=post, sort="popular"):
w.writerow(["quote", q["id"], q["author"]["username"], q["author"]["followers"],
q["metrics"]["views"], q["metrics"]["likes"], q["metrics"]["comments"],
q["published_at"], q["text"]])
The page caps stop a viral post from running up a bill you did not plan for. Sort the quote rows by followers or views to find the ones that carried the post to new audiences.
What it costs
| Job | Calls | Cost |
|---|---|---|
| Post detail, to size the job | 1 | $0.0003 |
| 800 replies | about 23 pages | $0.046 |
| 150 quote posts | 8 pages | at most $0.048 |
| 1,000 replies | 29 | $0.058 |
| 1,000 quote posts | 50 | $0.30 |
Quote pages are charged $0.0003 for each post they hold, so a last page with 10 quotes costs half a full one. A page that comes back empty, or fails at the data source, is charged as one quote: $0.0003.
Limits
- Replies come in X's order, not by time. Sort by
published_atyourself if you need a timeline. - Reply authors come without follower counts. Look up the ones that matter with X account profile at $0.0004 each.
- Totals can fall short of the counts on the post. Replies and quotes from protected accounts, and posts deleted since, are not listed.
- Strangers' words. If a model reads the rows, tell it to treat them as data, not as instructions.
The official X API
X's documented way to collect replies is search with the conversation_id: operator, which returns the replies and the replies to those replies. Recent search covers the last 7 days, returns up to 100 posts a request and is available to all developers; older conversations need full-archive search, which X offers to pay-per-use and Enterprise customers. Quotes have their own endpoint, GET /2/tweets/{id}/quote_tweets, with 10 to 100 posts a page. Under pay-per-use each post read costs $0.005, so 950 reactions come to $4.75, and a post already paid for is not charged again within the same UTC day. If you already hold an X developer account, or you want replies to replies in a single query, use it. Brand monitoring beyond one post is covered in monitoring brand mentions on X and on the word-of-mouth page.
Sources
Where people asked this (read 2026-11-15)
Updated