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

# Retweets lookup

### Retweets lookup: Standard v1.1 compared to X API v2

If you have been working with the standard v1.1 [v1.1 GET statuses/retweets/:id](https://developer.x.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/get-statuses-retweets-id), [v1.1 GET statuses/retweets/:ids](https://developer.x.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/get-statuses-retweeters-ids), the goal of this guide is to help you understand the similarities and differences between the standard v1.1 and X API v2 Retweets lookup endpoints.

* **Similarities**
  * Authentiation
  * Users per request limits
* **Differences**
  * Endpoint URLs

  * Request limitations

  * App and Project requirements

  * Response data format

  * Request parameters

#### Similarities

**Authentication**

Both the standard v1.1 and X API v2 Retweets lookup endpoints ([v1.1 GET statuses/retweets/:id](https://developer.x.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/get-statuses-retweets-id) and [v1.1 GET statuses/retweeters/:ids](https://developer.x.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/get-statuses-retweeters-ids)) use [OAuth 1.0a User Context](https://developer.x.com/content/developer-twitter/resources/fundamentals/authentication) or OAuth 2.0 Bearer Token.

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

#### Differences

**Endpoint URLs**

* Standard v1.1 endpoints:
  * [https://api.x.com/1.1/statuses/retweets/:id.json](https://api.x.com/1.1/statuses/retweets/:id.json)
    (Returns a collection of the 100 most recent Retweets of the Post specified by the `id` parameter)
  * `https://api.x.com/1.1/statuses/retweeters/ids.json`
    (Returns a collection of up to 100 user IDs belonging to users who have Retweeted the Post specified by the `id` parameter)
* X API v2 endpoint:
  * [https://api.x.com/2/tweets/:id/retweeted\_by](https://api.x.com/2/tweets/:id/retweeted_by)
    (Returns a list of accounts who have Retweeted a given Post)

**App and Project requirements**

The X API v2 endpoints require that you use credentials from a [developer App](/resources/fundamentals/developer-apps) that is associated with a [Project](/resources/fundamentals/developer-apps) when authenticating your requests. All X API v1.1 endpoints can use credentials from Apps or Apps associated with a project.

**Response data format**

One of the biggest differences between standard v1.1 and X API v2 endpoint versions is how you select which fields return in your payload.

For the standard endpoints, you receive many of the response fields by default, and then have the option to use parameters to identify which fields or sets of fields should return in the payload.

The X API v2 version only delivers the user id , name, and username fields by default. To request any additional fields or objects, you wil need to use the [fields](/x-api/fundamentals/fields) and [expansions](/x-api/fundamentals/expansions) parameters. Any user fields that you request from this endpoint will return in the primary user object. Any expanded Post object and fields will return in an includes object within your response. You can then match any expanded objects back to the user object by matching the IDs located in both the user and the expanded Post object. 

We encourage you to read more about these new parameters in their respective guides, or by reading our guide on [how to use fields and expansions](/x-api/fundamentals/data-dictionary#how-to-use-fields-and-expansions). 

We have also put together a [data format migration guide](/x-api/migrate/data-format-migration#migrating-from-standard-v1-1s-data-format-to-v2) which can help you map standard v1.1 fields to the newer v2 fields. This guide will also provide you the specific expansion and field parameter that you will need to pass with your v2 request to return specific fields. 
 

In addition to the changes in how you request certain fields, X API v2 is also introducing new JSON designs for the objects returned by the APIs, including [Post](/x-api/fundamentals/data-dictionary#tweet) and [user](/x-api/fundamentals/data-dictionary#user) objects.

* At the JSON root level, the standard endpoints return Post objects in a statuses array, while X API v2 returns a data array. 
* Instead of referring to Retweeted and Quoted "statuses", X 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 Post object) and favourites (in user object), X API v2 uses the term like. 
* X is adopting the convention that JSON values with no value (for example, null) are not written to the payload. Post and user attributes are only included if they have a non-null values. 
   

We also introduced a new set of fields to the [Post object](/x-api/fundamentals/data-dictionary#tweet) including the following:

* A [conversation\_id](/x-api/fundamentals/conversation-id) field
* Two new [annotations](/x-api/fundamentals/post-annotations) fields, including context and entities
* Several new [metrics](/x-api/fundamentals/metrics) fields 
* A new reply\_setting field, which shows you who can reply to a given Post

**Request parameters**

The following standard v1.1 request parameters accepted two request query parameters (user\_id or screen\_name). The X API v2 only accepts the numerical user ID, and it must be passed as part of the endpoint path.

***

## Code examples

### Get users who Retweeted a Post (v2)

<CodeGroup dropdown>
  ```bash cURL theme={null}
  curl "https://api.x.com/2/tweets/1234567890/retweeted_by?user.fields=username,verified" \
    -H "Authorization: Bearer $BEARER_TOKEN"
  ```

  ```python Python theme={null}
  import requests

  bearer_token = "YOUR_BEARER_TOKEN"
  url = "https://api.x.com/2/tweets/1234567890/retweeted_by"

  params = {"user.fields": "username,verified"}
  headers = {"Authorization": f"Bearer {bearer_token}"}

  response = requests.get(url, headers=headers, params=params)
  print(response.json())
  ```

  ```python Python SDK theme={null}
  from xdk import Client

  client = Client(bearer_token="YOUR_BEARER_TOKEN")

  # Get users who Retweeted a Post
  response = client.posts.get_retweeted_by(
      "1234567890",
      user_fields=["username", "verified"]
  )
  for user in response.data:
      print(f"{user.username} - Verified: {user.verified}")
  ```

  ```javascript JavaScript SDK theme={null}
  import { Client } from "@xdevplatform/xdk";

  const client = new Client({ bearerToken: "YOUR_BEARER_TOKEN" });

  // Get users who Retweeted a Post
  const response = await client.posts.getRetweetedBy("1234567890", {
    userFields: ["username", "verified"],
  });

  response.data?.forEach((user) => {
    console.log(`${user.username} - Verified: ${user.verified}`);
  });
  ```
</CodeGroup>
