Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.x.com/llms.txt

Use this file to discover all available pages before exploring further.

Standard v1.1 compared to X API v2

If you have been working with the v1.1 search/posts, the goal of this guide is to help you understand the similarities and differences between the standard and X API v2 search Posts endpoint.
  • Similarities
    • OAuth 1.0a User Context and OAuth 2.0 App-Only
    • Support for Post edit history and metadata. 
  • Differences
    • Endpoint URLs
    • App and Project requirements
    • Response data format
    • Request parameters
    • New query operators
    • AND / OR operator precedence 

Similarities

OAuth 1.0a User Context and OAuth 2.0 App-Only authentication The v1.1 search/posts and the X API v2 recent search endpoint support both OAuth 1.0a User Context and OAuth 2.0 App-Only Therefore, if you were previously using the standard v1.1 search endpoint you can continue using the same authentication method if you migrate to the X API v2 version.  Depending on your authentication library/package of choice, App-Only authentication is probably the easiest way to get started and can be set with a simple request header. To learn how to generate an App Access Token see this OAuth 2.0 App-Only guide If you would like to take advantage of the ability to pull private or advertising metrics with the X API v2 endpoint, you will need to use OAuth 1.0a User Context, and pass the user access tokens related to the user who posted the Post for which you would like to pull metrics.  Support for Post edit history and metadata Both versions provide metadata that describes any edit history. Check out the [search API References](