Get user by ID
get_user_by_idGet an X user's profile by numeric user ID (rest_id). Same data as get_user_by_username.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Response format (default simple). simple: compact JSON with flat camelCase tweets and users, about 60% fewer tokens. raw: X's full GraphQL JSON, only needed for fields simple leaves out (cards, polls, edit history, community notes). | |
| userId | Yes | Numeric X user ID (rest_id). | |
| max_chars | No | Maximum characters of JSON to return (default 50000). Longer output is cut with a [TRUNCATED] marker. Lower it to save context, raise it if you need the full response. |