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

# ツールとライブラリ

> X API 向けの公式およびコミュニティ製ライブラリ

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、コミュニティ製ライブラリや開発者ツールを活用して、開発を高速化しましょう。

***

<div id="official-sdks">
  ## 公式 SDK
</div>

X は、X API v2 に完全対応した TypeScript と Python 向けの公式 SDK を提供しています。

<CardGroup cols={2}>
  <Card title="Python SDK" icon="python" href="/ja/xdks/python/overview">
    非同期処理対応、型ヒント、トークンの自動リフレッシュ機能を備えています。データ分析や自動化に最適です。
  </Card>

  <Card title="TypeScript SDK" icon="js" href="/ja/xdks/typescript/overview">
    完全な型安全性と ESM 対応。Node.js やモダンなバンドラーで利用できます。
  </Card>
</CardGroup>

***

<div id="official-tools">
  ## 公式ツール
</div>

| ツール                                                                                                          | 説明                                  |
| :----------------------------------------------------------------------------------------------------------- | :---------------------------------- |
| [Postman Collection](https://app.getpostman.com/run-collection/9956214-784efcda-ed4c-4491-a4c0-a26470a67400) | すべての v2 エンドポイント向けのインタラクティブな API テスト |
| [OpenAPI Spec](https://api.x.com/2/openapi.json)                                                             | 機械可読な API 仕様                        |
| [twitter-text](https://github.com/twitter/twitter-text)                                                      | ポスト本文を解析・検証し、文字数をカウント               |

***

<div id="community-libraries">
  ## コミュニティ製ライブラリ
</div>

以下のコミュニティによって保守されているライブラリは X API v2 をサポートしています。最新の API 対応状況については、各ライブラリのドキュメントを確認してください。

<Tabs>
  <Tab title="Python">
    | Library                                                      | 説明                               |
    | :----------------------------------------------------------- | :------------------------------- |
    | [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">
    | Library                                                              | 説明                            |
    | :------------------------------------------------------------------- | :---------------------------- |
    | [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">
    | Library                                                         | 説明                 |
    | :-------------------------------------------------------------- | :----------------- |
    | [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) | フィルタ済みストリーム用ラッパー   |
  </Tab>

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

  <Tab title="PHP">
    | Library                                                           | 説明                    |
    | :---------------------------------------------------------------- | :-------------------- |
    | [twitter-api-v2-php](https://github.com/noweh/twitter-api-v2-php) | v2 向け PHP クライアント      |
    | [bird-elephant](https://github.com/danieldevine/bird-elephant)    | v2 向け PHP ライブラリ       |
    | [twitteroauth](https://github.com/abraham/twitteroauth)           | 広く利用されている OAuth ライブラリ |
  </Tab>

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

  <Tab title="Other">
    | Language       | Library                                                                                                    |
    | :------------- | :--------------------------------------------------------------------------------------------------------- |
    | **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>

***

<div id="code-samples">
  ## コードサンプル
</div>

GitHub 上のサンプルコードを参照してください:

* [X API v2 サンプルコード](https://github.com/xdevplatform/Twitter-API-v2-sample-code) — Python、JavaScript、Ruby などのサンプル
* [X Developer GitHub](https://github.com/xdevplatform) — 公式リポジトリおよびツール
* [Glitch のサンプル](https://glitch.com/@twitter) — インタラクティブでリミックス可能なアプリ
* [Replit のサンプル](https://replit.com/@twitter) — ブラウザベースでのコーディング

***

<div id="building-a-library">
  ## ライブラリを作成しましたか？
</div>

X API 用のライブラリを作成した方は、ぜひコミュニティで共有してください。

1. [Libraries & SDKs forum](https://devcommunity.x.com/c/libraries-and-sdks/63) に投稿してください
2. このページに追加する場合があります

README で API の互換性を示すために、[version badges](https://twbadges.glitch.me/) を使用してください。

***

<div id="getting-help">
  ## サポートを受けるには
</div>

<Card title="Developer Forum" icon="comments" href="https://devcommunity.x.com">
  コミュニティからサポートを受けましょう。
</Card>
