For SDK extraction jobs, treat
202 Accepted as a queued run receipt. Poll GET /extractions/{id} before exporting rows. Xquik reserves credits after the job starts. The run can lower resultsLimit to the affordable count or fail with insufficient_credits.TypeScript / Node.js
Use typed REST calls in Node.js, Bun, and Next.js route handlers. Cover tweet search exports, media tweets, and DMs.
Python
Build sync or async jobs for tweet search and monitors. Export JSON Lines, CSV, or XLSX, and automate webhooks.
Go
Add tweet search exports, write actions, and monitor workers to Go services. Every call takes a context.
Java
Add the Java SDK with Maven or Gradle. It fits Spring, worker, and JVM backend applications.
Kotlin
Use idiomatic Kotlin types, nullable values, sequences, and suspend-friendly client methods.
C# / .NET
Install from NuGet. Use REST for support attachment downloads.
Ruby
Use the Ruby gem with Yard, RBS, RBI, retries, and connection pooling.
PHP
Add the Composer package to PHP 8.1+ applications with named parameters and typed exceptions.
CLI
Run terminal workflows for tweet search exports and scripted API calls. Output JSON, or hand off CSV or XLSX.
Terraform provider
Install from the Terraform Registry and manage Xquik resources as infrastructure.
Choose an SDK
- TypeScript / Node.js. Install from npm. Open the TypeScript SDK guide or the source on GitHub.
- Python. Install from PyPI. Open the Python SDK guide or the source on GitHub.
- Go. Install with Go modules. Open the Go SDK guide or the source on GitHub.
- Java. Install from Maven Central. Open the Java SDK guide or the source on GitHub.
- Kotlin. Install from Maven Central. Open the Kotlin SDK guide or the source on GitHub.
- C# / .NET. Install from NuGet. Open the C# SDK guide or the source on GitHub.
- Ruby. Install from RubyGems. Open the Ruby SDK guide or the source on GitHub.
- PHP. Install from Packagist with Composer. Open the PHP SDK guide or the source on GitHub.
- CLI. Install from npm or with Go. Open the CLI guide or the source on GitHub.
- Terraform provider. Install from the Terraform Registry. Open the Terraform guide or the source on GitHub.
Choose by job
- Tweet search exports. Start with TypeScript, Python, Go SDK, or CLI plus Search Tweets. Hand off
PaginatedTweets,tweets,has_next_page,next_cursor, andxquik-tweet-search.jsonlfor JSON Lines, CSV, or XLSX. The cost is 1 credit per tweet returned. - Follower export files. Start with Follower Export CRM Workflow, TypeScript, Python, Go SDK, or CLI. Run
follower_explorerwithtargetUsernameand optionalresultsLimit. Then export CSV, JSON, or XLSX from Export Extraction. Store the202 AcceptedreceiptidandtoolType. Then pollGET /extractions/{id}forjob.status,results,hasMore, andnextCursor. The cost is 1 credit per follower extracted or returned. - Post media tweets or replies. Start with TypeScript, Go SDK, or CLI plus Create Tweet. Pass public media URLs in
media. Send up to 4 image URLs. Or send exactly 1 MP4 video URL up to 100 MB. StoretweetId,reply_to_tweet_id,chargedCredits, orwriteActionId. A text-only write costs 30 credits. Attached media adds 2 credits per started MB across all files. - Upload DM attachments. Call Upload Media, then Send Direct Message. Use the returned
mediaIdas the one-itemmedia_idsvalue. StoremediaUrland the returnedmessageId. The cost is 10 credits per media upload plus 10 credits per DM send. - Monitor tweets to webhooks. Start with Create Monitor, Webhooks, or Terraform. Store monitor IDs, webhook IDs, event types, and signed delivery metadata. Active monitors cost 30 credits per monitor-hour.
- Agent handoff. Use the MCP Server for tool calls, or SDKs for direct code. Return JSON objects with the endpoint path, request parameters, and result fields. Add the pagination cursor and endpoint cost.
Authentication
All SDKs accept the same API credentials as the REST API.X_TWITTER_SCRAPER_BEARER_TOKEN.Common workflows
- Search tweets or scrape tweets to JSON Lines, CSV, or XLSX through Search Tweets. Keep
xquik-tweet-search.jsonlor the language-specific export file as the downstream handoff. - Inspect threads through Get Tweet and Tweet Thread.
- Look up profiles and relationships through Get User, Followers, and Check Follower.
- Post media tweets or replies through Create Tweet. Send up to 4 public image URLs. Or send exactly 1 public MP4 video URL up to 100 MB. Text-only tweet or reply writes cost 30 credits. Attached media adds 2 credits per started MB across all files. Send Direct Message takes one uploaded media ID in
media_ids. Get it through Upload Media. - Create account monitors with Create Monitor, then receive events through Webhooks.
- Run exports and giveaway workflows with Extractions and Draws.
- Connect agents through the MCP Server when you need tool use. Use direct SDK calls otherwise.
Error handling & pagination
Generated SDKs map HTTP errors into language-native exception or error types. The error handling guide explains each status code. Each language page shows its idiomatic handling. Paginated endpoints return a page object with a next-page marker. It readshas_next_page, hasNextPage, or HasNextPage, by language casing. Use the SDK’s generated pagination helpers when available. Otherwise pass the cursor fields documented on each endpoint.