API · X
GET /x/search/users
X accounts matching a name, handle or keyword, paginated.
| Request | GET /v1/x/search/users |
| Operation id | x.search.users |
| Cost | 1 credit, refunded if the call fails |
| Auth | API key: Authorization: Bearer <key> or x-api-key. |
X accounts matching a name, handle or keyword, paginated.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
q | string | yes | Name, handle or keyword. Example: nasa. |
after | string | no | Cursor: the previous page's meta.next_token. |
Responses
| Status | Meaning | Schema |
|---|---|---|
200 | Matching accounts, with a next_token. | XUsersResponse |
400 | Invalid input. Nothing was charged. | Error |
401 | Missing or invalid API key. | Error |
402 | Not enough credits, a spend cap was reached, or payment is required. | Error |
403 | The target is private, or the account is suspended. | Error |
404 | The post or account does not exist, was deleted, or is suspended. | Error |
429 | Too many requests. Wait for Retry-After seconds. | Error |
503 | X is temporarily unavailable. Retryable; nothing was charged. | Error |
XUsersResponse fields
| Field | Type | Description |
|---|---|---|
data | XUser[] | |
meta | object |
Errors use one shape everywhere; see Errors for every code and what to do.