Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 67 additions & 77 deletions x-api/getting-started/about-x-api.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: About the X API
title: "About the X API"
---

The X API can be used to programmatically retrieve and analyze X data, as well as build for the conversation on X.
Expand All @@ -11,110 +11,100 @@ Recently, we released the X API v2. The X API v2 includes a modern foundation, n
The following three tabs explain the different versions and access levels of the X API, what’s new with v2, and which X resources you can retrieve, create, destroy, and adjust using the API.

<Tabs>
<Tab title="Access levels and versions">
## X API access levels and versions

<Tab title="Access levels and versions">
While the X API v2 is the primary X API, the platform currently supports previous versions (v1.1, Gnip 2.0) as well. We recommend that all users start with v2 as this is where all future innovation will happen.

## X API access levels and versions
The X API v2 includes a few access levels:

While the X API v2 is the primary X API, the platform currently supports previous versions (v1.1, Gnip 2.0) as well. We recommend that all users start with v2 as this is where all future innovation will happen.
| | Free | Basic | Pro | Enterprise |
| :---------------------------- | :------------------------------------------------------------- | :-------------------------------------------------------------- | :------------------------------------------------------------ | :----------------------------------------------------------------------------------------------------- |
| Getting access | [Get Started](https://developer.x.com/en/portal/products/free) | [Get Started](https://developer.x.com/en/portal/products/basic) | [Get Started](https://developer.x.com/en/portal/products/pro) | [Get Started](https://developer.x.com/en/products/twitter-api/enterprise/enterprise-api-interest-form) |
| Price | Free | $100/month | $5000/month | - |
| Access to X API v2 | ✔️ (Only Post creation) | ✔️ | ✔️ | ✔️ |
| Access to standard v1.1 | ✔️(Limited) | ✔️(Limited) | ✔️(Limited) | ✔️ |
| Project limits | 1 Project | 1 Project | 1 Project | - |
| App limits | 1 App per Project | 2 Apps per Project | 3 Apps per Project | - |
| Post caps - Post | 1,500 | 3,000 | 300,000 | - |
| Post caps - Pull | ❌ | 10,000 | 1,000,000 | - |
| Filtered stream API | ❌ | ❌ | ✔️ | ✔️ |
| Access to full-archive search | ❌ | ❌ | ✔️ | ✔️ |
| Access to Ads API | ✔️ | ✔️ | ✔️ | ✔️ |
</Tab>
<Tab title="What's new with v2">
## What's new with v2

The X API v2 includes a few access levels:
The X API v2 represents the largest upgrade of the X API since 2012. With it comes a host of new and advanced features, as well as fast and free access to the API.

| | Free | Basic | Pro | Enterprise |
|:---|:---|:---|:---|:---|
| Getting access | [Get Started](https://developer.x.com/en/portal/products/free) | [Get Started](https://developer.x.com/en/portal/products/basic) | [Get Started](https://developer.x.com/en/portal/products/pro) | [Get Started](https://developer.x.com/en/products/twitter-api/enterprise/enterprise-api-interest-form) |
| Price | Free | $100/month | $5000/month | - |
| Access to X API v2 | ✔️ (Only Post creation) | ✔️ | ✔️ | ✔️ |
| Access to standard v1.1 | ✔️(Limited) | ✔️(Limited) | ✔️(Limited) | ✔️ |
| Project limits | 1 Project | 1 Project | 1 Project | - |
| App limits | 1 App per Project | 2 Apps per Project | 3 Apps per Project | - |
| Post caps - Post | 1,500 | 3,000 | 300,000 | - |
| Post caps - Pull | ❌ | 10,000 | 1,000,000 | - |
| Filtered stream API | ❌ | ❌ | ✔️ | ✔️ |
| Access to full-archive search | ❌ | ❌ | ✔️ | ✔️ |
| Access to Ads API | ✔️ | ✔️ | ✔️ | ✔️ |
Some of the features that are available with v2 include the following:

</Tab>
### New endpoints

<Tab title="What's new with v2">
We have released a set of net-new endpoints to X API v2. You can see a full list of v2 endpoints, including those that are new, on our X API endpoint map guide.

## What's new with v2
[Visit the X API endpoint map \>](/x-api/migrate/x-api-endpoint-map)

The X API v2 represents the largest upgrade of the X API since 2012. With it comes a host of new and advanced features, as well as fast and free access to the API.
### New and more detailed data objects

Some of the features that are available with v2 include the following:
We've modernized our data objects with a variety off new improvements that will enable you to more easily navigate and parse data.

### New endpoints
[Visit the data dictionary \>](/x-api/fundamentals/data-dictionary)

We have released a set of net-new endpoints to X API v2. You can see a full list of v2 endpoints, including those that are new, on our X API endpoint map guide.
### New parameters to help you retrieve just those objects and fields that you want

[Visit the X API endpoint map >](/x-api/migrate/x-api-endpoint-map)
We've added fields and expansions parameters to our data endpoints that allow you to request related objects and fields beyond those fields that return by default.

### New and more detailed data objects
[Learn how to use fields and expansions \>](/x-api/fundamentals/data-dictionary#how-to-use-fields-and-expansions)

We've modernized our data objects with a variety off new improvements that will enable you to more easily navigate and parse data.
### Advanced metrics

[Visit the data dictionary >](/x-api/fundamentals/data-dictionary)
More easily understand the performance of Posts, users, media, and polls from directly within your payload by requesting both public and private metrics including impressions, video views, user profile, and URL clicks, some of which are separated into an organic and promoted context.

### New parameters to help you retrieve just those objects and fields that you want
[Learn more about metrics \>](/x-api/fundamentals/metrics)

We've added fields and expansions parameters to our data endpoints that allow you to request related objects and fields beyond those fields that return by default.
### Filter on and identify which Posts contain different topics

[Learn how to use fields and expansions >](/x-api/fundamentals/data-dictionary#how-to-use-fields-and-expansions)
When using search Posts or filtered stream, you can now filter by topic using our entity and context operators. We've also provided these topics within the Post payload to help with analysis.

### Advanced metrics
[Learn more about Post annotations \>](/x-api/fundamentals/post-annotations)

More easily understand the performance of Posts, users, media, and polls from directly within your payload by requesting both public and private metrics including impressions, video views, user profile, and URL clicks, some of which are separated into an organic and promoted context.
### Filter on and identify which Posts belong to a reply thread

[Learn more about metrics >](/x-api/fundamentals/metrics)
Make it easier to identify a Post as part of a conversation thread when using search Posts, filtered stream, and Post lookup. We've also added the ability to determine whether conversation reply settings have been set for a Post with the Post field `reply_settings`.

### Filter on and identify which Posts contain different topics
[Learn more about conversation tracking \>](/x-api/fundamentals/conversation-id)

When using search Posts or filtered stream, you can now filter by topic using our entity and context operators. We've also provided these topics within the Post payload to help with analysis.
### And so much more...

[Learn more about Post annotations >](/x-api/fundamentals/post-annotations)
- High confidence spam filtering
- Shortened URLs are fully unwound for easier URL analysis
- Simplified JSON response objects by removing deprecated fields and modernizing labels
- Recovery and redundancy functionality for our streaming endpoints
- Return of 100% of matching public and available Posts in search queries
- Streaming "rules" so you can make changes without dropping connections
- More expressive query language for filtered stream and search
- OpenAPI spec to build new libraries & more transparently track changes
- API support for new features and endpoints more quickly as our platform evolves to meet the needs of developers, researchers, businesses, and people using X
</Tab>
<Tab title="X API resources">
## X API platform resources

### Filter on and identify which Posts belong to a reply thread
In the API design space, a resource is an entity with associated data, relationships to other resources, and a set of methods that operate on it. For example, a Post is a resource that you can create, delete, or retrieve using a variety of different tools, such as historically searching for them, or retrieving them in real-time.

Make it easier to identify a Post as part of a conversation thread when using search Posts, filtered stream, and Post lookup. We've also added the ability to determine whether conversation reply settings have been set for a Post with the Post field `reply_settings`.

[Learn more about conversation tracking >](/x-api/fundamentals/conversation-id)

### And so much more...

- High confidence spam filtering
- Shortened URLs are fully unwound for easier URL analysis
- Simplified JSON response objects by removing deprecated fields and modernizing labels
- Recovery and redundancy functionality for our streaming endpoints
- Return of 100% of matching public and available Posts in search queries
- Streaming "rules" so you can make changes without dropping connections
- More expressive query language for filtered stream and search
- OpenAPI spec to build new libraries & more transparently track changes
- API support for new features and endpoints more quickly as our platform evolves to meet the needs of developers, researchers, businesses, and people using X

</Tab>

<Tab title="X API resources">

## X API platform resources

In the API design space, a resource is an entity with associated data, relationships to other resources, and a set of methods that operate on it. For example, a Post is a resource that you can create, delete, or retrieve using a variety of different tools, such as historically searching for them, or retrieving them in real-time.

The X API provides access to create, delete, receive, or adjust a variety of different resources on the platform including the following:

| Resource | Description |
|:----------|:-------------|
| **Posts** | Tap into millions of Posts to understand the public conversation, or create your own to engage with the conversation.<br/><br/>Current availability:<br/>- X API v2<br/>- Enterprise<br/>- Standard v1.1 |
| **Users** | Manage or look up X users to analyze networks, understand your audience, or foster positive online relationships.<br/><br/>Current availability:<br/>- X API v2<br/>- Enterprise<br/>- Standard v1.1 |
| **Spaces** | Look up and search X Spaces and their attendees to help people find interesting and relevant audio conversations.<br/><br/>Current availability:<br/>- X API v2 |
| **Direct Messages** | Send and receive Direct Messages to triage customer issues, send welcome messages, or create positive human interaction.<br/><br/>Current availability:<br/>- Standard v1.1 |
| **Lists** | Curate and manage lists of accounts to keep a pulse on industry experts, powerful voices, or organize who you follow.<br/><br/>Current availability:<br/>- X API v2<br/>- Standard v1.1 |
| **Trends** | Identify geographic trends first to pinpoint industry movement, discover hot topics, or stay ahead of the latest fad.<br/><br/>Current availability:<br/>- Standard v1.1 |
| **Media** | Upload media objects to share your creative energy, create interactive experiences, or build accessibility tools.<br/><br/>Current availability:<br/>- Standard v1.1 |
| **Places** | Search for places to understand what's happening in your neighborhood and around the world.<br/><br/>Current availability:<br/>- Standard v1.1 |

</Tab>
The X API provides access to create, delete, receive, or adjust a variety of different resources on the platform including the following:

| Resource | Description |
| :------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Posts** | Tap into millions of Posts to understand the public conversation, or create your own to engage with the conversation. Current availability: - X API v2 - Enterprise - Standard v1.1 |
| **Users** | Manage or look up X users to analyze networks, understand your audience, or foster positive online relationships. Current availability: - X API v2 - Enterprise - Standard v1.1 |
| **Spaces** | Look up and search X Spaces and their attendees to help people find interesting and relevant audio conversations. Current availability: - X API v2 |
| **Direct Messages** | Send and receive Direct Messages to triage customer issues, send welcome messages, or create positive human interaction. Current availability: - Standard v1.1 |
| **Lists** | Curate and manage lists of accounts to keep a pulse on industry experts, powerful voices, or organize who you follow. Current availability: - X API v2 - Standard v1.1 |
| **Trends** | Identify geographic trends first to pinpoint industry movement, discover hot topics, or stay ahead of the latest fad. Current availability: - Standard v1.1 |
| **Media** | Upload media objects to share your creative energy, create interactive experiences, or build accessibility tools. Current availability: - Standard v1.1 |
| **Places** | Search for places to understand what's happening in your neighborhood and around the world. Current availability: - Standard v1.1 |
</Tab>
</Tabs>

### Other X API offerings
Expand Down