Comparing X API’s users lookup endpoints
The v2 user lookup endpoints will replace the standard v1.1 GET users/lookup and GET users/show 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 X API v2 endpoint, then this set of guides is for you. The following tables compare the various types of users lookup endpoints:
Other migration resources
User lookup: Standard v1.1 to X API v2
X API migration hub
Check out some sample code for these endpoints