> ## Documentation Index
> Fetch the complete documentation index at: https://x-preview-mintlify-066e8699.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ツール & ライブラリ

> Python・TypeScript の公式 X API SDK、xurl などの CLI ツール、Playground サーバー、AI 向け MCP サーバー、コミュニティクライアントライブラリ。

export const Button = ({href, children}) => {
  return <div className="not-prose group">
    <a href={href}>
      <button className="flex items-center space-x-2.5 py-1 px-4 bg-primary-dark dark:bg-white text-white dark:text-gray-950 rounded-full group-hover:opacity-[0.9] font-medium">
        <span>
          {children}
        </span>
        <svg width="3" height="24" viewBox="0 -9 3 24" class="h-6 rotate-0 overflow-visible"><path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg>
      </button>
    </a>
  </div>;
};

公式 SDK、デベロッパーツール、コミュニティライブラリで開発を加速しましょう。

***

## 公式 SDK

<CardGroup cols={2}>
  <Card title="Python SDK" icon="python" href="/xdks/python/overview">
    非同期サポート、型ヒント、自動トークン更新。データ分析と自動化に最適。
  </Card>

  <Card title="TypeScript SDK" icon="js" href="/xdks/typescript/overview">
    完全な型安全性と ESM サポート。Node.js とモダンなバンドラーで動作します。
  </Card>
</CardGroup>

### クイックスタート

<Tabs>
  <Tab title="Python">
    ```bash theme={null}
    pip install xdk
    ```

    ```python theme={null}
    from xdk import Client

    client = Client(bearer_token="YOUR_BEARER_TOKEN")

    for page in client.posts.search_recent(query="api", max_results=10):
        if page.data and len(page.data) > 0:
            print(page.data[0].text)
            break
    ```

    <Button href="/xdks/python/overview">Python ガイド全文</Button>
  </Tab>

  <Tab title="TypeScript">
    ```bash theme={null}
    npm install @xdevplatform/xdk
    ```

    ```typescript theme={null}
    import { Client } from '@xdevplatform/xdk';

    const client = new Client({ bearerToken: 'YOUR_BEARER_TOKEN' });
    const userResponse = await client.users.getByUsername('XDevelopers');
    console.log(userResponse.data?.username);
    ```

    <Button href="/xdks/typescript/overview">TypeScript ガイド全文</Button>
  </Tab>
</Tabs>

***

## デベロッパーツール

<CardGroup cols={2}>
  <Card title="Postman Collection" icon="server" href="https://www.postman.com/xapidevelopers/x-api-public-workspace/collection/34902927-2efc5689-99c6-4ab6-8091-996f35c2fd80">
    すべての v2 エンドポイントのインタラクティブな API テスト。
  </Card>

  <Card title="xurl" icon="terminal" href="/tools/xurl">
    OAuth 認証が組み込まれた、curl ライクな X API 用 CLI。手動でのトークン管理は不要です。
  </Card>

  <Card title="API Playground" icon="flask" href="https://github.com/xdevplatform/playground">
    実際のクレジットを使用せずに X API v2 エンドポイントをテストするためのローカルモックサーバー。
  </Card>

  <Card title="エージェントリソース" icon="robot" href="/tools/ai">
    XMCP、llms.txt、skill.md、ドキュメント MCP サーバー、AI 駆動開発のためのリソース。
  </Card>
</CardGroup>

### その他のツール

