LurkAPI
Docs · User tweets

User tweets

An account's tweets and retweets, about 20 per page, with text, media and engagement counts.

1 credit per callFresh within 5 minutesMCP tool: twitter_user_tweets
GEThttps://api.lurkapi.com/v1/twitter/user-tweets

Example responseView as markdown

When to use this

Use it to audit what an account posts and how each post does. Retweets are included (the original is in retweeted_tweet); replies aren't, except the account's own threads. On the first page the pinned tweet comes first, with pinned: true.

Ordering. Check ordering. For most accounts it's chronological: newest first, with more pages. For some very large accounts X shows logged-out visitors only a ranked sample instead: about 100 popular tweets from all years, in X's order, with no next page.

Pagination. Pass the response's cursor back as cursor (with the same handle) for older tweets; it's null at the end.

Unknown and suspended accounts return 404 not_found, and so do protected accounts, whose tweets need a login.

Parameters

All parameters go in the query string.

ParameterDescription
handle
stringrequired
X username, with or without @ (e.g. NASA), or the profile URL.
Example
NASA
cursor
stringoptional
The cursor from the previous response, to get older tweets.

Example request

Replace YOUR_API_KEY with your key, or set LURKAPI_KEY for the code. Get a free key.

Language

Example response

A real response from this endpoint, captured from the live API and trimmed to a couple of items. Strings over 96 characters (mostly signed media URLs) are cut short and end in ….

Show the example response (4 KB)
{
  "success": true,
  "credits_remaining": 999997,
  "credits_charged": 1,
  "tweets": [
    {
      "id": "2104593672624886205",
      "url": "https://x.com/NASA/status/2104593672624886205",
      "text": "How do we respond when we detect an asteroid that could pose a threat to…",
      "created_at": "2026-09-28T15:26:47.000Z",
      "lang": "en",
      "source": "Sprinklr",
      "author": {
        "id": "11348282",
        "handle": "NASA",
        "name": "NASA",
        "avatar": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg",
        "verified": true,
        "verified_type": "Government",
        "followers": 92377446
      },
      "counts": {
        "likes": 3228,
        "replies": 210,
        "retweets": 538,
        "quotes": 40,
        "bookmarks": 267,
        "views": 676901
      },
      "media": [
        {
          "type": "video",
          "url": "https://pbs.twimg.com/media/HTUEyn0XkAALVB_.png",
          "width": 405,
          "height": 720,
          "duration_ms": 38605,
          "variants": [
            {
              "url": "https://video.twimg.com/amplify_video/2104593621043314689/vid/avc1/608x1…",
              "content_type": "video/mp4",
              "bitrate": 2176000
            },
            {
              "url": "https://video.twimg.com/amplify_video/2104593621043314689/vid/avc1/480x8…",
              "content_type": "video/mp4",
              "bitrate": 950000
            },
            {
              "url": "https://video.twimg.com/amplify_video/2104593621043314689/vid/avc1/320x5…",
              "content_type": "video/mp4",
              "bitrate": 632000
            },
            {
              "url": "https://video.twimg.com/amplify_video/2104593621043314689/pl/iMMWqCJ1OZowER7i.m3u8?tag=16&v=2b3",
              "content_type": "application/x-mpegURL",
              "bitrate": null
            }
          ]
        }
      ],
      "hashtags": [],
      "mentions": [],
      "links": [
        "https://go.nasa.gov/4AUCQ3Z"
      ],
      "reply_to_id": null,
      "reply_to_handle": null,
      "conversation_id": "2104593672624886205",
      "quoted_id": null,
      "possibly_sensitive": false,
      "quoted_tweet": null,
      "retweeted_tweet": null,
      "pinned": true
    },
    {
      "id": "2105014687532212518",
      "url": "https://x.com/NASA/status/2105014687532212518",
      "text": "We're ready for Crew-13 to launch to the @Space_Station! Join us for a p…",
      "created_at": "2026-09-29T19:19:45.000Z",
      "lang": "en",
      "source": "Sprinklr",
      "author": {
        "id": "11348282",
        "handle": "NASA",
        "name": "NASA",
        "avatar": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg",
        "verified": true,
        "verified_type": "Government",
        "followers": 92377446
      },
      "counts": {
        "likes": 2279,
        "replies": 134,
        "retweets": 283,
        "quotes": 28,
        "bookmarks": 73,
        "views": 827274
      },
      "media": [
        {
          "type": "photo",
          "url": "https://pbs.twimg.com/media/HTaDs_pXwAAzhcG.jpg",
          "width": 1919,
          "height": 894,
          "duration_ms": null,
          "variants": []
        }
      ],
      "hashtags": [],
      "mentions": [
        "Space_Station"
      ],
      "links": [
        "https://go.nasa.gov/4hSzzKG"
      ],
      "reply_to_id": null,
      "reply_to_handle": null,
      "conversation_id": "2105014687532212518",
      "quoted_id": null,
      "possibly_sensitive": false,
      "quoted_tweet": null,
      "retweeted_tweet": null,
      "pinned": false
    }
  ],
  "cursor": "nasa:11348282:DAAHCgABHTeLQPC__-wLAAIAAAATMjEwMjUyMDE2MzIyNDc2MDU0MQgAAwAAAAIAAA",
  "ordering": "chronological"
}

