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

# Mutes lookup

export const Button = ({href, children}) => {
  return <div className="not-prose group">
    <a href={href}>
      <button className="flex items-center space-x-2.5 py-1 px-4 bg-primary-dark dark:bg-white text-white dark:text-gray-950 rounded-full group-hover:opacity-[0.9] font-medium">
        <span>
          {children}
        </span>
        <svg width="3" height="24" viewBox="0 -9 3 24" class="h-6 rotate-0 overflow-visible"><path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg>
      </button>
    </a>
  </div>;
};

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

If you have been working with the standard v1.1 [GET mutes/users/ids](https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/mute-block-report-users/api-reference/get-mutes-users-ids) and [GET mutes/users/list](https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/mute-block-report-users/api-reference/get-mutes-users-list) endpoints, the goal of this guide is to help you understand the similarities and differences between the standard v1.1 and X API v2 mutes lookup endpoints.

* **Similarities**
  * Authentication
* **Differences**
  * Endpoint URLs

  * Users per request limits

  * App and Project requirements

  * Response data formats

  * Request parameters

#### Similarities

**Authentication**

Both the standard v1.1 and X API v2 mutes lookup endpoints use [OAuth 1.0a User Context](/resources/fundamentals/authentication#oauth-1-0a-2). Therefore, if you were previously using one of the standard v1.1 mutes lookup endpoints, you can continue using the same authentication method if you migrate to the X API v2 version. 

#### Differences

**Endpoint URLs**

* Standard v1.1 endpoints:
  * GET [https://api.x.com/1.1/mutes/users/ids.json](https://api.x.com/1.1/mutes/users/ids.json)
    (list of user IDs who the specified user muted)
  * GET [https://api.x.com/1.1/mutes/users/lists.json](https://api.x.com/1.1/mutes/users/lists.json)
    (list of users who are muted by the specified user)
* X API v2 endpoint:
  * GET [https://api.x.com/2/users/:id/muting](https://api.x.com/2/users/:id/muting)
    (list of users who are muted by the specified user ID)
     

**Users per request limits**

The standard v1.1 endpoints allow you to return up to 5000 users per request. The new v2 endpoints allow you to return up to 1000 users per request. To return a full 1000 users, you will need to pass max\_results=1000 as a query parameter; you can then pass the next\_token returned in the response payload to the pagination\_token query parameter in your next request.
 

**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 will 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 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 have equivalents in X API v2:

| **Standard**   | **X API v2**      |
| :------------- | :---------------- |
| stringify\_ids | No equivalent     |
| cursor         | pagination\_token |
| skip\_status   | No equivalent     |

There are also a set of standard v1.1 Mutes lookup request parameters **not** supported in X API v2:

| Standard          | Comment                                                                                                                                           |
| :---------------- | :------------------------------------------------------------------------------------------------------------------------------------------------ |
| include\_entities | This parameter is used to remove the entities node from the Post payload. It has been replaced with additive fields and expansions functionality. |

***

## Code examples

### Get muted users (v2)

<CodeGroup dropdown>
  ```bash cURL theme={null}
  curl "https://api.x.com/2/users/123456789/muting?user.fields=username,verified&max_results=100" \
    -H "Authorization: OAuth ..."
  ```

  ```python Python theme={null}
  # Requires OAuth 1.0a User Context authentication
  import requests
  from requests_oauthlib import OAuth1

  auth = OAuth1(
      "API_KEY", "API_SECRET",
      "ACCESS_TOKEN", "ACCESS_TOKEN_SECRET"
  )

  url = "https://api.x.com/2/users/123456789/muting"
  params = {"user.fields": "username,verified", "max_results": 100}

  response = requests.get(url, auth=auth, params=params)
  print(response.json())
  ```

  ```python Python SDK theme={null}
  from xdk import Client
  from xdk.oauth1_auth import OAuth1

  oauth1 = OAuth1(
      api_key="YOUR_API_KEY",
      api_secret="YOUR_API_SECRET",
      access_token="YOUR_ACCESS_TOKEN",
      access_token_secret="YOUR_ACCESS_TOKEN_SECRET"
  )

  client = Client(auth=oauth1)

  # Get muted users with pagination
  for page in client.users.get_muting(
      "123456789",
      user_fields=["username", "verified"],
      max_results=100
  ):
      for user in page.data:
          print(f"{user.username} - Verified: {user.verified}")
  ```

  ```javascript JavaScript SDK theme={null}
  import { Client, OAuth1 } from "@xdevplatform/xdk";

  const oauth1 = new OAuth1({
    apiKey: "YOUR_API_KEY",
    apiSecret: "YOUR_API_SECRET",
    accessToken: "YOUR_ACCESS_TOKEN",
    accessTokenSecret: "YOUR_ACCESS_TOKEN_SECRET",
  });

  const client = new Client({ oauth1 });

  // Get muted users with pagination
  const paginator = client.users.getMuting("123456789", {
    userFields: ["username", "verified"],
    maxResults: 100,
  });

  for await (const page of paginator) {
    page.data?.forEach((user) => {
      console.log(`${user.username} - Verified: ${user.verified}`);
    });
  }
  ```
</CodeGroup>
