Retweets lookup: Standard v1.1 compared to Twitter API v2
If you have been working with the standard v1.1 v1.1 GET statuses/retweets/:id, v1.1 GET statuses/retweets/:ids, the goal of this guide is to help you understand the similarities and differences between the standard v1.1 and Twitter API v2 Retweets lookup endpoints.
- Users per request limits
- Endpoint URLs
- Request limitations
- App and Project requirements
- Request parameters
- New JSON format
- Endpoint URLs
Users per request limits
For both v1.1 and v2 GET endpoints the max number of users that will be returned by the Retweets lookup endpoint is 100 users. For the v2 Retweets lookup endpoint, there is no pagination token being passed, by default we give out 100 users and that's the max that is returned.
- Standard v1.1 endpoints:
(Returns a collection of the 100 most recent Retweets of the Tweet specified by the
(Returns a collection of up to 100 user IDs belonging to users who have Retweeted the Tweet specified by the
- Twitter API v2 endpoint:
(Returns a list of accounts who have Retweeted a given Tweet)
App and Project requirements
The Twitter API v2 endpoints require that you use credentials from a developer App that is associated with a Project when authenticating your requests. All Twitter API v1.1 endpoints can use credentials from standalone Apps or Apps associated with a project.
The following standard v1.1 request parameters accepted two request query parameters (user_id or screen_name). The Twitter API v2 only accepts the numerical user ID, and it must be passed as part of the endpoint path.
One of the biggest differences between standard v1.1 and Twitter API v2 endpoint versions is how you select which fields return in your payload. For the standard endpoints, there are several parameters that you could use to identify which fields or sets of fields would return in the payload, while the Twitter API v2 version simplifies these different parameters into fields and expansions.
New JSON format
- At the JSON root level, the standard endpoints return user objects in a statuses array, while Twitter API v2 returns a data array.
- Instead of referring to Retweeted and Quoted "statuses", Twitter API v2 JSON refers to Retweeted and Quoted Tweets. Many legacy and deprecated fields, such as contributors and user.translator_type are being removed.
- Instead of using both favorites (in Tweet object) and favourites (in user object), Twitter API v2 uses the term like.
- Twitter is adopting the convention that JSON values with no value (for example, null) are not written to the payload. Tweet and user attributes are only included if they have non-null values.
In addition to the changes that we made to our new JSON format, we also introduced a new set of fields to the Tweet object including the following: