# Twitter (X) User Posts API

> Returns posts and tweets from a specified Twitter (X) user timeline. Users can be identified by either their screen name or numeric user ID, with cursor pagination supported.

Source: https://www.sandbase.ai/apis/twitter/web/user-post-tweet
API reference: https://www.sandbase.ai/apis/twitter/web/user-post-tweet/docs

## Facts

- Provider: Twitter
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/twitter/web/user-post-tweet`
- Price: $0.0015 per call
- Free allowance: 100 calls per organization per UTC day, shared across eligible APIs
- Capabilities: api, twitter
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

`POST https://api.sandbase.ai/v1/api/twitter/web/user-post-tweet` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `cursor` | string | no |  |
| `rest_id` | integer | no |  |
| `screen_name` | string | no |  |

## FAQ

### How do I use the Twitter (X) User Posts API?

Send a POST request to https://api.sandbase.ai/v1/api/twitter/web/user-post-tweet with your SandBase API key in the Authorization header (Bearer) and the parameters as a JSON body. You can also try it in the Playground on this page without writing code.

### How much does the Twitter (X) User Posts API cost?

$0.0015 per call. Every organization gets 100 free calls per UTC day, shared across eligible SandBase APIs including this one; after that each call is billed at this price from your SandBase balance. There is no subscription.

### What parameters does the Twitter (X) User Posts API accept?

No parameters are required. Optional: cursor (string), rest_id (integer) and screen_name (string). The Parameters table and the Playground on this page list every field.

### What does the Twitter (X) User Posts API return?

A JSON response returned in the same HTTP request (synchronous).

### Do I need a Twitter developer account or API key?

No. Twitter (X) User Posts runs through SandBase, so one SandBase API key covers this endpoint and every other API and model in the catalog. You do not need to apply for Twitter API access separately.

## README

### Twitter (X) User Posts API

Retrieve a user's timeline posts using either their `screen_name` or numeric `rest_id`. You can paginate through older posts using the `cursor` parameter.

#### Use cases

- Archive public tweets and posts from a specific profile.
- Monitor recent timeline activity for designated accounts.
- Analyze posting frequency and timeline history for public figures.

#### Request

```bash
curl -X POST "https://api.sandbase.ai/v1/api/twitter/web/user-post-tweet" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `cursor` | string | No | Cursor, default is None, used for paging, obtained from the JSON in the last request. |
| `rest_id` | integer | No | User ID, for example: 44196397, if the user ID is used, the username will be ignored, only one of them can be selected. |
| `screen_name` | string | No | Screen Name, for example: elonmusk, can be obtained from the user's homepage link, for example: elonmusk in https://twitter.com/elonmusk |

#### Notes

- Provide either `rest_id` or `screen_name`; if `rest_id` is specified, `screen_name` is ignored.
- Pass `cursor` from the previous response payload to page through timeline results.

#### Related APIs

- [Twitter (X) Latest Tweet Comments](/model/twitter/web/latest-post-comments): Returns recent replies and comment timelines for a specific post using its tweet ID, with cursor support for multi-page results.
- [Twitter (X) Tweet Comments](/model/twitter/web/post-comments): Returns comment threads and replies under a specified tweet.
- [Twitter (X) Retweet User List](/model/twitter/web/retweet-user-list): Returns a list of users who reposted a specific post using its tweet ID, including follower counts, media counts, and user identifiers.
