xAPIs.dev
API Reference · v2
Free Tools{ }OpenAPI YAMLGet API key
API Reference / User / Get user tweets

Get user tweets

GET/twitter/user/last_tweets15 credits

Fetch the most recent tweets from an account, with full engagement metrics and media attachments. Cursor-paginated. The sample response below is captured from the live API. List endpoints paginate with `has_next_page` and `next_cursor`.

Authentication required
Send your key in the x-api-key header. Requests without a valid key return 401.

Query parameters

userName
stringrequired
The @handle to fetch tweets for.
includeReplies
booleanoptional
Include replies in the timeline. Defaults to false.
cursor
stringoptional
Pagination cursor for the next page.

Response fields

dataobject
Response payload.
has_next_pageboolean
Whether another page of results is available.
next_cursorstring
Cursor for the next page; null or empty when exhausted.
statusstring
Request status: "success" or "error".
codeinteger
Numeric status code (0 = OK).
msgstring
Status message from the upstream.
data.tweetsarray
List of tweet objects in reverse-chronological order.
Request
curl https://v2.xapis.dev/twitter/user/last_tweets \
  -G --data-urlencode "userName=elonmusk" \
  -H "x-api-key: $XAPIS_KEY"
Response200 OK
application/json
{
  "status": "success",
  "code": 0,
  "msg": "success",
  "data": {
    "pin_tweet": null,
    "tweets": [
      {
        "type": "tweet",
        "id": "2074740539874775163",
        "url": "https://x.com/elonmusk/status/2074740539874775163",
        "twitterUrl": "https://twitter.com/elonmusk/status/2074740539874775163",
        "text": "Based on strong positive feedback from customers in our beta test program, @SpaceXAI will make Grok …",
        "source": "Twitter for iPhone",
        "retweetCount": 1809,
        "replyCount": 2518,
        "likeCount": 16354,
        "quoteCount": 661,
        "viewCount": 1508816,
        "createdAt": "Wed Jul 08 06:21:06 +0000 2026",
        "lang": "en",
        "bookmarkCount": 899,
        "isReply": false,
        "inReplyToId": null,
        "conversationId": "2074740539874775163",
        "displayTextRange": [
          0
        ],
        "inReplyToUserId": null,
        "inReplyToUsername": null,
        "author": {
          "type": "user",
          "userName": "elonmusk",
          "url": "https://x.com/elonmusk",
          "twitterUrl": "https://twitter.com/elonmusk",
          "id": "44196397",
          "name": "Elon Musk",
          "isVerified": false,
          "isBlueVerified": true,
          "verifiedType": null,
          "profilePicture": "https://pbs.twimg.com/profile_images/2053244804520427520/m8mdWZCG_normal.jpg",
          "coverPicture": "https://pbs.twimg.com/profile_banners/44196397/1774145451",
          "description": "",
          "location": "",
          "followers": 240742080,
          "following": 1366,
          "status": "",
          "canDm": false,
          "canMediaTag": false,
          "createdAt": "Tue Jun 02 20:12:29 +0000 2009",
          "entities": "…",
          "fastFollowersCount": 0,
          "favouritesCount": 238191,
          "hasCustomTimelines": true,
          "isTranslator": false,
          "…": "…"
        },
        "extendedEntities": {},
        "card": null,
        "place": {},
        "…": "…"
      }
    ]
  },
  "has_next_page": true,
  "next_cursor": "DAADDAABCgABHMr1h1BWkHsKAAIcyizR5ldAqAAIAAIAAAACCAADAAAAAAgABAAAAAAKAAUcyxYhAoAnEAoABhzLFiECf9jwAAA"
}
base url · https://v2.xapis.dev
Ready to call Get user tweets?