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 response

When to use this

Use it to audit what an account posts and how each post does. Retweets are included, showing the original's text, media and counts (the original and its author are 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.

Example request

Copy one and replace YOUR_API_KEY with your API key (get one free). The code versions read the key from the LURKAPI_API_KEY environment variable instead.

Language

Parameters

Add them to the URL after a ?, as in ?handle=NASA. Join several with &.

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 response

A real response, captured from the live API. Lists are trimmed to a couple of items, and long text such as media links is cut short with ….

Show the example response (8 KB)
{
  "success": true,
  "credits_remaining": 999965,
  "credits_charged": 1,
  "tweets": [
    {
      "id": "2106125857152462995",
      "url": "https://x.com/NASA/status/2106125857152462995",
      "text": "It was a big week in low Earth orbit at @NASA!\n\n🧑‍🚀 Crew-13 reaches th…",
      "created_at": "2026-10-02T20:55:08.000Z",
      "lang": "en",
      "source": "Twitter for iPhone",
      "author": {
        "id": "11348282",
        "handle": "NASA",
        "name": "NASA",
        "avatar": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg",
        "verified": true,
        "verified_type": "Government",
        "followers": 92378647
      },
      "counts": {
        "likes": 278,
        "replies": 17,
        "retweets": 46,
        "quotes": 4,
        "bookmarks": 13,
        "views": 87457
      },
      "media": [
        {
          "type": "video",
          "url": "https://pbs.twimg.com/media/HTp0_obWAAELZUv.jpg",
          "width": 1080,
          "height": 1920,
          "duration_ms": 136682,
          "variants": [
            {
              "url": "https://video.twimg.com/amplify_video/2106122687198220288/vid/avc1/1080x…",
              "content_type": "video/mp4",
              "bitrate": 10368000
            },
            {
              "url": "https://video.twimg.com/amplify_video/2106122687198220288/vid/avc1/720x1…",
              "content_type": "video/mp4",
              "bitrate": 2176000
            },
            {
              "url": "https://video.twimg.com/amplify_video/2106122687198220288/vid/avc1/480x8…",
              "content_type": "video/mp4",
              "bitrate": 950000
            },
            {
              "url": "https://video.twimg.com/amplify_video/2106122687198220288/vid/avc1/320x5…",
              "content_type": "video/mp4",
              "bitrate": 632000
            },
            {
              "url": "https://video.twimg.com/amplify_video/2106122687198220288/pl/Jrcsbj6pLLv7qdu-.m3u8?tag=29&v=950",
              "content_type": "application/x-mpegURL",
              "bitrate": null
            }
          ]
        }
      ],
      "hashtags": [],
      "mentions": [
        "NASA"
      ],
      "links": [],
      "poll": null,
      "article": null,
      "reply_to_id": null,
      "reply_to_handle": null,
      "conversation_id": "2106125857152462995",
      "quoted_id": null,
      "possibly_sensitive": false,
      "quoted_tweet": null,
      "retweeted_tweet": {
        "id": "2106124556205252700",
        "url": "https://x.com/NASASpox/status/2106124556205252700",
        "text": "It was a big week in low Earth orbit at @NASA!\n\n🧑‍🚀 Crew-13 reaches th…",
        "created_at": "2026-10-02T20:49:58.000Z",
        "lang": "en",
        "source": null,
        "author": {
          "id": "1907894348319973378",
          "handle": "NASASpox",
          "name": "NASA Spox",
          "avatar": "https://pbs.twimg.com/profile_images/2094450130237755392/4TkxuQxN_400x400.jpg",
          "verified": true,
          "verified_type": "Government",
          "followers": 20463
        },
        "counts": {
          "likes": 278,
          "replies": 17,
          "retweets": 46,
          "quotes": 4,
          "bookmarks": 13,
          "views": 87457
        },
        "media": [
          {
            "type": "video",
            "url": "https://pbs.twimg.com/media/HTp0_obWAAELZUv.jpg",
            "width": 1080,
            "height": 1920,
            "duration_ms": 136682,
            "variants": [
              {
                "url": "https://video.twimg.com/amplify_video/2106122687198220288/vid/avc1/1080x…",
                "content_type": "video/mp4",
                "bitrate": 10368000
              },
              {
                "url": "https://video.twimg.com/amplify_video/2106122687198220288/vid/avc1/720x1…",
                "content_type": "video/mp4",
                "bitrate": 2176000
              },
              {
                "url": "https://video.twimg.com/amplify_video/2106122687198220288/vid/avc1/480x8…",
                "content_type": "video/mp4",
                "bitrate": 950000
              },
              {
                "url": "https://video.twimg.com/amplify_video/2106122687198220288/vid/avc1/320x5…",
                "content_type": "video/mp4",
                "bitrate": 632000
              },
              {
                "url": "https://video.twimg.com/amplify_video/2106122687198220288/pl/Jrcsbj6pLLv7qdu-.m3u8?tag=29&v=950",
                "content_type": "application/x-mpegURL",
                "bitrate": null
              }
            ]
          }
        ],
        "hashtags": [],
        "mentions": [
          "NASA"
        ],
        "links": [],
        "poll": null,
        "article": null,
        "reply_to_id": null,
        "reply_to_handle": null,
        "conversation_id": "2106124556205252700",
        "quoted_id": null,
        "possibly_sensitive": false
      },
      "pinned": false
    },
    {
      "id": "2106061652617568263",
      "url": "https://x.com/NASA/status/2106061652617568263",
      "text": "Applications are now open for our newest class of flight directors!\n\nApp…",
      "created_at": "2026-10-02T16:40:01.000Z",
      "lang": "en",
      "source": null,
      "author": {
        "id": "11348282",
        "handle": "NASA",
        "name": "NASA",
        "avatar": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg",
        "verified": true,
        "verified_type": "Government",
        "followers": 92378647
      },
      "counts": {
        "likes": 786,
        "replies": 77,
        "retweets": 132,
        "quotes": 11,
        "bookmarks": 70,
        "views": 463732
      },
      "media": [
        {
          "type": "video",
          "url": "https://pbs.twimg.com/media/HTo76LPWkAAZEM5.jpg",
          "width": 1920,
          "height": 1080,
          "duration_ms": 40240,
          "variants": [
            {
              "url": "https://video.twimg.com/amplify_video/2106061578822983681/vid/avc1/1920x…",
              "content_type": "video/mp4",
              "bitrate": 10368000
            },
            {
              "url": "https://video.twimg.com/amplify_video/2106061578822983681/vid/avc1/1280x…",
              "content_type": "video/mp4",
              "bitrate": 2176000
            },
            {
              "url": "https://video.twimg.com/amplify_video/2106061578822983681/vid/avc1/640x3…",
              "content_type": "video/mp4",
              "bitrate": 832000
            },
            {
              "url": "https://video.twimg.com/amplify_video/2106061578822983681/vid/avc1/480x2…",
              "content_type": "video/mp4",
              "bitrate": 288000
            },
            {
              "url": "https://video.twimg.com/amplify_video/2106061578822983681/pl/x85ize3ZXSxrUXuK.m3u8?tag=16&v=6bd",
              "content_type": "application/x-mpegURL",
              "bitrate": null
            }
          ]
        }
      ],
      "hashtags": [],
      "mentions": [
        "Space_Station"
      ],
      "links": [
        "https://go.nasa.gov/4zauIdJ"
      ],
      "poll": null,
      "article": null,
      "reply_to_id": null,
      "reply_to_handle": null,
      "conversation_id": "2106061652617568263",
      "quoted_id": null,
      "possibly_sensitive": false,
      "quoted_tweet": null,
      "retweeted_tweet": null,
      "pinned": false
    }
  ],
  "cursor": "nasa:11348282:DAAHCgABHTqrGaU___ALAAIAAAATMjEwNTY1NTAyOTQzNjkyMDEyNAgAAwAAAAIAAA",
  "ordering": "chronological"
}

