GetXAPI
Users

User Tweets Complete

Fetch a Twitter/X user's recent tweets-and-replies timeline with self-thread expansion. $0.003 per call, 40 raw results per page. GetXAPI complete tweets endpoint.

GET/twitter/user/tweets/complete

This endpoint costs $0.003 per API call. It fetches 40 raw items from the recent tweets-and-replies timeline per page, then expands detected self-threads.

Query Parameters

ParameterTypeRequiredDescription
userNamestringYesScreen name (without @)
cursorstringNoPagination cursor

Notes

  • Returns the user's recent tweets-and-replies timeline, not the full historical archive. X's available recent timeline window is typically around 3,200 items.
  • Expands detected self-threads so thread continuations inside that recent window are returned more completely.
  • Thread expansion is capped to 20 distinct self-thread roots per page; complete is false if that cap is exceeded or an expansion could not finish.
  • Expanded threads can overlap with adjacent pages. If you paginate, dedupe tweets by id across pages.
  • Pagination uses next_cursor until has_more is false.
  • Each tweet includes an entities object — see User Tweets for the field shape.

Response (200)

{
  "userName": "example_user",
  "userId": "1234567890123456789",
  "tweet_count": 43,
  "has_more": true,
  "next_cursor": "DAABCgABHAY...",
  "expanded_threads": 3,
  "complete": true,
  "tweets": [
    {
      "type": "tweet",
      "id": "2010705621524292007",
      "text": "Hello from GetXAPI.",
      "entities": { "hashtags": [], "symbols": [], "timestamps": [], "urls": [], "user_mentions": [] },
      "author": {
        "userName": "example_user"
      }
    }
  ]
}

Error Responses

400 - Missing userName

{
  "error": "Missing required query param: userName"
}

Example

curl -H "Authorization: Bearer API_KEY" "https://api.getxapi.com/twitter/user/tweets/complete?userName=example_user"

# With pagination
curl -H "Authorization: Bearer API_KEY" "https://api.getxapi.com/twitter/user/tweets/complete?userName=example_user&cursor=DAABCgABHAY..."

On this page