v1

latestOpenAPI 3.0.32026-07-213841124.9 KB
Technical Endpoints

Username to User ID

Returns the unique Twitter/X user ID for a given username. You provide the username, and the endpoint returns the corresponding stable user ID.

Use cases:

Developers converting usernames into IDs before making other API requests; SaaS platforms normalizing user identifiers in databases; analytics tools storing stable IDs instead of usernames; automation systems resolving usernames to internal identifiers; data pipelines preparing consistent user references for further processing.

get/username-to-id/{user_handle}

Path parameters

user_handlestring required

user_handle required

Response

OK

idstring

Example response

{
  "id": "1"
}