| ツール                                                     | 説明                           |
| :------------------------------------------------------ | :--------------------------- |
| [OpenAPI Spec](https://api.x.com/2/openapi.json)        | 機械可読の API 仕様                 |
| [twitter-text](https://github.com/twitter/twitter-text) | 投稿テキストの解析と検証、文字数のカウント        |
| [Embed Generator](https://publish.x.com/#)              | サイト用に埋め込み可能な投稿、タイムライン、ボタンを構築 |

***

## コミュニティライブラリ

X API v2 をサポートするコミュニティ管理のライブラリ。最新の対応状況は各ライブラリのドキュメントを確認してください。

<Tabs>
  <Tab title="Python">
    | ライブラリ                                                        | 説明                      |
    | :----------------------------------------------------------- | :---------------------- |
    | [tweepy](https://github.com/tweepy/tweepy)                   | v2 サポートの人気 Python ライブラリ |
    | [twarc](https://twarc-project.readthedocs.io/)               | データ収集用の CLI とライブラリ      |
    | [python-twitter](https://github.com/sns-sdks/python-twitter) | シンプルな Python ラッパー       |
    | [TwitterAPI](https://github.com/geduldig/TwitterAPI)         | 最小限の Python ラッパー        |
  </Tab>

  <Tab title="JavaScript/TypeScript">
    | ライブラリ                                                                | 説明                         |
    | :------------------------------------------------------------------- | :------------------------- |
    | [node-twitter-api-v2](https://github.com/PLhery/node-twitter-api-v2) | 強い型付け、フル機能の Node.js クライアント |
    | [twitter.js](https://github.com/twitterjs/twitter.js)                | オブジェクト指向の Node.js ライブラリ    |
    | [twitter-v2](https://github.com/HunterLarco/twitter-v2)              | 非同期クライアントライブラリ             |
  </Tab>

  <Tab title="Go">
    | ライブラリ                                                           | 説明                   |
    | :-------------------------------------------------------------- | :------------------- |
    | [go-twitter](https://github.com/g8rswimmer/go-twitter)          | v2 API 用 Go ライブラリ    |
    | [gotwi](https://github.com/michimani/gotwi)                     | v2 用 Go ラッパー         |
    | [twitter-stream](https://github.com/Fallenstedt/twitter-stream) | Filtered stream ラッパー |
  </Tab>

  <Tab title="Java/Kotlin">
    | ライブラリ                                                 | 説明                   |
    | :---------------------------------------------------- | :------------------- |
    | [twittered](https://github.com/redouane59/twittered)  | v2 用 Java クライアント     |
    | [twitter4j-v2](https://github.com/takke/twitter4j-v2) | Twitter4J v2 ラッパー    |
    | [KTweet](https://github.com/ChromasIV/KTweet)         | Kotlin v2 ライブラリ      |
    | [Tweedle](https://github.com/tyczj/Tweedle)           | Kotlin Android ライブラリ |
  </Tab>

  <Tab title="PHP">
    | ライブラリ                                                             | 説明              |
    | :---------------------------------------------------------------- | :-------------- |
    | [twitter-api-v2-php](https://github.com/noweh/twitter-api-v2-php) | PHP v2 クライアント   |
    | [bird-elephant](https://github.com/danieldevine/bird-elephant)    | PHP v2 ライブラリ    |
    | [twitteroauth](https://github.com/abraham/twitteroauth)           | 人気の OAuth ライブラリ |
  </Tab>

  <Tab title="Ruby">
    | ライブラリ                                                             | 説明              |
    | :---------------------------------------------------------------- | :-------------- |
    | [tweetkit](https://github.com/julianfssen/tweetkit)               | Ruby v2 クライアント  |
    | [twitter\_oauth2](https://github.com/nov/twitter_oauth2)          | OAuth 2.0 ライブラリ |
    | [omniauth-twitter2](https://github.com/unasuke/omniauth-twitter2) | OmniAuth ストラテジー |
  </Tab>

  <Tab title="その他">
    | 言語             | ライブラリ                                                                                                     |
    | :------------- | :-------------------------------------------------------------------------------------------------------- |
    | **C#/.NET**    | [Tweetinvi](https://github.com/linvi/tweetinvi)、[LinqToTwitter](https://github.com/JoeMayo/LinqToTwitter) |
    | **Rust**       | [twitter-v2](https://github.com/jpopesculian/twitter-v2-rs)                                               |
    | **Swift**      | [Twift](https://github.com/daneden/Twift/)、[TwitterAPIKit](https://github.com/mironal/TwitterAPIKit)      |
    | **R**          | [academictwitteR](https://github.com/cjbarrie/academictwitteR)                                            |
    | **PowerShell** | [BluebirdPS](https://github.com/thedavecarroll/BluebirdPS)                                                |
  </Tab>
</Tabs>

<Note>
  コミュニティライブラリは X によって維持されていません。サポートや現在のステータスについてはリポジトリを確認してください。
</Note>

***

## コードサンプル

* [X API v2 Sample Code](https://github.com/xdevplatform/Twitter-API-v2-sample-code) — Python、JavaScript、Ruby などでのサンプル
* [Code Samples Repo](https://github.com/xdevplatform/samples) — 公式 XDK を使用したサンプル
* [X Developer GitHub](https://github.com/xdevplatform) — 公式リポジトリとツール

***

## X Ads API ライブラリ

X Ads API 固有のツールとライブラリについては、[Ads API のツールとライブラリ](/x-ads-api/tools-and-libraries) ページを参照してください。
