> ## 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.

# Xquik SDKs

> Install Xquik SDKs and CLI tools for tweet search exports, media uploads, DMs, webhooks, MCP handoff, and X API automation.

<blockquote className="agent-llms-directive">
  For the complete documentation index, see <a href="/llms.txt">llms.txt</a>.
</blockquote>

Official Xquik SDKs wrap the REST API with generated request types, response models, retries, pagination helpers, and consistent authentication. Use this page to choose the right SDK, CLI, or MCP handoff for tweet search exports, follower export jobs, media tweets, DM attachments, monitor webhooks, and agent workflows.

<Info>
  For SDK extraction jobs, treat `202 Accepted` as a queued run receipt. Poll `GET /extractions/{id}` before exporting rows. Credits are reserved after the job starts, so the run can lower `resultsLimit` to the affordable count or fail with `insufficient_credits`.
</Info>

<CardGroup cols={2}>
  <Card title="TypeScript / Node.js" icon="braces" href="/sdks/typescript">
    Use typed REST calls for Node.js, Bun, Next.js route handlers, tweet search exports, media tweets, and DMs.
  </Card>

  <Card title="Python" icon="bot" href="/sdks/python">
    Build sync or async jobs for tweet search, JSON Lines, CSV, XLSX, monitors, and webhook automation.
  </Card>

  <Card title="Go" icon="terminal" href="/sdks/go">
    Add tweet search exports, write actions, and monitor workers to Go services with context-aware calls.
  </Card>

  <Card title="Java" icon="coffee" href="/sdks/java">
    Use Maven or Gradle to add the Java SDK to Spring, worker, and JVM backend applications.
  </Card>

  <Card title="Kotlin" icon="blocks" href="/sdks/kotlin">
    Use idiomatic Kotlin types, nullable values, sequences, and suspend-friendly client surfaces.
  </Card>

  <Card title="C# / .NET" icon="hash" href="/sdks/csharp">
    Install from NuGet and call Xquik from .NET services, workers, and command-line tools.
  </Card>

  <Card title="Ruby" icon="gem" href="/sdks/ruby">
    Use the Ruby gem with Yard, RBS, RBI, retries, and connection pooling.
  </Card>

  <Card title="PHP" icon="file-code" href="/sdks/php">
    Add the Composer package to PHP 8.1+ applications with named parameters and typed exceptions.
  </Card>

  <Card title="CLI" icon="square-terminal" href="/sdks/cli">
    Run terminal workflows for tweet search exports, JSON output, CSV/XLSX handoff, and scripted API calls.
  </Card>

  <Card title="Terraform Provider" icon="boxes" href="/sdks/terraform">
    Manage Xquik resources as infrastructure and prepare for provider registry publication.
  </Card>
</CardGroup>

## Choose an SDK

