# X (Twitter) Users API Reference

Canonical: https://monsterapi.co/docs/api/x-twitter-users

Read the X (Twitter) Users reference. Review parameters, response fields, examples, and current credit prices.

OpenAPI specification: [X (Twitter)](https://monsterapi.co/docs/openapi/platforms/twitter.yaml).

---

Current operation prices: [public catalog](https://monsterapi.co/account/api/v1/public/api-prices). Prices use credits per request.

---

# X (Twitter): Account followers

`GET /twitter/api/user/id/{rest_id}/followers`

Documentation: https://monsterapi.co/docs/api/twitter#account-followers

Operation ID: `twitter_user_followers_by_id`

Returns a page of accounts following one account by numeric identifier. Requires sign-in and is unavailable through the public guest API.

## Authentication

Send your billing API key in the `Authorization: Bearer <YOUR_API_KEY>` header. Your account login is separate.

## Inputs

- `rest_id` (path, required): Required account identifier from `user.id` in [GET /user/{name}](https://monsterapi.co/docs/twitter#account-profiles). Decimal digits from 1 to 9223372036854775807, no leading zero.

- `cursor` (query, optional): Optional continuation: send top-level `next_cursor` from [GET /user/id/{rest_id}/followers](https://monsterapi.co/docs/twitter#unavailable-endpoints) unchanged as `cursor` to GET /user/id/{rest_id}/followers. Up to 8,192 characters; base64/base64url decoding to at least five bytes, or two signed 64-bit decimal numbers separated by |. Omit for the first page.

- `limit` (query, optional): Optional requested number of accounts: 1 to 100, default 40. The response may contain more or fewer.

## Responses

- 200: Page of accounts; a page without accounts carries the cursor of the next one

- 400: Identifier, cursor or limit outside the accepted set, or a cursor that cannot continue this list

Refused at the gateway: the request target, path and query string together, is longer than 8,192 bytes; or the headers, the target counted among them, exceed 16,384 bytes or 64 fields

- 401: #/components/responses/GatewayUnauthorized

- 402: #/components/responses/GatewayPaymentRequired

- 403: Account not available anonymously

Refused at the gateway: the API key is unknown or revoked

- 404: No such account, or an empty list without next_cursor

- 405: `method_not_allowed`: the endpoint answers GET alone, and any other method, HEAD included, is refused

Refused at the gateway: the path exists, but no operation on it takes the method of the request, HEAD included; `Allow` names the methods that do

- 409: #/components/responses/GatewayConflict

- 429: #/components/responses/GatewayTooManyRequests

- 500: The requested information could not be read; this does not establish that the object is absent

- 501: The requested information is unavailable without sign-in

- 503: Rate limit (`rate_limited`), temporary request failure (`upstream_error`), service capacity unavailable (`no_proxies`), too many concurrent requests (`overloaded`), or request temporarily unavailable (`upstream_stale`)

Refused at the gateway: the check could not complete, the account is suspended, or the platform did not answer; each may pass later, and `Retry-After` comes only when the platform did not answer

## Credits

Check the live price in the documentation before sending. Platform 2xx and 4xx responses can use credits, including empty data. Gateway refusals and 5xx responses do not use credits. Each pagination request is a separate call.

https://monsterapi.co/docs/pricing

## Request template

Replace path placeholders and add the required query parameters from the Inputs section before sending.

```shell

curl --get 'https://api.monsterapi.co/twitter/api/user/id/{rest_id}/followers' \
  -H 'Authorization: Bearer <YOUR_API_KEY>'

```

---

# X (Twitter): Account following

`GET /twitter/api/user/id/{rest_id}/following`

Documentation: https://monsterapi.co/docs/api/twitter#account-following

Operation ID: `twitter_user_following_by_id`

Returns a page of accounts followed by one account by numeric identifier. Requires sign-in and is unavailable through the public guest API.

## Authentication

Send your billing API key in the `Authorization: Bearer <YOUR_API_KEY>` header. Your account login is separate.

## Inputs

- `rest_id` (path, required): Required account identifier from `user.id` in [GET /user/{name}](https://monsterapi.co/docs/twitter#account-profiles). Decimal digits from 1 to 9223372036854775807, no leading zero.

- `cursor` (query, optional): Optional continuation: send top-level `next_cursor` from [GET /user/id/{rest_id}/following](https://monsterapi.co/docs/twitter#unavailable-endpoints) unchanged as `cursor` to GET /user/id/{rest_id}/following. Up to 8,192 characters; base64/base64url decoding to at least five bytes, or two signed 64-bit decimal numbers separated by |. Omit for the first page.

- `limit` (query, optional): Optional requested number of accounts: 1 to 100, default 40. The response may contain more or fewer.

## Responses

- 200: Page of accounts; a page without accounts carries the cursor of the next one

- 400: Identifier, cursor or limit outside the accepted set, or a cursor that cannot continue this list

Refused at the gateway: the request target, path and query string together, is longer than 8,192 bytes; or the headers, the target counted among them, exceed 16,384 bytes or 64 fields

- 401: #/components/responses/GatewayUnauthorized

- 402: #/components/responses/GatewayPaymentRequired

- 403: Account not available anonymously

Refused at the gateway: the API key is unknown or revoked

- 404: No such account, or an empty list without next_cursor

- 405: `method_not_allowed`: the endpoint answers GET alone, and any other method, HEAD included, is refused

Refused at the gateway: the path exists, but no operation on it takes the method of the request, HEAD included; `Allow` names the methods that do

- 409: #/components/responses/GatewayConflict

- 429: #/components/responses/GatewayTooManyRequests

- 500: The requested information could not be read; this does not establish that the object is absent

- 501: The requested information is unavailable without sign-in

- 503: Rate limit (`rate_limited`), temporary request failure (`upstream_error`), service capacity unavailable (`no_proxies`), too many concurrent requests (`overloaded`), or request temporarily unavailable (`upstream_stale`)

Refused at the gateway: the check could not complete, the account is suspended, or the platform did not answer; each may pass later, and `Retry-After` comes only when the platform did not answer

## Credits

Check the live price in the documentation before sending. Platform 2xx and 4xx responses can use credits, including empty data. Gateway refusals and 5xx responses do not use credits. Each pagination request is a separate call.

https://monsterapi.co/docs/pricing

## Request template

Replace path placeholders and add the required query parameters from the Inputs section before sending.

```shell

curl --get 'https://api.monsterapi.co/twitter/api/user/id/{rest_id}/following' \
  -H 'Authorization: Bearer <YOUR_API_KEY>'

```

---

# X (Twitter): Account profile by handle

`GET /twitter/api/user/{name}`

Documentation: https://monsterapi.co/docs/api/twitter#account-profile-by-handle

Operation ID: `twitter_user_profile`

Returns the public profile of one account by handle, with its identity, biography, images, verification and counts.

## Authentication

Send your billing API key in the `Authorization: Bearer <YOUR_API_KEY>` header. Your account login is separate.

## Inputs

- `name` (path, required): Required handle without @: 1 to 15 ASCII letters, digits or underscores.

## Responses

- 200: Profile of the account

- 400: Handle outside the accepted set

Refused at the gateway: the request target, path and query string together, is longer than 8,192 bytes; or the headers, the target counted among them, exceed 16,384 bytes or 64 fields

- 401: #/components/responses/GatewayUnauthorized

- 402: #/components/responses/GatewayPaymentRequired

- 403: Account not available anonymously

Refused at the gateway: the API key is unknown or revoked

- 404: No such account

- 405: `method_not_allowed`: the endpoint answers GET alone, and any other method, HEAD included, is refused

Refused at the gateway: the path exists, but no operation on it takes the method of the request, HEAD included; `Allow` names the methods that do

- 409: #/components/responses/GatewayConflict

- 429: #/components/responses/GatewayTooManyRequests

- 500: The requested information could not be read; this does not establish that the object is absent

- 501: The requested information is unavailable without sign-in

- 503: Rate limit (`rate_limited`), temporary request failure (`upstream_error`), service capacity unavailable (`no_proxies`), too many concurrent requests (`overloaded`), or request temporarily unavailable (`upstream_stale`)

Refused at the gateway: the check could not complete, the account is suspended, or the platform did not answer; each may pass later, and `Retry-After` comes only when the platform did not answer

## Credits

Check the live price in the documentation before sending. Platform 2xx and 4xx responses can use credits, including empty data. Gateway refusals and 5xx responses do not use credits. Each pagination request is a separate call.

https://monsterapi.co/docs/pricing

## Request template

Replace path placeholders and add the required query parameters from the Inputs section before sending.

```shell

curl --get 'https://api.monsterapi.co/twitter/api/user/{name}' \
  -H 'Authorization: Bearer <YOUR_API_KEY>'

```
