Run bulk data extractions from X in 5 stages: check credits, estimate costs, run the job, retrieve JSON pages, and export files. Use this workflow to scrape tweets, export followers, pull tweet replies, save CSV/JSON/XLSX files, or hand paginated JSON to a CRM, warehouse, queue, or AI agent.Documentation Index
Fetch the complete documentation index at: https://docs.xquik.com/llms.txt
Use this file to discover all available pages before exploring further.
Workflow overview
1. Check credits
Call
GET /account to confirm subscription status and available credits.2. Estimate cost
Call
POST /extractions/estimate with the same target you plan to run.3. Run extraction
Call
POST /extractions after the estimate fits your balance and result cap.4. Retrieve JSON
Call
GET /extractions/{id} and page through nextCursor while hasMore is true.5. Export file
Call
GET /extractions/{id}/export when you need CSV, JSON, XLSX, or another file.Estimate cost
Preview the extraction cost before committing. Check whether it fits within your remaining budget.
Retrieve results
Paginate through extracted data via the API, or export as CSV, JSON, XLSX, Markdown, PDF, or TXT.
End-to-end agent handoff
Store one checkpoint per extraction run so another worker can resume without rereading logs:Estimate checkpoint
Store
estimatedResults, creditsRequired, creditsAvailable, allowed, and source before creating the job.Create receipt
Store the returned job
id, status, and poll_path; result rows arrive from GET /extractions/{id}.Cursor state
Store
page_cursor, next_cursor, and has_more for each JSON page so workers can resume pagination.File handoff
Store
inventory_path for later job lookup and export_path for the CSV, JSON, or XLSX download.Step 1: Check credits
Before running an extraction, verify your subscription status and credit balance.creditInfo.balance is low, consider topping up or running a smaller extraction.
Step 2: Estimate cost
Always estimate before running. The estimate endpoint previews the result count and projected credit usage without consuming credits.Allowed
allowed tells you whether the job can start with the current credit balance.Estimate source
source names the count used for the estimate, such as replyCount, followers, or resultsLimit.Estimated results
estimatedResults is the approximate number of records the job will return.Credits required
creditsRequired is the projected credit usage for this extraction.Credits available
creditsAvailable is your current balance when the estimate runs.Resolved X user ID
resolvedXUserId appears when targetUsername resolves to an X user ID.Step 3: Run the extraction
Submit the job with the same parameters you used for the estimate.202 Accepted with the job in running status. Poll GET /extractions/{id} until status is completed or failed. For large extractions (10,000+ results), this may take up to a few minutes.
Step 4: Retrieve results
Data handoff
Choose the handoff based on the system that consumes the extraction.App or API pipeline
Use
GET /extractions/{id}. Store job, results, hasMore, nextCursor.
Use limit up to 1,000 and pass nextCursor as after.CRM import
Use
GET /extractions/{id}/export?format=csv. Store User ID,
Username, Display Name, Followers, and Verified. Upsert by stable X
user ID when possible.Warehouse or queue
Use
GET /extractions/{id}/export?format=json or paginated JSON. Store
xUserId, xUsername, tweetId, tweetText, createdAt. Keep the
extraction ID with each load for replay and audit.Analyst review
Use
GET /extractions/{id}/export?format=xlsx. Store export columns plus
enrichment fields. Use CSV/JSON for automation and XLSX for manual review.Option A: Paginate via API
Fetch results in pages of up to 1,000 records. Use cursor-based pagination to iterate through all results.Durable JSON Lines handoff
Use JSON Lines when a queue, warehouse, or agent needs replayable rows without the export row cap. Write each paginated result with the cursor state that produced it.xquik-extraction-results.jsonl for queue replay, warehouse loads, or agent audits. Keep page_cursor and next_cursor so the job can resume from the last successful page.
Each result contains user profile data and (for tweet-based tools) tweet data:
Only
id, xUserId, and createdAt are guaranteed on every result. All other fields are omitted when unavailable (never null). Check for field presence before accessing.Option B: Export as file
Download results as CSV, JSON, XLSX, Markdown, PDF, or TXT. Exports include enrichment data such as bios, locations, and engagement metrics.CSV
format=csv returns text/csv; charset=utf-8 for spreadsheets and data
pipelines.JSON
format=json returns application/json; charset=utf-8 for API clients and
programmatic processing.Markdown
format=md returns text/markdown; charset=utf-8 for documentation and
issue handoffs.Markdown document
format=md-document returns text/markdown; charset=utf-8 for longer
markdown documents.format=pdf returns application/pdf for reports and sharing. PDF exports
are capped at 10,000 rows.TXT
format=txt returns text/plain; charset=utf-8 for plain text and logs.XLSX
format=xlsx returns
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet for
Excel and formatted reports.Tool types reference
All 23 extraction tools grouped by target type. Each requires a specific target field.Tweet-based tools
Reply authors
Use
reply_extractor with targetTweetId to extract users who replied to a
tweet.Repost authors
Use
repost_extractor with targetTweetId to extract users who reposted a
tweet.Quote authors
Use
quote_extractor with targetTweetId to extract users who quote-posted
a tweet.Like authors
Use
favoriters with targetTweetId to extract users who liked a tweet.Thread tweets
Use
thread_extractor with targetTweetId to extract all tweets in a
thread.Article content
Use
article_extractor with targetTweetId to extract article content from
a tweet.User-based tools
Follower profiles
Use
follower_explorer with targetUsername to extract followers of an
account.Following profiles
Use
following_explorer with targetUsername to extract accounts followed
by a user.Verified followers
Use
verified_follower_explorer with targetUsername to extract verified
followers of an account.Mention tweets
Use
mention_extractor with targetUsername to extract tweets mentioning
an account.Account posts
Use
post_extractor with targetUsername to extract posts from an
account.Liked tweets
Use
user_likes with targetUsername to extract tweets liked by a user.Media posts
Use
user_media with targetUsername to extract media posts from a user.Community tools
Community members
Use
community_extractor with targetCommunityId to extract members of a
community.Community moderators
Use
community_moderator_explorer with targetCommunityId to extract
moderators of a community.Community posts
Use
community_post_extractor with targetCommunityId to extract posts
from a community.Cross-community search
Use
community_search with searchQuery to search posts across
communities.List tools
List members
Use
list_member_extractor with targetListId to extract members of a
list.List tweets
Use
list_post_extractor with targetListId to extract tweets from a
list.List followers
Use
list_follower_explorer with targetListId to extract followers of a
list.Other tools
People search
Use
people_search with searchQuery to find user profiles by keyword.Space participants
Use
space_explorer with targetSpaceId to extract participants of a
Space.Tweet search
Use
tweet_search_extractor with searchQuery to extract tweets by
keyword, hashtag, or structured filters.Tweet search filters
tweet_search_extractor supports 16 optional filter parameters that are converted to X search operators internally. These filters only apply to tweet_search_extractor and are ignored by all other tool types. Use structured fields first for common jobs such as search tweets from a user, search tweet replies, scrape tweets with images, or export posts in a date range. Use advancedQuery only when you already know the X search operator string you want to append.
Account filters
Use
fromUser for author username, toUser for tweets directed to a user,
and mentioning for tweets that mention a user.Date and language
Use
language for a language code such as en, tr, or es, then bound
the export with sinceDate and untilDate in YYYY-MM-DD format.Media and engagement
Use
mediaType for images, videos, gifs, or media, then set
minFaves, minRetweets, or minReplies for minimum engagement.Conversation filters
Use
verifiedOnly for verified authors, replies to include, exclude,
or return only replies, and retweets to include, exclude, or return
only retweets.Query refinement
Use
exactPhrase for exact matches, excludeWords for comma-separated
exclusions, and advancedQuery for raw X search operator syntax.MCP equivalent
The same workflow works through the MCP server using thexquik sandbox tool:
Check account
REST route:
GET /account. MCP call:
xquik.request('/api/v1/account') to confirm subscription, credits, and
usage before a run.Estimate extraction
REST route:
POST /extractions/estimate. MCP call:
xquik.request('/api/v1/extractions/estimate', { method: 'POST', body })
with the same body you plan to run.Start extraction
REST route:
POST /extractions. MCP call:
xquik.request('/api/v1/extractions', { method: 'POST', body }) to create
the background job.Poll results
REST route:
GET /extractions/{id}. MCP call:
xquik.request('/api/v1/extractions/ID') to retrieve the job status and
rows.- “How much would it cost to extract all followers of @elonmusk?”
- “Extract all replies to this tweet: https://x.com/vercel/status/1893704267862470862”
- “Show me the results of my last extraction.”
File export (
GET /extractions/{id}/export) is only available via the REST API. The MCP server returns results as structured JSON via xquik.request().Error handling
Subscribe
402 no_subscription means the account has no active subscription. Subscribe
from the dashboard, then retry the extraction.Top up credits
402 insufficient_credits means the account cannot cover the requested
extraction. Top up credits, wait for the next grant, or lower resultsLimit.Fix toolType
400 invalid_tool_type means toolType is not one of the supported
extraction tools. Check the tool types reference.Fix required fields
400 invalid_input usually means the target field is missing or malformed.
Match targetTweetId, targetUsername, targetCommunityId,
targetListId, targetSpaceId, or searchQuery to the selected tool.Retry read service
502 x_api_unavailable means the read service is temporarily unavailable.
Retry with exponential backoff, then contact support if the error persists.Next steps
Create Extraction
Full API reference with request/response schemas.
Estimate Extraction
Cost estimation endpoint reference.
Export Extraction
CSV, XLSX, and Markdown export with column details.
Billing & Usage
Pricing, credits, and usage scenarios.