<CardGroup cols={2}>
  <Card title="TypeScript / Node.js" icon="braces" href="/sdks/typescript">
    Install with `npm install x-twitter-scraper`; source:
    [Xquik-dev/x-twitter-scraper-typescript](https://github.com/Xquik-dev/x-twitter-scraper-typescript).
  </Card>

  <Card title="Python" icon="bot" href="/sdks/python">
    Install with `pip install x_twitter_scraper`; source:
    [Xquik-dev/x-twitter-scraper-python](https://github.com/Xquik-dev/x-twitter-scraper-python).
  </Card>

  <Card title="Go" icon="terminal" href="/sdks/go">
    Install with `go get github.com/Xquik-dev/x-twitter-scraper-go`; source:
    [Xquik-dev/x-twitter-scraper-go](https://github.com/Xquik-dev/x-twitter-scraper-go).
  </Card>

  <Card title="Java" icon="coffee" href="/sdks/java">
    Maven Central publication is pending. Build from source at
    [Xquik-dev/x-twitter-scraper-java](https://github.com/Xquik-dev/x-twitter-scraper-java).
  </Card>

  <Card title="Kotlin" icon="blocks" href="/sdks/kotlin">
    Maven Central publication is pending. Build from source at
    [Xquik-dev/x-twitter-scraper-kotlin](https://github.com/Xquik-dev/x-twitter-scraper-kotlin).
  </Card>

  <Card title="C# / .NET" icon="hash" href="/sdks/csharp">
    Install with `dotnet add package XTwitterScraper`; source:
    [Xquik-dev/x-twitter-scraper-csharp](https://github.com/Xquik-dev/x-twitter-scraper-csharp).
  </Card>

  <Card title="Ruby" icon="gem" href="/sdks/ruby">
    Install with `gem install x-twitter-scraper`; source:
    [Xquik-dev/x-twitter-scraper-ruby](https://github.com/Xquik-dev/x-twitter-scraper-ruby).
  </Card>

  <Card title="PHP" icon="file-code" href="/sdks/php">
    Install with `composer require xquik/x-twitter-scraper`; source:
    [Xquik-dev/x-twitter-scraper-php](https://github.com/Xquik-dev/x-twitter-scraper-php).
  </Card>

  <Card title="CLI" icon="square-terminal" href="/sdks/cli">
    Install with
    `go install github.com/Xquik-dev/x-twitter-scraper-cli/cmd/x-twitter-scraper@latest`;
    source:
    [Xquik-dev/x-twitter-scraper-cli](https://github.com/Xquik-dev/x-twitter-scraper-cli).
  </Card>

  <Card title="Terraform Provider" icon="boxes" href="/sdks/terraform">
    Terraform Registry publication is pending. Build locally from the
    [Terraform guide](/sdks/terraform); source repo is linked there.
  </Card>
</CardGroup>

## Choose by Job

<CardGroup cols={2}>
  <Card title="Tweet search exports" icon="search">
    Start with [TypeScript](/sdks/typescript), [Python](/sdks/python),
    [Go](/sdks/go), or [CLI](/sdks/cli) plus
    [Search Tweets](/api-reference/x/search-tweets). Hand off
    `PaginatedTweets`, `tweets`, `has_next_page`, `next_cursor`, and
    `xquik-tweet-search.jsonl` for JSON Lines, CSV, or XLSX. Cost: 1 credit per
    tweet returned.
  </Card>

  <Card title="Follower export files" icon="users">
    Start with [Follower Export CRM Workflow](/guides/follower-export-crm),
    [TypeScript](/sdks/typescript), [Python](/sdks/python), [Go](/sdks/go), or
    [CLI](/sdks/cli). Run `follower_explorer` with `targetUsername` and optional
    `resultsLimit`, then export CSV, JSON, or XLSX from
    [Export Extraction](/api-reference/extractions/export). Store the
    `202 Accepted` receipt `id` and `toolType`, then poll
    `GET /extractions/{id}` for `job.status`, `results`, `hasMore`, and
    `nextCursor`.
    Cost: 1 credit per follower extracted or returned.
  </Card>

  <Card title="Post media tweets or replies" icon="image">
    Start with [TypeScript](/sdks/typescript), [Go](/sdks/go), or
    [CLI](/sdks/cli) plus [Create Tweet](/api-reference/x-write/create-tweet).
    Pass public media URLs in `media`: up to 4 image URLs or exactly 1 MP4 video URL up to 100 MB.
    Store `tweetId`, `reply_to_tweet_id`, `chargedCredits`, or `writeActionId`. Cost: 30 credits text-only, plus 2 credits per started MB across attached media.
  </Card>

  <Card title="Upload DM attachments" icon="message-circle">
    Call [Upload Media](/api-reference/x-write/upload-media), then
    [Send Direct Message](/api-reference/x-write/send-dm). Use the returned
    `mediaId` as the one-item `media_ids` value; store `mediaUrl` and the
    returned `messageId`. Cost: 10 credits per media upload plus 10 credits per
    DM send.
  </Card>

  <Card title="Monitor tweets to webhooks" icon="radio">
    Start with [Create Monitor](/api-reference/monitors/create),
    [Webhooks](/webhooks/overview), or [Terraform](/sdks/terraform). Store
    monitor IDs, webhook IDs, event types, and signed delivery metadata. Active
    active monitors cost 21 credits per monitor-hour.
  </Card>

  <Card title="Agent handoff" icon="bot">
    Use the [MCP Server](/mcp/overview) for tool calls, or SDKs for direct
    code. Return JSON objects with the endpoint path, request parameters, result
    fields, pagination cursor, and endpoint cost.
  </Card>
</CardGroup>

## Authentication

All SDKs accept the same API credentials as the REST API:

```bash theme={null}
export X_TWITTER_SCRAPER_API_KEY="xq_YOUR_KEY_HERE"
```

OAuth 2.1 bearer tokens are supported where the generated SDK exposes `X_TWITTER_SCRAPER_BEARER_TOKEN`.

## Common Workflows

* Search tweets or scrape tweets to JSON Lines, CSV, or XLSX through [Search Tweets](/api-reference/x/search-tweets). Keep `xquik-tweet-search.jsonl` or the language-specific export file as the downstream handoff.
* Inspect threads through [Get Tweet](/api-reference/x/get-tweet) and [Tweet Thread](/api-reference/x/tweet-thread).
* Look up profiles and relationships through [Get User](/api-reference/x/get-user), [Followers](/api-reference/x/followers), and [Check Follower](/api-reference/x/check-follower).
* Post media tweets or replies with up to 4 public image URLs or exactly 1 public MP4 video URL up to 100 MB through [Create Tweet](/api-reference/x-write/create-tweet). Text-only tweet or reply writes cost 30 credits, and attached media adds 2 credits per started MB across all files. Upload media through [Upload Media](/api-reference/x-write/upload-media) when [Send Direct Message](/api-reference/x-write/send-dm) needs one uploaded media ID in `media_ids`.
* Create account monitors with [Create Monitor](/api-reference/monitors/create), then receive events through [Webhooks](/webhooks/overview).
* Run exports and giveaway workflows with [Extractions](/api-reference/extractions/create) and [Draws](/api-reference/draws/create).
* Connect agents through the [MCP Server](/mcp/overview) when you need tool use instead of direct SDK calls.

## Error Handling & Pagination

Generated SDKs map HTTP errors into language-native exception or error types. Start with the [error handling guide](/guides/error-handling) for status code semantics and the per-language page for idiomatic handling.

Paginated endpoints return a page object with a next-page marker such as `has_next_page`, `hasNextPage`, or `HasNextPage` depending on language casing. Use the SDK's generated pagination helpers when available, or pass the cursor fields documented on each endpoint.
