v3

latestOpenAPI 3.0.32026-08-02415689.9 KB
Technical Endpoints

Convert Username to User ID

Converts a Twitter/X username into the corresponding stable numeric user ID. Unlike usernames, user IDs never change, making them reliable for long-term storage and cross-referencing.

get/username-to-id/{user_handle}

Path parameters

user_handlestring required

user_handle required

Response

OK

idstring

Numeric Twitter/X user ID.

Example response

{
  "id": "1"
}