Use this guide when you need fewer duplicate reads, cleaner checkpoints, and better downstream handoffs. Pick the route that matches the job, store returned IDs and cursors, then reuse those checkpoints instead of repeating the same lookup.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.
Quick answer: batch known IDs, use profile timelines for one user, use tweet search for keywords, use home timeline for the connected account feed, and use extraction jobs for saved CSV/JSON/XLSX files.
Choose the smallest route
Known tweet IDs
Use
GET /api/v1/x/tweets?ids=... for up to 100 comma-separated tweet IDs in one request.Known user IDs
Use
GET /api/v1/x/users/batch?ids=... for up to 100 comma-separated user IDs in one request.One profile timeline
Use
GET /api/v1/x/users/{id}/tweets for one user’s profile timeline. Pass a username or numeric X user ID.Keyword or advanced search
Use
GET /api/v1/x/tweets/search for keywords, hashtags, operators, date filters, and advanced search pages.Authenticated home timeline
Use
GET /api/v1/x/timeline for the connected account’s home timeline. Pass cursor and optional seenTweetIds.Saved file export
Use
POST /api/v1/extractions/estimate, POST /api/v1/extractions, and GET /api/v1/extractions/{id}/export for CSV, JSON, or XLSX.Batch known IDs before looping
If your app already has tweet IDs or user IDs, batch them first. Store the IDs that return successfully, then request only missing records later.Match timeline intent
Profile timeline
GET /api/v1/x/users/{id}/tweets returns one user’s profile timeline. Use cursor, includeReplies, and includeParentTweet to control pages and reply context.Tweet search
GET /api/v1/x/tweets/search returns matching public posts. Use q, queryType, cursor, and limit for direct API pages.Home timeline
GET /api/v1/x/timeline returns the authenticated account’s home timeline. Use it for feed-style reads, not keyword search./x/users/{id}/tweets for one user’s profile timeline. Use /x/tweets/search for keyword or advanced search. Use /x/timeline for the authenticated home timeline.
Use extraction jobs for files
Use extraction jobs when a workflow needs saved results, repeatable export paths, or analyst-ready files.Estimate
Call
POST /api/v1/extractions/estimate with the same target and resultsLimit you plan to run.Poll JSON
Call
GET /api/v1/extractions/{id} until the job is complete. Store hasMore and nextCursor.Store cursor checkpoints
Store the route, query, cursor, and returned page state together. Treat every cursor as opaque.next_cursor back as cursor. For stored extraction JSON pages, pass nextCursor as after. Do not decode or construct cursors manually.
Avoid unnecessary media work
For tweet posts, pass public image URLs or one public MP4 URL inmedia on POST /api/v1/x/tweets. Do not call POST /api/v1/x/media first when the tweet media is already public.
Use POST /api/v1/x/media when you need an uploaded mediaId for the one-item media_ids array on POST /api/v1/x/dm/{userId}.
Checklist
- Batch known tweet or user IDs before looping over single lookups.
- Store returned IDs, row counts,
has_next_page,next_cursor, and export paths. - Use
resultsLimiton extraction estimates and create requests for bounded jobs. - Use monitors and signed webhooks when recurring checks should push events instead of polling every page.
- Keep public tweet media URLs and uploaded DM media IDs in separate handoffs.