MenuList X user posts

XUSER

List X user posts

Returns recent posts from an account's timeline, including its own posts, quotes and retweets, with cursor pagination.

GET/v1/twitter/user/postsCursor-paginated

Auth

API key Get a key

Platform

XPublic data only

Pagination

Cursorpagination.next_cursor
Base URLhttps://social-api.airaa.xyz
curl "https://social-api.airaa.xyz/v1/twitter/user/posts?username=NASA" \
  -H "X-API-KEY: $AIRAA_KEY"
Replace $AIRAA_KEY with your key
200Responseapplication/json
{
  "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_cursor while pagination.has_more is true. next_cursor is null when 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: [] with has_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_at if you need strict time order.
  • A protected account returns 200 with posts: []. Check is_private on /v1/twitter/user/profile to 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 string
usernamestringrequired

The account's handle. A leading @ is accepted and ignored

Example NASA

cursorstringoptional

pagination.next_cursor from the previous page, unchanged. Omit for the first page

Response

200 · application/json

Absent fields are omitted, never null. Response conventions

FieldTypeDescription
postsarray<object>

Posts on this page

posts[].idstring

Numeric post ID

posts[].post_urlstring · url

Link to the post on x.com

posts[].typestring

post, reply, quote or retweet

posts[].textstring

Full text, including long posts. For a retweet, the original post's text

posts[].display_text_rangeobject

Character range of the visible text, without leading reply mentions or trailing media links

posts[].display_text_range.startinteger

Index of the first visible character

posts[].display_text_range.endinteger

Index where the visible text ends

posts[].published_atstring · date-time

Post time, ISO 8601 UTC timestamp

posts[].conversation_idstring

ID of the first post in the thread

posts[].authorobject

The account that published the post. For a retweet, the account that reposted

posts[].author.idstring

Numeric account ID, as a string

posts[].author.usernamestring

Handle without the @

posts[].author.namestring

Display name

Errors

{ "error": "message" }
StatusMeaningRetry
400

username is missing or empty, or the cursor is not one this API returned. Does not use quota

{ "error": "username is required" }
No. Fix the request.
401

Missing or invalid X-API-KEY header

{ "error": "Invalid API key." }
No. Check the key.
403

Your plan does not include this endpoint, or your access is paused. code is endpoint_not_enabled, subscription_inactive or account_suspended. Does not use quota

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 (code: rate_limited, retry after Retry-After), or the plan's quota is used up (code: quota_exhausted). Does not use quota

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 Retry-After when it is sent. Does not use quota

{ "error": "Service temporarily unavailable." }
Yes, after Retry-After
esc

Pages

Endpoints

↑↓ to move↵ to open