Usernames to IDs
Numeric user IDs for up to 100 handles in one call.
Reference: https://www.twittrapi.com/docs/reference/user-usernames-to-ids
Request
- Base URL: https://api.twittrapi.com
- URL: https://api.twittrapi.com/user/usernames/to/ids
- Auth: API key in header X-API-KEY
Query parameters
Handles separated by commas, with or without @. At most 100.
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: {"userIds": {"jack": "12", ...}}. Only resolved handles are keys of userIds. A handle that could not be resolved is left out of userIds and listed in errors: [{"username": "...", "error": "not_found" | "suspended" | "upstream_error", "message": "..."}]. errors is left out when every handle resolved. upstream_error means X could not be asked (retry later), not that the account is missing.
With format=simple: Unchanged inside {data: ...}: {userIds, errors} 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.