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.
title: v1 to v2 sidebarTitle: v1 to v2 keywords: [“v1.1 to v2 migration”, “list lookup migration”, “migrate list lookup”, “standard to v2 list lookup”, “v1 to v2 list lookup”, “migration guide”]
List lookup: Standard v1.1 compared to X API v2
If you have been working with the standard v1.1 GET lists/show and GET lists/ownerships endpoints, the goal of this guide is to help you understand the similarities and differences between the standard v1.1 and X API v2 List lookup endpoints. * Similarities * Authentication methods * Rate limits * Differences * Endpoint URLs * App and Project requirements * Data objects per request limits * Response data formats * Request parametersSimilarities
Authentication Both endpoint versions support both OAuth 1.0a User Context and App only. Therefore, if you were previously using one of the standard v1.1 List lookup endpoints, 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 only Access Token, see this App only guide. Rate limits| Standard v1.1 | X API v2 |
| /1.1/lists/show.json 75 requests per 15-minute window with OAuth 1.0a User Context 75 requests per 15-minute window with App only | /2/lists/:id 75 requests per 15-minute window with OAuth 1.0a User Context 75 requests per 15-minute window with OAuth 2.0 Authorization Code with PKCE |
| /1.1/lists/ownerships.json 15 requests per 15-minute window with OAuth 1.0a User Context 15 requests per 15-minute window with App only | /2/users/:id/owned_lists 15 requests per 15-minute window with OAuth 1.0a User Context 15 requests per 15-minute window with OAuth 2.0 Authorization Code with PKCE 15 requests per 15-minute window with App only |
Differences
Endpoint URLs * Standard v1.1 endpoints: * GET https://api.x.com/1.1/lists/show.json (Lookup a specified List) * GET https://api.x.com/1.1/lists/ownerships.json (Lookup specified user owned Lists) * X API v2 endpoint: * GET https://api.x.com/2/lists/:id (Lookup a specified List) * GET https://api.x.com/2/users/:id/owned_lists (Lookup specified user owned Lists) App and Project requirements The X API v2 endpoints require that you use credentials from a developer App that is associated with a Project when authenticating your requests. All X API v1.1 endpoints can use credentials from Apps or Apps associated with a project. Data objects per request limits The standard v1.1 /lists/ownerships endpoint allows you to return up to 1000 Lists per request. The new v2 endpoints allow you to return up to 100 Lists per request. By default, 100 user objects will be returned, to change the number of results you will need to pass a query parameter max_results= with a number between 1-100; you can then pass the next_token returned in the response payload to the pagination_token query parameter in your next request. 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 additional fields or sets of fields should return in the payload. The X API v2 version only delivers the List id and name fields by default. To request any additional fields or objects, you will need to use the fields and expansions parameters. Any List fields that you request from this endpoint will return in the primary List object. Any expanded Post or user object and fields will return an includes object within your response. You can then match any expanded objects back to the List object by matching the IDs located in both the user and the expanded Post object. Here are examples of possible List fields and expansions: * created_at * follower_count * member_count * owner_id * description * private| Endpoint | Expansion |
| /2/lists/:id | owner_id |
| /2/users/:id/owned_lists | owner_id |
| Standard v1.1 | X API v2 |
| list_id | id |
| slug | No equivalent |
| owner_screen_name | No equivalent |
| owner_id | Requested with expansions/fields parameter |
| Standard v1.1 | X API v2 |
| user_id | id |
| screen_name | No equivalent |
| count | max_results |
| cursor | pagination_token |