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

# Tools & Libraries

> Official and community libraries for the 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>;
};

Speed up your development with official SDKs, community libraries, and developer tools.

***

## Official SDKs

X provides official SDKs for TypeScript and Python with full X API v2 support:

<CardGroup cols={2}>
  <Card title="Python SDK" icon="python" href="/xdks/python/overview">
    Async support, type hints, and automatic token refresh. Perfect for data analysis and automation.
  </Card>

  <Card title="TypeScript SDK" icon="js" href="/xdks/typescript/overview">
    Full type safety and ESM support. Works in Node.js and modern bundlers.
  </Card>
</CardGroup>

***

## Official tools

| Tool                                                                                                         | Description                                    |
| :----------------------------------------------------------------------------------------------------------- | :--------------------------------------------- |
| [Postman Collection](https://app.getpostman.com/run-collection/9956214-784efcda-ed4c-4491-a4c0-a26470a67400) | Interactive API testing for all v2 endpoints   |
| [OpenAPI Spec](https://api.x.com/2/openapi.json)                                                             | Machine-readable API specification             |
| [twitter-text](https://github.com/twitter/twitter-text)                                                      | Parse and validate post text, count characters |

***

## Community libraries

These community-maintained libraries support X API v2. Check each library's documentation for current API coverage.

<Tabs>
  <Tab title="Python">
    | Library                                                      | Description                            |
    | :----------------------------------------------------------- | :------------------------------------- |
    | [tweepy](https://github.com/tweepy/tweepy)                   | Popular Python library with v2 support |
    | [twarc](https://twarc-project.readthedocs.io/)               | CLI and library for data collection    |
    | [python-twitter](https://github.com/sns-sdks/python-twitter) | Simple Python wrapper                  |
    | [TwitterAPI](https://github.com/geduldig/TwitterAPI)         | Minimal Python wrapper                 |
  </Tab>

  <Tab title="JavaScript/TypeScript">
    | Library                                                              | Description                                  |
    | :------------------------------------------------------------------- | :------------------------------------------- |
    | [node-twitter-api-v2](https://github.com/PLhery/node-twitter-api-v2) | Strongly-typed, full-featured Node.js client |
    | [twitter.js](https://github.com/twitterjs/twitter.js)                | Object-oriented Node.js library              |
    | [twitter-v2](https://github.com/HunterLarco/twitter-v2)              | Async client library                         |
  </Tab>

  <Tab title="Go">
    | Library                                                         | Description             |
    | :-------------------------------------------------------------- | :---------------------- |
    | [go-twitter](https://github.com/g8rswimmer/go-twitter)          | Go library for v2 API   |
    | [gotwi](https://github.com/michimani/gotwi)                     | Go wrapper for v2       |
    | [twitter-stream](https://github.com/Fallenstedt/twitter-stream) | Filtered stream wrapper |
  </Tab>

  <Tab title="Java/Kotlin">
    | Library                                               | Description            |
    | :---------------------------------------------------- | :--------------------- |
    | [twittered](https://github.com/redouane59/twittered)  | Java client for v2     |
    | [twitter4j-v2](https://github.com/takke/twitter4j-v2) | Twitter4J v2 wrapper   |
    | [KTweet](https://github.com/ChromasIV/KTweet)         | Kotlin v2 library      |
    | [Tweedle](https://github.com/tyczj/Tweedle)           | Kotlin Android library |
  </Tab>

  <Tab title="PHP">
    | Library                                                           | Description           |
    | :---------------------------------------------------------------- | :-------------------- |
    | [twitter-api-v2-php](https://github.com/noweh/twitter-api-v2-php) | PHP v2 client         |
    | [bird-elephant](https://github.com/danieldevine/bird-elephant)    | PHP v2 library        |
    | [twitteroauth](https://github.com/abraham/twitteroauth)           | Popular OAuth library |
  </Tab>

  <Tab title="Ruby">
    | Library                                                           | Description       |
    | :---------------------------------------------------------------- | :---------------- |
    | [tweetkit](https://github.com/julianfssen/tweetkit)               | Ruby v2 client    |
    | [twitter\_oauth2](https://github.com/nov/twitter_oauth2)          | OAuth 2.0 library |
    | [omniauth-twitter2](https://github.com/unasuke/omniauth-twitter2) | OmniAuth strategy |
  </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>
  Community libraries are not maintained by X. Check their repositories for support and current status.
</Note>

***

## Code samples

Find examples on GitHub:

* [X API v2 Sample Code](https://github.com/xdevplatform/Twitter-API-v2-sample-code) — Examples in Python, JavaScript, Ruby, and more
* [X Developer GitHub](https://github.com/xdevplatform) — Official repos and tools
* [Glitch Examples](https://glitch.com/@twitter) — Interactive, remixable apps
* [Replit Examples](https://replit.com/@twitter) — Browser-based coding

***

## Building a library?

If you've built an X API library, share it with the community:

1. Post in the [Libraries & SDKs forum](https://devcommunity.x.com/c/libraries-and-sdks/63)
2. We may add it to this page!

Use our [version badges](https://twbadges.glitch.me/) in your README to show API compatibility.

***

## Getting help

<Card title="Developer Forum" icon="comments" href="https://devcommunity.x.com">
  Get help from the community.
</Card>
