Choose the output shape
Live JSON page
Use endpoints such as
GET /api/v1/x/tweets/search,
GET /api/v1/x/users/{id}/tweets, and
GET /api/v1/x/users/{id}/followers when your app needs fresh API results
and endpoint-specific cursors.Saved JSON rows
Use
GET /api/v1/extractions/{id}?limit=1000&cursor={nextCursor} when a
saved extraction job is the source of truth. The response includes job,
results, hasMore, and optional nextCursor.File export
Use
GET /api/v1/extractions/{id}/export?format=csv when a downstream
tool needs a downloaded file. Supported formats are csv, json, xlsx,
md, md-document, pdf, and txt.Draw export
Use
GET /api/v1/draws/{id}/export?format=csv&type=winners when you need
giveaway winners or entry rows. Set type to winners or entries.Output decision map
App UI
Call the live JSON endpoint and store the endpoint cursor with the filters
that produced the page.
Worker or queue
Read saved extraction pages, append JSON Lines, and resume with
cursor
when hasMore is true.CRM or spreadsheet
Download CSV for simple imports, or XLSX when analysts need a workbook.
Archive or report
Download JSON for replay, Markdown or TXT for text archives, and PDF for a
shareable report file.
Match the format to the handoff
Choose a format from the next consumer’s exact requirements. Do not convert a file twice when Xquik already returns the required format. Use a live JSON page when code needs fresh tweets, followers, following rows, replies, profiles, or media fields. Keep the documented endpoint cursor with the same request filters. Use saved extraction JSON pages when a worker needs incremental processing. Append each completed page to JSON Lines through an idempotent sink. Use the extraction ID and requestedcursor value as the page key. Persist the page and
its nextCursor in one atomic commit. A retry must replace or skip an existing
page key instead of appending duplicate tweets, followers, or replies.
Use a JSON file when an application needs one structured download. The export
contains the documented columns for that extraction tool. Store the extraction
ID, tool type, and selected filters beside the file.
Use CSV for CRM or spreadsheet imports. CSV exports include one header row.
They also neutralize spreadsheet formula prefixes in result cells.
Use XLSX when analysts need an Excel workbook. Use Markdown, PDF, or TXT when
people need a readable review artifact instead of an import file.
Pagination and cursor map
Direct X API pages expose endpoint-specific cursor fields such ashas_next_page and next_cursor. Keep the same query filters between requests
and only change the cursor parameter documented on that endpoint.
Extraction result pages use hasMore and nextCursor. Pass nextCursor back
as cursor, and use limit up to 1000; the default is 100.
File exports do not paginate. File exports are capped at 100,000 rows, and PDF
exports are capped at 10,000 rows. Use extraction JSON pages or JSON Lines when
you need to process larger jobs incrementally.
For larger extractions, page results through
GET /api/v1/extractions/{id}. Keep cursor, hasMore, and nextCursor in one
checkpoint. Never continue from the downloaded file’s last visible value.
The file endpoint returns the first 100,000 rows ordered by result ID. PDF
returns the first 10,000 rows. A successful file response does not prove the
extraction contains no additional rows.
Format map
CSV
Best for spreadsheet imports and CRM uploads. The response content type is
text/csv; charset=utf-8.JSON file
Best for replay, durable archives, and application handoffs. The file is a
JSON array containing the extraction tool’s documented columns. The
response content type is
application/json; charset=utf-8.XLSX
Best for analysts who need a workbook. The response content type is
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.Markdown
Best for docs and text review.
md returns a Markdown table.
md-document returns numbered sections with labeled fields. Both return
text/markdown; charset=utf-8.Best for a shareable report snapshot. The response content type is
application/pdf.TXT
Best for plain text archives. The response content type is
text/plain; charset=utf-8.Download and validate an export
Use the server filename fromContent-Disposition. curl can apply that
filename without parsing the header yourself.
- Require HTTP
200. - Match
Content-Typeto the requested format. - Store the
Content-Dispositionfilename. - Reject an unexpectedly empty file.
- Parse the selected format before marking the handoff complete.
- Record the parsed row count and extraction ID.
- Calculate a local checksum when an audit requires one.
Handoff checkpoint
Store enough context to resume a job, verify filters, and download the right format later.local_sha256 is calculated by your workflow after download. Xquik does not
return that field in the export response.
Handle export failures
400 invalid_format: Use one of the 7 documented format values.401 unauthenticated: Replace the missing or invalid credential.404 not_found: Verify the extraction or draw ID belongs to the account.429 rate_limit_exceeded: Wait forRetry-Afterbefore downloading again.
type=winners or type=entries. Do not retry
an unchanged 400, 401, or 404 request. Retry 429 after the documented
delay.
Twitter API export questions
How do I export Twitter API results to CSV?
Run an extraction for tweets, followers, following rows, replies, or profiles. After completion, request its export endpoint withformat=csv.
Can I export tweets as JSON?
Yes. Use live JSON pages for incremental processing. Useformat=json for one
saved extraction file within the 100,000-row cap.
Should I use CSV or JSON for Twitter results?
Use CSV for CRM and spreadsheet imports. Use JSON for applications, replay, and structured result fields. Choose before building the downstream parser.When should I use XLSX instead of CSV?
Use XLSX when analysts need an Excel workbook. Use CSV when another system expects a simple delimited import.Can I export more than 100,000 rows?
Process larger extraction jobs through saved JSON pages. Append JSON Lines and resume withcursor. One file export stops at 100,000 rows.
Why does PDF stop at 10,000 rows?
PDF uses the documented 10,000-row cap. Choose CSV, JSON, XLSX, Markdown, or TXT for file exports up to 100,000 rows.What is the difference between md and md-document?
md returns a Markdown table. md-document returns numbered result sections
with labeled fields. Both use the Markdown response content type.
Does this download Twitter images or videos?
No. This guide exports documented result fields. Use returned media URLs when your workflow separately processes tweet images or videos.Does this export my private X account archive?
No. These endpoints export Xquik extraction or draw results. Use X’s account archive process for your private account archive.Safety checklist
Do not print downloaded export bytes to shared logs.
Store the
Content-Disposition filename if your workflow needs stable file
names.Validate
format before making the request. Invalid formats return a 400
error.Store the job ID, tool type, filters, cursor, and chosen export path with the
downstream task.
Next steps
Extraction workflow
Build saved extraction jobs, poll results, and export finished rows.
Export extraction
Download saved extraction rows as CSV, JSON, XLSX, Markdown, PDF, or TXT.
Export draw
Download giveaway winners or entries.
Follower export CRM
Move follower data into CSV and CRM workflows.