Response fields

Every field in a successful response, and what it means. A name with [] belongs to each item of a list: tweets[].id is the id of every item in tweets. null means there's no value.

Show all 159 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. A retweet shows the original's text. Empty for media-only tweets.
tweets[].created_atstringWhen it was posted, ISO 8601.
tweets[].langstringcan be nullLanguage as X detects it, e.g. en (und when it can't tell); null if unknown.
tweets[].sourcestringcan be nullThe 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.avatarstringcan be nullProfile picture URL, 400×400; null if none.
tweets[].author.verifiedbooleanHas the blue check (X Premium).
tweets[].author.verified_typestringcan be nullBusiness (gold check, a verified organization) or Government (grey check); null otherwise.
tweets[].author.followersnumbercan be nullFollowers when fetched; null when X's main source was busy and we used its embed data instead.
tweets[].countsobjectEngagement when fetched. Exact numbers, not rounded. A retweet shows the original's, as x.com does.
tweets[].counts.likesnumberLikes.
tweets[].counts.repliesnumberReplies.
tweets[].counts.retweetsnumbercan be nullReposts (retweets); null when X's main source was busy and we used its embed data instead.
tweets[].counts.quotesnumbercan be nullQuote posts; null when X's main source was busy and we used its embed data instead.
tweets[].counts.bookmarksnumbercan be nullBookmarks; null when X's main source was busy and we used its embed data instead.
tweets[].counts.viewsnumbercan be nullViews; null on tweets from before 2023 (X didn't count them then), and null when X's main source was busy and we used its embed data instead.
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_msnumbercan be nullVideo 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[].bitratenumbercan be nullBits 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[].pollobjectcan be nullThe tweet's poll; null if it has none.
tweets[].poll.optionsobject[]The choices, in order.
tweets[].poll.options[].labelstringThe choice's text.
tweets[].poll.options[].votesnumbercan be nullVotes for it, exact; null if X doesn't show them.
tweets[].poll.ends_atstringcan be nullWhen voting ends (or ended), ISO 8601; null if X doesn't say.
tweets[].poll.closedbooleanVoting has ended, so the counts are final.
tweets[].articleobjectcan be nullAn X Article (long-form post): title, preview, body and cover. Its tweet's text is just the article's link. null for other tweets.
tweets[].article.titlestringThe article's title.
tweets[].article.preview_textstringcan be nullThe opening lines X shows on the article's card; null if none.
tweets[].article.textstringcan be nullThe full body as plain text, blocks separated by blank lines. null in user-tweets, where X sends only the preview.
tweets[].article.coverstringcan be nullCover image URL; null if none.
tweets[].reply_to_idstringcan be nullId of the tweet this replies to; null if it isn't a reply.
tweets[].reply_to_handlestringcan be nullUsername of the account this replies to; null if it isn't a reply.
tweets[].conversation_idstringcan be nullId of the thread's first tweet (its own id if it starts one); null if X doesn't say.
tweets[].quoted_idstringcan be nullId of the tweet this one quotes; null if it isn't a quote.
tweets[].possibly_sensitivebooleanX marks the media as possibly sensitive.
tweets[].quoted_tweetobjectcan be nullThe 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. A retweet shows the original's text. Empty for media-only tweets.
tweets[].quoted_tweet.created_atstringWhen it was posted, ISO 8601.
tweets[].quoted_tweet.langstringcan be nullLanguage as X detects it, e.g. en (und when it can't tell); null if unknown.
tweets[].quoted_tweet.sourcestringcan be nullThe 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.avatarstringcan be nullProfile picture URL, 400×400; null if none.
tweets[].quoted_tweet.author.verifiedbooleanHas the blue check (X Premium).
tweets[].quoted_tweet.author.verified_typestringcan be nullBusiness (gold check, a verified organization) or Government (grey check); null otherwise.
tweets[].quoted_tweet.author.followersnumbercan be nullFollowers when fetched; null when X's main source was busy and we used its embed data instead.
tweets[].quoted_tweet.countsobjectEngagement when fetched. Exact numbers, not rounded. A retweet shows the original's, as x.com does.
tweets[].quoted_tweet.counts.likesnumberLikes.
tweets[].quoted_tweet.counts.repliesnumberReplies.
tweets[].quoted_tweet.counts.retweetsnumbercan be nullReposts (retweets); null when X's main source was busy and we used its embed data instead.
tweets[].quoted_tweet.counts.quotesnumbercan be nullQuote posts; null when X's main source was busy and we used its embed data instead.
tweets[].quoted_tweet.counts.bookmarksnumbercan be nullBookmarks; null when X's main source was busy and we used its embed data instead.
tweets[].quoted_tweet.counts.viewsnumbercan be nullViews; null on tweets from before 2023 (X didn't count them then), and null when X's main source was busy and we used its embed data instead.
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_msnumbercan be nullVideo 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[].bitratenumbercan be nullBits 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.pollobjectcan be nullThe tweet's poll; null if it has none.
tweets[].quoted_tweet.poll.optionsobject[]The choices, in order.
tweets[].quoted_tweet.poll.options[].labelstringThe choice's text.
tweets[].quoted_tweet.poll.options[].votesnumbercan be nullVotes for it, exact; null if X doesn't show them.
tweets[].quoted_tweet.poll.ends_atstringcan be nullWhen voting ends (or ended), ISO 8601; null if X doesn't say.
tweets[].quoted_tweet.poll.closedbooleanVoting has ended, so the counts are final.
tweets[].quoted_tweet.articleobjectcan be nullAn X Article (long-form post): title, preview, body and cover. Its tweet's text is just the article's link. null for other tweets.
tweets[].quoted_tweet.article.titlestringThe article's title.
tweets[].quoted_tweet.article.preview_textstringcan be nullThe opening lines X shows on the article's card; null if none.
tweets[].quoted_tweet.article.textstringcan be nullThe full body as plain text, blocks separated by blank lines. null in user-tweets, where X sends only the preview.
tweets[].quoted_tweet.article.coverstringcan be nullCover image URL; null if none.
tweets[].quoted_tweet.reply_to_idstringcan be nullId of the tweet this replies to; null if it isn't a reply.
tweets[].quoted_tweet.reply_to_handlestringcan be nullUsername of the account this replies to; null if it isn't a reply.
tweets[].quoted_tweet.conversation_idstringcan be nullId of the thread's first tweet (its own id if it starts one); null if X doesn't say.
tweets[].quoted_tweet.quoted_idstringcan be nullId 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_tweetobjectcan be nullFor retweets: the original tweet and its author. The retweet's own text, media, links and counts mirror it (as on x.com); its id, author and created_at are the retweet's. 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. A retweet shows the original's text. Empty for media-only tweets.
tweets[].retweeted_tweet.created_atstringWhen it was posted, ISO 8601.
tweets[].retweeted_tweet.langstringcan be nullLanguage as X detects it, e.g. en (und when it can't tell); null if unknown.
tweets[].retweeted_tweet.sourcestringcan be nullThe 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.avatarstringcan be nullProfile picture URL, 400×400; null if none.
tweets[].retweeted_tweet.author.verifiedbooleanHas the blue check (X Premium).
tweets[].retweeted_tweet.author.verified_typestringcan be nullBusiness (gold check, a verified organization) or Government (grey check); null otherwise.
tweets[].retweeted_tweet.author.followersnumbercan be nullFollowers when fetched; null when X's main source was busy and we used its embed data instead.
tweets[].retweeted_tweet.countsobjectEngagement when fetched. Exact numbers, not rounded. A retweet shows the original's, as x.com does.
tweets[].retweeted_tweet.counts.likesnumberLikes.
tweets[].retweeted_tweet.counts.repliesnumberReplies.
tweets[].retweeted_tweet.counts.retweetsnumbercan be nullReposts (retweets); null when X's main source was busy and we used its embed data instead.
tweets[].retweeted_tweet.counts.quotesnumbercan be nullQuote posts; null when X's main source was busy and we used its embed data instead.
tweets[].retweeted_tweet.counts.bookmarksnumbercan be nullBookmarks; null when X's main source was busy and we used its embed data instead.
tweets[].retweeted_tweet.counts.viewsnumbercan be nullViews; null on tweets from before 2023 (X didn't count them then), and null when X's main source was busy and we used its embed data instead.
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_msnumbercan be nullVideo 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[].bitratenumbercan be nullBits 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.pollobjectcan be nullThe tweet's poll; null if it has none.
tweets[].retweeted_tweet.poll.optionsobject[]The choices, in order.
tweets[].retweeted_tweet.poll.options[].labelstringThe choice's text.
tweets[].retweeted_tweet.poll.options[].votesnumbercan be nullVotes for it, exact; null if X doesn't show them.
tweets[].retweeted_tweet.poll.ends_atstringcan be nullWhen voting ends (or ended), ISO 8601; null if X doesn't say.
tweets[].retweeted_tweet.poll.closedbooleanVoting has ended, so the counts are final.
tweets[].retweeted_tweet.articleobjectcan be nullAn X Article (long-form post): title, preview, body and cover. Its tweet's text is just the article's link. null for other tweets.
tweets[].retweeted_tweet.article.titlestringThe article's title.
tweets[].retweeted_tweet.article.preview_textstringcan be nullThe opening lines X shows on the article's card; null if none.
tweets[].retweeted_tweet.article.textstringcan be nullThe full body as plain text, blocks separated by blank lines. null in user-tweets, where X sends only the preview.
tweets[].retweeted_tweet.article.coverstringcan be nullCover image URL; null if none.
tweets[].retweeted_tweet.reply_to_idstringcan be nullId of the tweet this replies to; null if it isn't a reply.
tweets[].retweeted_tweet.reply_to_handlestringcan be nullUsername of the account this replies to; null if it isn't a reply.
tweets[].retweeted_tweet.conversation_idstringcan be nullId of the thread's first tweet (its own id if it starts one); null if X doesn't say.
tweets[].retweeted_tweet.quoted_idstringcan be nullId 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.
cursorstringcan be nullPass 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

Results come in pages. For the next page, repeat the call with the same parameters and add the response's cursor as cursor. On the last page, cursor is null. 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_API_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}

Cost and freshness

Each call costs 1 credit. Calls turned away before they reach the platform (invalid parameters, a key or balance problem, a rate limit) are free, and so are 5xx errors. A not_found is charged, since the platform was checked. How charging works.

Answers are cached for up to 5 minutes. A repeat call within that time can return the same data, and costs the same.

Errors

A failed call returns success: false, an error message, a code your program can check, and a docs link. These are the errors this endpoint can return. All error codes.

StatusCodeMeaning
401missing_api_keyNo API key was sent. Put it in the x-api-key header.
401invalid_api_keyThis key doesn't exist or was revoked.
402insufficient_creditsNot enough credits for this call. Buy a pack, or wait for tomorrow's free top-up.
402over_max_creditsThis call would cost more than the max_credits you set. The error says what it needs; raise max_credits to allow it. Not charged.
403account_suspendedThis account is suspended. Email support@lurkapi.com. Not charged.
404not_foundWhat you asked for (a post, an ad, a subreddit) doesn't exist, or there's no endpoint at that path. Charged if the platform was checked.
405method_not_allowedEndpoints only take GET, with parameters in the URL.
429rate_limitedToo many calls in a short time. Wait as many seconds as the retry-after header says, then retry.
500internal_errorSomething broke on our side. Retry. Not charged.
502upstream_errorThe platform didn't send a usable answer. Retry. Not charged.
503upstream_busyAll our connections to the platform are busy. Retry in a few seconds. Not charged.
504upstream_timeoutThe platform took over 30 seconds to answer (90 for web pages). Retry. Not charged.

Use it in Claude

Connect LurkAPI to Claude and ask in plain English. This endpoint is the twitter_user_tweets tool. For example:

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

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

Tool arguments
{"handle": "NASA"}

To save tokens, tool results leave out empty fields, keep one URL per image or video, and give transcripts as plain text unless you pass timestamps=true. A result over 45,000 characters comes in parts. Its _note gives the offset for the next part, and later parts are free for 15 minutes. Pass trim=false for the full response.

From the blog

All posts