コンテンツにスキップ
Twexapi
日本語
Esc
移動開く⌘Jプレビュー
このページの内容

X/Twitter SDKs & CLI

Install TwexAPI SDKs and CLI tools for tweet search, follower exports, MCP handoff, and public X data reads.

Official TwexAPI SDKs wrap the REST API with generated request types, response models, retries, pagination helpers, and consistent Bearer authentication. Use this page to choose the right SDK, CLI, or MCP handoff for tweet search, follower scraping, and agent workflows.

Choose an SDK

TypeScript / Node.js

Install with npm install @twexapi-dev/x-api-scraper; source: twexapi-dev/x-api-scraper-typescript. Open the TypeScript SDK guide.

Python

Install with pip install x_api_scraper; source: twexapi-dev/x-api-scraper-python. Open the Python SDK guide.

Go

Install with go get github.com/twexapi-dev/x-api-scraper-go; source: twexapi-dev/x-api-scraper-go. Open the Go SDK guide.

Java

Maven Central publication is pending. Build from source at twexapi-dev/x-api-scraper-java. Open the Java SDK guide.

Kotlin

Maven Central publication is pending. Build from source at twexapi-dev/x-api-scraper-kotlin. Open the Kotlin SDK guide.

C# / .NET

Install with dotnet add package XapiScraper; source: twexapi-dev/x-api-scraper-csharp. Open the C# SDK guide.

Ruby

Install with gem "x_api_scraper"; source: twexapi-dev/x-api-scraper-ruby. Open the Ruby SDK guide.

PHP

Install with composer require twexapi/x-api-scraper; source: twexapi-dev/x-api-scraper-php. Open the PHP SDK guide.

CLI

Install with npm install -g @twexapi-dev/x-api-scraper-cli; source: twexapi-dev/x-api-scraper-cli. Open the CLI guide.

Terraform provider

Install twexapi-dev/x-api-scraper from the Terraform Registry when published. Open the Terraform guide.

Choose by job

Tweet search exports

Start with TypeScript, Python, Go, or CLI plus Advanced Twitter Search. Hand off tweet rows, has_next_page, next_cursor, and JSON Lines files for downstream CSV or XLSX.

Follower & following lists

Start with TypeScript, Python, Go, or CLI. Call v3 follower and following endpoints, paginate with cursors, and store username, user_id, and next_cursor for resumable exports.

Global trending tweets

Start with Get Global Trending Tweets through TypeScript, Python, or CLI. Filter by country, topic, and content tag.

Agent handoff

Use the MCP Server for tool calls, or SDKs for direct code. Return JSON objects with the endpoint path, request parameters, result fields, pagination cursor, and credit balance.

Authentication

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

export X_API_SCRAPER_KEY="YOUR_API_KEY"

Bearer tokens are supported where the generated SDK exposes bearerAuth or bearer_auth. See Authentication for REST header details.

Common workflows

Error handling & pagination

Generated SDKs map HTTP errors into language-native exception or error types. Check each language page for idiomatic handling patterns.

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.

See Error Handling and Rate Limits for retry and backoff patterns.

このページは役に立ちましたか?