User by username
Profile of one account by handle, including its numeric user ID.
Reference: https://www.twittrapi.com/docs/reference/user-by-username-username
Request
- Base URL: https://api.twittrapi.com
- URL: https://api.twittrapi.com/user/by/username/{username}
- Auth: API key in header X-API-KEY
Path parameters
Handle, with or without a leading @. 2 to 15 characters: letters, digits and underscore.
Query parameters
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
Raw JSON of X's UserByScreenName query (data.user.result, with rest_id and legacy profile fields). When X returns no user, the API answers 200 with {"data": {}, "userExists": false}.
With format=simple: {data: User}, or {data: null} when the handle does not exist.
Changes
No recorded changes to this operation across all 1 revision of this API.