Response fields

Every field of a successful response. [] marks a list: a[].b is the b of each item in a. nullable fields can be null; optional fields can be missing.

Show all 126 fields
FieldTypeDescription
successtrueAlways true here; errors have success: false.
credits_remainingnumberYour balance after this call. On anonymous playground calls: free tries left today.
credits_chargednumberCredits this call cost; 0 on free endpoints. On anonymous playground calls: tries used (1).
tweetsobject[]One page of tweets and retweets, in ordering order.
tweets[].idstringTweet id, e.g. 2104593672624886205.
tweets[].urlstringThe tweet on x.com.
tweets[].textstringThe text as x.com shows it: long posts in full, t.co links expanded, without a reply's leading @mentions or the trailing media link. Empty for media-only tweets.
tweets[].created_atstringWhen it was posted, ISO 8601.
tweets[].langstringnullableLanguage as X detects it, e.g. en (und when it can't tell); null if unknown.
tweets[].sourcestringnullableThe app it was posted from, e.g. Twitter for iPhone; null if X doesn't say.
tweets[].authorobjectWho posted it.
tweets[].author.idstringNumeric user id. It stays the same when the handle changes.
tweets[].author.handlestringUsername (handle), without @.
tweets[].author.namestringDisplay name.
tweets[].author.avatarstringnullableProfile picture URL, 400×400; null if none.
tweets[].author.verifiedbooleanHas the blue check (X Premium).
tweets[].author.verified_typestringnullableBusiness (gold check, a verified organization) or Government (grey check); null otherwise.
tweets[].author.followersnumbernullableFollowers when fetched; null when X's main source was busy and the tweet came from its embed data.
tweets[].countsobjectEngagement when fetched. Exact numbers, not rounded.
tweets[].counts.likesnumberLikes.
tweets[].counts.repliesnumberReplies.
tweets[].counts.retweetsnumbernullableReposts (retweets); null when X's main source was busy and the tweet came from its embed data.
tweets[].counts.quotesnumbernullableQuote posts; null when X's main source was busy and the tweet came from its embed data.
tweets[].counts.bookmarksnumbernullableBookmarks; null when X's main source was busy and the tweet came from its embed data.
tweets[].counts.viewsnumbernullableViews; null on tweets from before 2023 (X didn't count them then), and null when X's main source was busy and the tweet came from its embed data.
tweets[].mediaobject[]Attached photos, videos and GIFs, in order. Empty if none.
tweets[].media[].typestringphoto, video or gif (X plays GIFs as silent looping MP4s).
tweets[].media[].urlstringThe image; for videos and GIFs, the poster (thumbnail) image.
tweets[].media[].widthnumberOriginal width in pixels.
tweets[].media[].heightnumberOriginal height in pixels.
tweets[].media[].duration_msnumbernullableVideo length in milliseconds; null for photos and GIFs.
tweets[].media[].variantsobject[]Playable files for videos and GIFs: MP4s from highest to lowest bitrate, then the HLS playlist. Empty for photos.
tweets[].media[].variants[].urlstringFile URL on video.twimg.com.
tweets[].media[].variants[].content_typestringvideo/mp4, or application/x-mpegURL for the HLS playlist.
tweets[].media[].variants[].bitratenumbernullableBits per second; null for the HLS playlist.
tweets[].hashtagsstring[]Hashtags in the text, without #.
tweets[].mentionsstring[]Usernames @mentioned, including the ones a reply is addressed to.
tweets[].linksstring[]Links in the text, expanded (not t.co). The tweet's own photos and videos aren't included.
tweets[].reply_to_idstringnullableId of the tweet this replies to; null if it isn't a reply.
tweets[].reply_to_handlestringnullableUsername of the account this replies to; null if it isn't a reply.
tweets[].conversation_idstringnullableId of the thread's first tweet (its own id if it starts one); null if X doesn't say.
tweets[].quoted_idstringnullableId of the tweet this one quotes; null if it isn't a quote.
tweets[].possibly_sensitivebooleanX marks the media as possibly sensitive.
tweets[].quoted_tweetobjectnullableThe tweet this one quotes (without its own quoted or retweeted tweet); null if none or it's no longer available.
tweets[].quoted_tweet.idstringTweet id, e.g. 2104593672624886205.
tweets[].quoted_tweet.urlstringThe tweet on x.com.
tweets[].quoted_tweet.textstringThe text as x.com shows it: long posts in full, t.co links expanded, without a reply's leading @mentions or the trailing media link. Empty for media-only tweets.
tweets[].quoted_tweet.created_atstringWhen it was posted, ISO 8601.
tweets[].quoted_tweet.langstringnullableLanguage as X detects it, e.g. en (und when it can't tell); null if unknown.
tweets[].quoted_tweet.sourcestringnullableThe app it was posted from, e.g. Twitter for iPhone; null if X doesn't say.
tweets[].quoted_tweet.authorobjectWho posted it.
tweets[].quoted_tweet.author.idstringNumeric user id. It stays the same when the handle changes.
tweets[].quoted_tweet.author.handlestringUsername (handle), without @.
tweets[].quoted_tweet.author.namestringDisplay name.
tweets[].quoted_tweet.author.avatarstringnullableProfile picture URL, 400×400; null if none.
tweets[].quoted_tweet.author.verifiedbooleanHas the blue check (X Premium).
tweets[].quoted_tweet.author.verified_typestringnullableBusiness (gold check, a verified organization) or Government (grey check); null otherwise.
tweets[].quoted_tweet.author.followersnumbernullableFollowers when fetched; null when X's main source was busy and the tweet came from its embed data.
tweets[].quoted_tweet.countsobjectEngagement when fetched. Exact numbers, not rounded.
tweets[].quoted_tweet.counts.likesnumberLikes.
tweets[].quoted_tweet.counts.repliesnumberReplies.
tweets[].quoted_tweet.counts.retweetsnumbernullableReposts (retweets); null when X's main source was busy and the tweet came from its embed data.
tweets[].quoted_tweet.counts.quotesnumbernullableQuote posts; null when X's main source was busy and the tweet came from its embed data.
tweets[].quoted_tweet.counts.bookmarksnumbernullableBookmarks; null when X's main source was busy and the tweet came from its embed data.
tweets[].quoted_tweet.counts.viewsnumbernullableViews; null on tweets from before 2023 (X didn't count them then), and null when X's main source was busy and the tweet came from its embed data.
tweets[].quoted_tweet.mediaobject[]Attached photos, videos and GIFs, in order. Empty if none.
tweets[].quoted_tweet.media[].typestringphoto, video or gif (X plays GIFs as silent looping MP4s).
tweets[].quoted_tweet.media[].urlstringThe image; for videos and GIFs, the poster (thumbnail) image.
tweets[].quoted_tweet.media[].widthnumberOriginal width in pixels.
tweets[].quoted_tweet.media[].heightnumberOriginal height in pixels.
tweets[].quoted_tweet.media[].duration_msnumbernullableVideo length in milliseconds; null for photos and GIFs.
tweets[].quoted_tweet.media[].variantsobject[]Playable files for videos and GIFs: MP4s from highest to lowest bitrate, then the HLS playlist. Empty for photos.
tweets[].quoted_tweet.media[].variants[].urlstringFile URL on video.twimg.com.
tweets[].quoted_tweet.media[].variants[].content_typestringvideo/mp4, or application/x-mpegURL for the HLS playlist.
tweets[].quoted_tweet.media[].variants[].bitratenumbernullableBits per second; null for the HLS playlist.
tweets[].quoted_tweet.hashtagsstring[]Hashtags in the text, without #.
tweets[].quoted_tweet.mentionsstring[]Usernames @mentioned, including the ones a reply is addressed to.
tweets[].quoted_tweet.linksstring[]Links in the text, expanded (not t.co). The tweet's own photos and videos aren't included.
tweets[].quoted_tweet.reply_to_idstringnullableId of the tweet this replies to; null if it isn't a reply.
tweets[].quoted_tweet.reply_to_handlestringnullableUsername of the account this replies to; null if it isn't a reply.
tweets[].quoted_tweet.conversation_idstringnullableId of the thread's first tweet (its own id if it starts one); null if X doesn't say.
tweets[].quoted_tweet.quoted_idstringnullableId of the tweet this one quotes; null if it isn't a quote.
tweets[].quoted_tweet.possibly_sensitivebooleanX marks the media as possibly sensitive.
tweets[].retweeted_tweetobjectnullableFor retweets: the original tweet, with its own text and counts. null for everything else.
tweets[].retweeted_tweet.idstringTweet id, e.g. 2104593672624886205.
tweets[].retweeted_tweet.urlstringThe tweet on x.com.
tweets[].retweeted_tweet.textstringThe text as x.com shows it: long posts in full, t.co links expanded, without a reply's leading @mentions or the trailing media link. Empty for media-only tweets.
tweets[].retweeted_tweet.created_atstringWhen it was posted, ISO 8601.
tweets[].retweeted_tweet.langstringnullableLanguage as X detects it, e.g. en (und when it can't tell); null if unknown.
tweets[].retweeted_tweet.sourcestringnullableThe app it was posted from, e.g. Twitter for iPhone; null if X doesn't say.
tweets[].retweeted_tweet.authorobjectWho posted it.
tweets[].retweeted_tweet.author.idstringNumeric user id. It stays the same when the handle changes.
tweets[].retweeted_tweet.author.handlestringUsername (handle), without @.
tweets[].retweeted_tweet.author.namestringDisplay name.
tweets[].retweeted_tweet.author.avatarstringnullableProfile picture URL, 400×400; null if none.
tweets[].retweeted_tweet.author.verifiedbooleanHas the blue check (X Premium).
tweets[].retweeted_tweet.author.verified_typestringnullableBusiness (gold check, a verified organization) or Government (grey check); null otherwise.
tweets[].retweeted_tweet.author.followersnumbernullableFollowers when fetched; null when X's main source was busy and the tweet came from its embed data.
tweets[].retweeted_tweet.countsobjectEngagement when fetched. Exact numbers, not rounded.
tweets[].retweeted_tweet.counts.likesnumberLikes.
tweets[].retweeted_tweet.counts.repliesnumberReplies.
tweets[].retweeted_tweet.counts.retweetsnumbernullableReposts (retweets); null when X's main source was busy and the tweet came from its embed data.
tweets[].retweeted_tweet.counts.quotesnumbernullableQuote posts; null when X's main source was busy and the tweet came from its embed data.
tweets[].retweeted_tweet.counts.bookmarksnumbernullableBookmarks; null when X's main source was busy and the tweet came from its embed data.
tweets[].retweeted_tweet.counts.viewsnumbernullableViews; null on tweets from before 2023 (X didn't count them then), and null when X's main source was busy and the tweet came from its embed data.
tweets[].retweeted_tweet.mediaobject[]Attached photos, videos and GIFs, in order. Empty if none.
tweets[].retweeted_tweet.media[].typestringphoto, video or gif (X plays GIFs as silent looping MP4s).
tweets[].retweeted_tweet.media[].urlstringThe image; for videos and GIFs, the poster (thumbnail) image.
tweets[].retweeted_tweet.media[].widthnumberOriginal width in pixels.
tweets[].retweeted_tweet.media[].heightnumberOriginal height in pixels.
tweets[].retweeted_tweet.media[].duration_msnumbernullableVideo length in milliseconds; null for photos and GIFs.
tweets[].retweeted_tweet.media[].variantsobject[]Playable files for videos and GIFs: MP4s from highest to lowest bitrate, then the HLS playlist. Empty for photos.
tweets[].retweeted_tweet.media[].variants[].urlstringFile URL on video.twimg.com.
tweets[].retweeted_tweet.media[].variants[].content_typestringvideo/mp4, or application/x-mpegURL for the HLS playlist.
tweets[].retweeted_tweet.media[].variants[].bitratenumbernullableBits per second; null for the HLS playlist.
tweets[].retweeted_tweet.hashtagsstring[]Hashtags in the text, without #.
tweets[].retweeted_tweet.mentionsstring[]Usernames @mentioned, including the ones a reply is addressed to.
tweets[].retweeted_tweet.linksstring[]Links in the text, expanded (not t.co). The tweet's own photos and videos aren't included.
tweets[].retweeted_tweet.reply_to_idstringnullableId of the tweet this replies to; null if it isn't a reply.
tweets[].retweeted_tweet.reply_to_handlestringnullableUsername of the account this replies to; null if it isn't a reply.
tweets[].retweeted_tweet.conversation_idstringnullableId of the thread's first tweet (its own id if it starts one); null if X doesn't say.
tweets[].retweeted_tweet.quoted_idstringnullableId of the tweet this one quotes; null if it isn't a quote.
tweets[].retweeted_tweet.possibly_sensitivebooleanX marks the media as possibly sensitive.
tweets[].pinnedbooleanThe account's pinned tweet, shown first.
cursorstringnullablePass as cursor for the next page; null on the last page and for ranked results.
orderingstringchronological: newest first, with more pages. ranked: X shows logged-out visitors of this very large account only about 100 popular tweets from all years, with no next page.

Pagination

Pass the response's cursor back as cursor, with the other parameters unchanged, for the next page. It's null on the last page. Each page costs 1 credit.

The first five pages, in JavaScript
let cursor = null;
for (let page = 1; page <= 5; page++) {
  const params = new URLSearchParams({ handle: "NASA" });
  if (cursor) params.set("cursor", cursor);
  const res = await fetch(`https://api.lurkapi.com/v1/twitter/user-tweets?${params}`, {
    headers: { "x-api-key": process.env.LURKAPI_KEY },
  });
  const data = await res.json();
  if (!data.success) throw new Error(`${data.code}: ${data.error}`);
  console.log(data.tweets);
  cursor = data.cursor;
  if (!cursor) break; // last page
}

Caching and freshness

Responses are cached for up to 5 minutes, so a repeat call within that window can return the same data. It still costs 1 credit.

Errors

Errors return { success: false, error, code, docs } with the HTTP status below. Validation errors, 401/402/429 rejections and 5xx failures are free; not_found is charged (how charging works). All error codes.

StatusCodeMeaning
401missing_api_keyNo API key. Send it in the x-api-key header.
401invalid_api_keyThe key is unknown or was revoked.
402insufficient_creditsNot enough credits for this call. Buy a pack or wait for tomorrow's top-up.
404not_foundThe endpoint, or the thing you asked for (ad, post, subreddit), doesn't exist. Charged when the platform was checked.
405method_not_allowedEndpoints take GET with query params.
429rate_limitedToo many calls at once. Wait for the retry-after seconds, then retry.
500internal_errorSomething broke on our side. Retry; 5xx errors are free.
502upstream_errorThe platform didn't give a usable answer. Retry; 5xx errors are free.
503upstream_busyAll our connections to the platform are busy. Retry in a few seconds; 5xx errors are free.
504upstream_timeoutThe platform took over 30 seconds to answer. Retry; timeouts are free.

Use it in Claude

Once LurkAPI is connected to Claude, this endpoint is the twitter_user_tweets tool. Ask in plain English, for example:

Ask Claude
Use LurkAPI's twitter_user_tweets with handle "NASA" and summarize what you find.

Claude calls twitter_user_tweets with arguments like these, and each call costs 1 credit:

Tool arguments
{
  "handle": "NASA"
}

Tool results skip nulls and empty lists to save tokens.