Users
Username to ID
Numeric user ID for one handle. Smaller response than the full profile.
Reference: https://www.twittrapi.com/docs/reference/username-to-id-username
get/username/to/id/{username}
Request
- Base URL: https://api.twittrapi.com
- URL: https://api.twittrapi.com/username/to/id/{username}
- Auth: API key in header X-API-KEY
Path parameters
usernamestring required
Handle, with or without a leading @. 2 to 15 characters: letters, digits and underscore.
Query parameters
format'raw' | 'simple'
raw (default): X's JSON passed through. simple: flat camelCase JSON with a fixed schema and a {data, nextCursor, previousCursor, hasNextPage} envelope. Same price. The header X-Response-Format: simple does the same.
Response
Built by the API: {"userId": "12"}.
With format=simple: Unchanged inside {data: ...}: {userId} is already small, so the simple format only adds the envelope.
Changes
No recorded changes to this operation across all 1 revision of this API.