XUSER
List X user posts
Returns recent posts from an account's timeline, including its own posts, quotes and retweets, with cursor pagination.
/v1/twitter/user/postsCursor-paginatedhttps://social-api.airaa.xyzcurl "https://social-api.airaa.xyz/v1/twitter/user/posts?username=NASA" \ -H "X-API-KEY: $AIRAA_KEY"
{
"posts": [
{
"id": "2124268568061661622",
"post_url": "https://x.com/NASA/status/2124268568061661622",
"type": "retweet",
"text": "A @SpaceX Dragon splashed down in the Pacific Ocean off the coast of California at 2:03 p.m. PST today. Support personnel will retrieve the cargo-packed spacecraft loaded with station hardware and science experiments for analysis. More... https://go.nasa.gov/4zWBtk7 https://x.com/Space_Station/status/2124265863323045902/photo/1",
"display_text_range": {
"start": 0,
"end": 140
},
"published_at": "2026-11-21T22:27:48.000Z",
"conversation_id": "2124268568061661622",
"author": {
"id": "11348282",
"username": "NASA",
"name": "NASA",
"profile_url": "https://x.com/NASA",
"profile_picture_url": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_normal.jpg",
"is_verified": false,
"is_blue_verified": true,
"is_private": false
},
"metrics": {
"like_count": 0,
"repost_count": 183,
"reply_count": 0,
"quote_count": 0,
"bookmark_count": 0,
"view_count": 49916
},
"media": [],
"hashtags": [],
"mentions": [
{
"id": "1451773004",
"username": "Space_Station",
"name": "International Space Station"
},
{
"id": "34743251",
"username": "SpaceX",
"name": "SpaceX"
}
],
"urls": [],
"reposted_post": {
"id": "2124265863323045902",
"post_url": "https://x.com/Space_Station/status/2124265863323045902",
"text": "A @SpaceX Dragon splashed down in the Pacific Ocean off the coast of California at 2:03 p.m. PST today. Support personnel will retrieve the cargo-packed spacecraft loaded with station hardware and science experiments for analysis. More... https://go.nasa.gov/4zWBtk7 https://x.com/Space_Station/status/2124265863323045902/photo/1",
"author": {
"id": "1451773004",
"username": "Space_Station",
"name": "International Space Station",
"profile_url": "https://x.com/Space_Station",
"profile_picture_url": "https://pbs.twimg.com/profile_images/1949871812176732160/ZesOirrR_normal.jpg",
"is_verified": false,
"is_blue_verified": true,
"is_private": false
}
}
}
],
"pagination": {
"next_cursor": "Kdm9lRWmV6ZDDuw3_d1qB_RaRLmBV8JGQt3EV0MKMoj_87h5mBHNiV9zZ7hKKc7Y6ZTwhRkbRXvg0X1LZ-ejdE8JpOcgFzoxB0tlnqXDA8Zn4Xnac_SU5Cz49DMbImGQz25LyZr0WaxAmMmhO_FBLQjPjuX-2aGx1rzVme32LTU",
"has_more": true
}
}Posts use the same shape as /v1/twitter/posts/details. Only id is always present. reply_to ({ post_id, user_id, username }) appears on replies, quoted_post on quotes and reposted_post on retweets. On a retweet, author is the account that reposted and metrics can describe the repost rather than the original, so most counts may be 0; request reposted_post.id from /v1/twitter/posts/details for the original's numbers.
Pagination
- Keep requesting with the latest
pagination.next_cursorwhilepagination.has_moreistrue.next_cursorisnullwhen there are no more pages. - Page size varies. A page usually holds about 20 posts, but some accounts return a single page of up to about 100.
- The last page can be empty:
posts: []withhas_more: false. - Cursors are opaque. Pass them back unchanged; a changed cursor returns
400 Invalid cursor. - Order is not guaranteed, and a pinned post can come first. Sort by
published_atif you need strict time order. - A protected account returns
200withposts: []. Checkis_privateon/v1/twitter/user/profileto tell it from an account that hasn't posted.
Quota
A request uses one request from your quota when it gets an answer about the data you asked for, including a 404 for an account or post that does not exist. Input errors such as a missing parameter are free, and so are 5xx responses. Access needs a grant for the endpoint; grants match from the most specific scope to the least, for example twitter.user.profile, then twitter.user, then twitter.
Parameters
Query stringusernamestringrequiredThe account's handle. A leading @ is accepted and ignored
Example NASA
cursorstringoptionalpagination.next_cursor from the previous page, unchanged. Omit for the first page
Response
200 · application/jsonAbsent fields are omitted, never null. Response conventions
| Field | Type | Description |
|---|---|---|
| posts | array<object> | Posts on this page |
| posts[].id | string | Numeric post ID |
| posts[].post_url | string · url | Link to the post on x.com |
| posts[].type | string | post, reply, quote or retweet |
| posts[].text | string | Full text, including long posts. For a retweet, the original post's text |
| posts[].display_text_range | object | Character range of the visible text, without leading reply mentions or trailing media links |
| posts[].display_text_range.start | integer | Index of the first visible character |
| posts[].display_text_range.end | integer | Index where the visible text ends |
| posts[].published_at | string · date-time | Post time, ISO 8601 UTC timestamp |
| posts[].conversation_id | string | ID of the first post in the thread |
| posts[].author | object | The account that published the post. For a retweet, the account that reposted |
| posts[].author.id | string | Numeric account ID, as a string |
| posts[].author.username | string | Handle without the @ |
| posts[].author.name | string | Display name |
Errors
{ "error": "message" }| Status | Meaning | Retry |
|---|---|---|
| 400 |
{ "error": "username is required" } | No. Fix the request. |
| 401 | Missing or invalid { "error": "Invalid API key." } | No. Check the key. |
| 403 | Your plan does not include this endpoint, or your access is paused. | No. Check your plan. |
| 404 | No account has this handle. Uses quota { "error": "This account does not exist." } | No. It doesn't exist. |
| 429 | Too many requests per second ( | After your quota resets |
| 502 | The data could not be fetched right now. Retry later. Does not use quota { "error": "Internal Server Error." } | Yes, with backoff |
| 503 | Temporary outage. Retry after { "error": "Service temporarily unavailable." } | Yes, after Retry-After |