v1 to v2
Standard v1.1 compared to X API v2
If you have been working with the standard v1.1 GET statuses/show and GET statuses/lookup, this guide will help you understand the similarities and differences between the standard and X API v2 Posts lookup endpoints.
You may also be interested in our visual data format migration tool to help you quickly see the differences between the X API v1.1 data format and the X API v2 format.
-
Similarities
- OAuth 1.0a User Context
- Posts per request limits
- Support for Post edit history and metadata
-
Differences
- Endpoint URLs
- App and Project requirements
- Response data format
- Request parameters
Similarities
OAuth 1.0a User Context Authentication Method
The standard endpoint supports OAuth 1.0a User Context, while the new X API v2 Post lookup endpoint supports both OAuth 1.0a User Context and OAuth 2.0 App-Only. Therefore, if you were previously using one of the standard v1.1 Post lookup endpoints, you can continue using the same authentication method if you migrate to the X API v2 version.
App-Only authentication is likely the easiest way to get started. To learn how to generate an App Access Token, see this OAuth 2.0 App-only guide.
Posts per Request Limits
The v1.1 GET statuses/lookup endpoint allows you to specify up to 100 Posts per request. This also applies to the GET /tweets endpoint. To specify a full 100 Posts, use the ids
parameter as a query parameter with a comma-separated list of Post IDs.
Support for Post Edit History and Metadata
Both versions provide metadata that describes any edit history. Check out the Post lookup API References and the Edit Posts fundamentals page for more details.
Differences
Endpoint URLs
- Standard v1.1 endpoints:
https://api.x.com/1.1/statuses/show
https://api.x.com/1.1/statuses/lookup
- X API v2 endpoint:
https://api.x.com/2/tweets
https://api.x.com/2/tweets/:id
App and Project Requirements
X API v2 endpoints require credentials from a developer App associated with a Project for authentication. X API v1.1 endpoints can use credentials from standalone Apps or Apps associated with a Project.
Response Data Format
A significant difference between standard v1.1 and X API v2 endpoint versions is how fields are selected in the payload.
For standard endpoints, many response fields are included by default, with options to use parameters to specify additional fields.
X API v2, however, only delivers the Post id
and text
fields by default. Additional fields and objects require the use of fields and expansions parameters. The expanded fields return in an includes
object within the response, which can be matched to the primary Post object by matching IDs.
For more on using fields and expansions, see the guide on how to use fields and expansions. A data format migration guide also maps standard v1.1 fields to the newer v2 fields.
Additionally, X API v2 introduces new JSON designs for objects, including the Post and user objects:
- Standard endpoints return Post objects in a
statuses
array, while X API v2 uses adata
array. - Retweeted and Quoted Tweets in X API v2 replace “statuses” terminology.
- New terminology such as
like
replaces terms likefavorites
andfavourites
. - Attributes with no values (e.g.,
null
) are not included in X API v2 payloads.
The Post object in X API v2 includes new fields such as:
conversation_id
- Two new annotations fields (
context
andentities
) - New metrics fields
reply_setting
field showing who can reply to a given Post
Request Parameters
The following standard v1.1 request parameters have equivalents in X API v2:
Standard | X API v2 |
---|---|
id | ids |
Certain standard v1.1 parameters are not supported in X API v2:
Standard | Comment |
---|---|
tweet_mode | Replaced by fields and expansions functionality. |
trim_user | Replaced by fields and expansions. Use author_id expansion and user.fields for user data. |
include_my_retweet | Provides the ID of the source Post for Retweeted Posts by the authenticating user. |
include_entities | Use fields and expansions to control entities in the payload. |
include_ext_alt_text | Adds ext_alt_text field in media entity if alt text is present. |
include_card_uri | Adds card_uri when an ads card is attached. |
map | Returns the Post ID and error message for unavailable Posts in X API v2, as opposed to nullified fields in v1.1. |
CURL Requests
The following cURL requests show standard v1.1 endpoints and their v2 equivalents. Replace ACCESS_TOKEN
in the header with your app access token. For v2 endpoints, the token must belong to a developer App within a Project.
The response payloads from v1.1 will differ from v2. With v2, you can request different fields with the fields and expansions parameters.
Standard v1.1 GET statuses/lookup
and v2 GET /tweets
endpoints
Standard v1.1 GET statuses/show/:id
and v2 GET /tweets/:id
endpoints