reply_extractor, estimate the cost first, run the extraction job, paginate JSON results, then export CSV, JSON, or XLSX for analysts, moderators, CRMs, warehouses, queues, or AI agents.
When to use this workflow
Spreadsheet export
Use
reply_extractor plus CSV or XLSX export when analysts need reply rows.App ingestion
Use
reply_extractor plus paginated JSON results for queues, CRMs, or warehouses.Moderation queue
Use the direct replies API plus JSON Lines rows before storing, hiding, labeling, or routing replies.
Latest page
Use
GET /x/tweets/{id}/replies when you only need the newest reply page.Cost control
Estimate the target tweet first, then set
resultsLimit on create
requests to cap the run.Data you get
Reply exports include base user fields, reply tweet fields, engagement counts, and metadata when available.Reply author
User ID, username, display name, follower count, verified state, and profile image.
Reply tweet
Tweet ID, tweet text, and tweet created time.
Engagement
Likes, reposts, replies, quotes, views, and bookmarks.
Metadata
Language, source app, and conversation ID.
GET /extractions/{id} returns job, results, hasMore, and nextCursor. Each reply row includes xUserId, xUsername, xDisplayName, tweetId, tweetText, tweetCreatedAt, createdAt, and optional enrichmentData fields such as likeCount, replyCount, repostCount, quoteCount, viewCount, bookmarkCount, conversationId, lang, and source.
End-to-end reply export handoff
Store one checkpoint that carries the target tweet through estimate, job creation, JSON pagination, and file export:Estimate checkpoint
Keep
estimatedResults, creditsRequired, creditsAvailable, allowed,
and source with targetTweetId; source is replyCount when the tweet
count lookup succeeds.Job checkpoint
Store the returned job
id, status, and poll_path; do not expect reply rows in the create response.Cursor checkpoint
Store
page_cursor, next_cursor, and has_more for JSON page loops, then pass nextCursor back as after.Export checkpoint
Store the chosen CSV, JSON, or XLSX
export_paths and the normalized reply fields sent downstream.Step 1: Estimate replies and credits
CallPOST /extractions/estimate before scraping. reply_extractor requires
targetTweetId. The estimate uses the tweet’s current replyCount, even when
you plan to cap the created job.
allowed, estimatedResults, creditsRequired,
creditsAvailable, and source. For reply scraping, source is replyCount
when the tweet count lookup succeeds. Set resultsLimit on the create request
when you want a smaller sample or hard run cap; final rows and credits can be
lower than the estimate.
Step 2: Run the reply extraction
Create the job with the sametoolType, targetTweetId, and optional resultsLimit.
reply_extraction_id; keep target_tweet_id and results_limit with the audit record. Do not wait for totalResults or createdAt in the create response; those fields arrive from GET /extractions/{id}.
Step 3: Poll job status
PollGET /extractions/{id} until the job is completed or failed.
limit up to 1,000 and pass nextCursor as after until hasMore is false.
Step 4: Export CSV, JSON, or XLSX
Exports are free after the extraction job exists. Savexquik-replies.jsonl for queue replay or warehouse loads, xquik-replies.json for app ingestion, xquik-replies.csv for CRM import, and xquik-replies.xlsx for analyst handoff.
Saved export JSON Lines handoff
Use this afterformat=json when a warehouse, queue, CRM, or AI agent needs one reply per line with stable field names.
Direct replies API
UseGET /x/tweets/{id}/replies when you need a paginated API response instead of a stored extraction job.
tweets, has_next_page, and next_cursor. Pass next_cursor back as cursor to fetch the next page. It costs 1 credit per tweet returned.
Use sinceTime and untilTime as Unix timestamps in seconds when a moderation queue, CRM sync, or agent only needs replies from a specific window.
Copy-ready workflow: replies to moderation queue
Use this direct API workflow when you need the latest reply pages as JSON Lines before deciding what to store, hide, label, or route. Each row maps the API response into stable downstream fields:handoff_source, parent_tweet_id, reply_tweet_id, reply_text, reply_author_id, reply_author_username, reply_author_name, reply_author_followers, reply_author_verified, reply_author_profile_picture, created_at, in_reply_to_id, conversation_id, engagement counts, bookmark_count, is_note_tweet, tweet_source, media_urls, and cursor fields.
resultsLimit.
Cost and failure handling
Estimate is free. Creating areply_extractor job costs 1 credit per result extracted. Direct GET /x/tweets/{id}/replies calls cost 1 credit per tweet returned, and the returned page size can be reduced by available credits. Exports are free after the extraction job exists.
Handle common errors before retrying:
400 invalid tweet ID
Status
400. Error invalid_tweet_id. Use a numeric tweet ID.401 unauthenticated
Status
401. Error unauthenticated. Send a valid x-api-key.402 billing or credits
Status
402. Errors no_subscription, subscription_inactive, no_credits, or insufficient_credits. Subscribe, add credits, or lower resultsLimit.429 rate limit
Status
429. Error rate_limit_exceeded. Wait for retryAfter or the Retry-After header.424 or 502 upstream unavailable
Status
424 or 502. Error x_api_unavailable. Retry with exponential backoff.Handoff checklist
Spreadsheet
Export
format=csv to xquik-replies.csv or format=xlsx to xquik-replies.xlsx.App ingestion
Export
format=json to xquik-replies.json, convert it to xquik-replies.jsonl, or paginate GET /extractions/{id}.Cost control
Set
resultsLimit on create calls when you need a smaller run.Real-time replies
Create an account or keyword monitor with
tweet.reply events.Related: Extraction workflow · Create extraction · Get tweet replies