Comparing Twitter API’s users lookup endpoints

The v2 user lookup endpoints will replace the standard v1.1 GET users/lookup and GET users/show endpoints, as well as the Labs users lookup endpoints. If you have code, apps, or tools that use one of these versions of the user lookup endpoints, and are considering migrating to the newer Twitter API v2 endpoint, then this set of guides is for you. 
 

The following tables compare the various types of users lookup endpoints:
 

Description

Standard v1.1

Labs

Twitter API v2

 

HTTP methods supported

GET GET GET  

Host domain

https://api.twitter.com https://api.twitter.com https://api.twitter.com  

Endpoint path

/1.1/users/show.json /1.1/users/lookup.json

/labs/2/users

/labs/2/users/:id

/labs/2/users/by

/labs/2/users/by/:username

/2/users

/2/users/:id

/2/users/by

/2/users/by/:username

 

Authentication

OAuth 1.0a User Context

OAuth 1.0a User Context

OAuth 2.0 Bearer Token

OAuth 1.0a User Context

OAuth 2.0 Bearer Token

 

Default request rate limits

900 requests per 15 min (per user)

/show - 900 requests per 15 min (per app)
/lookup - 300 requests per 15 min (per app)

900 requests per 15 min

900 requests per 15 min (per user)

300 requests per 15 min (per app)

 

Maximum Users per response 

/show -  1

/lookup - 100

100

100

 

JSON response object format

Standard v1.1 format

Labs v2 (determined by fields and expansions request parameters, not backward-compatible with v1.1 formats)

Twitter API v2 format (determined by fields and expansions request parameters, not backward-compatible with v1.1 formats)

To learn more about how to migrate from the Standard v1.1 format to the Twitter API v2 format, please visit our data formats migration guide.

 

Supports selecting which fields return in the payload

 

 
Supports the annotations fields (on pinned Tweet)    
Supports requesting new metrics fields (on pinned Tweet)    
Supports the conversation_id field (on pinned Tweet)      
Requires the use of credentials from a developer App associated with a project