Install
Authenticate
Basic example
Search tweets and write durable JSON Lines handoff rows.Go SDK workflows
Tweet replies workflow to CSV, JSON, or XLSX
This workflow gets every reply under one tweet. It produces a saved extraction, JSON Lines handoff, or CSV, JSON, or XLSX export. Use it when a Go worker, queue consumer, or agent service needs that. It callsPOST /extractions/estimate through client.Extractions.EstimateCost and creates the job with client.Extractions.Run. It reads rows with client.Extractions.Get and downloads files with client.Extractions.ExportResults.
Reuse the polling, writeRows, and writeExport helpers from the follower workflow. Only the tool type, target field, and output filenames change.reply_extractor requires TargetTweetID. client.Extractions.Get returns Results, HasMore, and NextCursor. The shared writeRows helper passes NextCursor back as Cursor. It repeats until all stored rows are written. Use xquik-replies.jsonl for queue replay or warehouse loads and xquik-replies.json for app ingestion. Use xquik-replies.csv for CRM import and xquik-replies.xlsx for analyst handoff. client.Extractions.ExportResults supports CSV, JSON, and XLSX for file handoff. The cost is 1 credit per reply extracted or returned.Cost, limits & retries
Tweet search costs 1 credit per tweet returned. Remaining credits may not cover the requested page. If so, the API can return fewer tweets thanLimit. If 0 paid results are affordable, it returns 402 insufficient_credits. Xquik rate-limits read calls. 429 responses include Retry-After.
Generated Go methods return error for connection failures and non-success responses. Retry connection errors, 408, 409, 429, and 5xx responses with backoff. Do not retry 400, 401, 403, 404, or 422 until you fix the cause. The cause is a request, authentication, permission, or input issue.Error handling
Generated Go methods returnerror for connection failures and non-success API responses. Check the concrete error type from the SDK when you need status-code specific handling. Use the error handling guide for response semantics.
Common retryable cases are connection errors, 408, 409, 429, and 5xx responses.Pagination
List and search responses expose generated pagination fields such asHasNextPage. Pass cursor parameters from the previous response when the endpoint supports cursor pagination.Webhooks & references
- Search Tweets
- Create Tweet
- Get Write Action Status
- Upload Media
- Send Direct Message
- Webhook Overview
- Verify HMAC Signatures
- Twitter Scraper API Overview
- Download the OpenAPI schema with
curl -o openapi.json https://xquik.com/openapi.json - Source Repository