Skip to content
NewIntroducing lobstr.io API v2: Web Data for AI Agents
X (Twitter) APITry it

X (Twitter) API

Search tweets as X’s search box does, get a tweet or a profile, list a tweet’s replies, an account’s tweets, followers and following, then your own timeline and bookmarks, all read with your connected X account. JSON with the same fields every time, from your code or your agent.

9 operations1 to 20 creditsa callWorks today

Try the X (Twitter) API

Pick an operation: its request in cURL, Python or Node, and its answer.

1Request
The search, as typed in X's search box, passed to X as it is.
The tab of X's results: top, X's own selection (it can show a few tweets of one conversation together), or latest, newest first.
20 credits a call
Code, from the fields above
curl https://api.lobstr.io/v2/run \
  -H "Authorization: Bearer $LOBSTR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "source": "x",
    "operation": "tweets/search",
    "options": {
      "query": "from:nasa since:2026-11-01",
      "tab": "latest"
    }
  }'
2Response

An example answer. Run it on your own input.

{
  "object": "run",
  "id": "run_yubtrl4sw24qv3e45qnqfhdnba",
  "livemode": true,
  "source": "x",
  "operation": "tweets/search",
  "version": "1.9.0",
  "schema_url": "https://api.lobstr.io/v2/catalog/x/tweets/search",
  "options": {
    "query": "from:nasa since:2026-11-01",
    "tab": "latest"
  },
  "fields": null,
  "status": "succeeded",
  "count": 1,
  "has_more": true,
  "next": {
    "source": "x",
    "operation": "tweets/search",
    "options": {
      "query": "from:nasa since:2026-11-01",
      "tab": "latest",
      "cursor": "gAAAAABpNWd0x2kQ8vZr3TfYc1LmRb7uHsE9wA4jXoKqDn6yPiGt5"
    }
  },
  "cost": {
    "credits": 20
  },
  "results": [
    {
      "object": "tweet",
      "id": "2122000000000000001",
      "position": 1,
      "is_promoted": false,
      "url": "https://x.com/NASA/status/2122000000000000001",
      "text": "Liftoff of the resupply mission to the International Space Station. https://t.co/abc123",
      "language": "en",
      "created_at": "2026-11-15T18:42:10Z",
      "reply_count": 312,
      "retweet_count": 1840,
      "quote_count": 96,
      "like_count": 12950,
      "bookmark_count": 410,
      "view_count": 1204500,
      "author": {
        "id": "11348282",
        "handle": "NASA",
        "name": "NASA",
        "url": "https://x.com/NASA",
        "description": "Exploring the secrets of the universe for the benefit of all.",
        "description_language": "en",
        "description_urls": [],
        "location": "Pale Blue Dot",
        "website_url": "https://www.nasa.gov/",
        "created_at": "2007-12-19T20:20:32Z",
        "follower_count": 86000000,
        "following_count": 170,
        "tweet_count": 73000,
        "media_count": 28000,
        "like_count": 16000,
        "is_blue_verified": true,
        "is_verified": false,
        "verified_type": "government",
        "is_protected": false,
        "is_possibly_sensitive": false,
        "professional": null,
        "avatar_url": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_normal.jpg",
        "banner_url": "https://pbs.twimg.com/profile_banners/11348282/1763000000",
        "avatar_shape": "square",
        "pinned_tweet_ids": [],
        "affiliation": null
      },
      "in_reply_to": null,
      "reply_policy": null,
      "is_quote": false,
      "quoted_tweet": null,
      "retweeted_tweet": null,
      "urls": [
        {
          "url": "https://www.nasa.gov/live",
          "display": "nasa.gov/live",
          "short_url": "https://t.co/abc123"
        }
      ],
      "hashtags": [],
      "symbols": [],
      "smart_tags": [],
      "mentions": [],
      "timestamps": [],
      "media": [],
      "card": null,
      "article": null,
      "place": null,
      "community_note": null,
      "community_id": null,
      "grok_conversation": null,
      "posted_with": null,
      "is_paid_promotion": null,
      "has_ai_generated_media": null,
      "is_possibly_sensitive": false,
      "is_long": false,
      "edit": {
        "tweet_ids": [
          "2122000000000000001"
        ],
        "editable_until": "2026-11-15T19:42:10Z",
        "edits_remaining": 5
      },
      "ids": {
        "tweet_id": "2122000000000000001",
        "conversation_id": "2122000000000000001",
        "author_id": "11348282",
        "quoted_tweet_id": null
      },
      "source_url": "https://x.com/search?q=from%3Anasa%20since%3A2026-11-01&src=typed_query&f=live",
      "observed_at": "2026-11-16T15:00:00Z"
    }
  ]
}

X (Twitter) API operations

9 operations, one key, the same envelope: results, count, cost and next for the following page.

Get a tweet

1 credita call

One tweet on X (Twitter), by its address or its id: its text, counts, media, author, the tweet it quotes or answers, read with your connected X account.

OptionTakesWhat it is
tweet*stringThe tweet: its address on x.com (https://x.com/nasa/status/2122404409292337592) or its id alone (2122404409292337592).
accountstringThe connected X account to read with (GET /v2/accounts).

List a tweet's replies

20 creditsa call40 tweets a page

The replies to a tweet on X (Twitter), in X's own order, about 35 a page, each with its text, counts, media and author, read with your connected X account.

OptionTakesWhat it is
tweet*stringThe tweet whose replies you want: its address on x.com (https://x.com/nasa/status/2122404409292337592) or its id alone (2122404409292337592).
accountstringThe connected X account to read with (GET /v2/accounts).

List a profile's tweets

20 creditsa call20 tweets a page

The tweets of a profile on X (Twitter), tab by tab (posts, replies, reposts, videos, photos), newest first, 20 or so a page, with their text, counts, media and author, read with your connected X account.

OptionTakesWhat it is
profile*stringThe profile: its handle, with or without the @ (nasa, @nasa), or its address on x.com (https://x.com/nasa).

Get a profile

1 credita call

A profile on X (Twitter) by its handle: its name, bio, links, follower and tweet counts, verification, affiliation and images, read with your connected X account.

OptionTakesWhat it is
profile*stringThe profile: its handle, with or without the @ (nasa, @nasa), or its address on x.com (https://x.com/nasa).
accountstringThe connected X account to read with (GET /v2/accounts).

List a profile's followers

20 creditsa call70 profiles a page

The accounts that follow a profile on X (Twitter), the most recent first, each with its name, bio, counts and verification, read with your connected X account.

OptionTakesWhat it is
profile*stringThe profile whose followers you want: its handle, with or without the @ (nasa, @nasa), or its address on x.com (https://x.com/nasa).

List a profile's following

20 creditsa call70 profiles a page

The accounts a profile follows on X (Twitter), the most recently followed first, each with its name, bio, counts and verification, read with your connected X account.

OptionTakesWhat it is
profile*stringThe profile whose followed accounts you want: its handle, with or without the @ (nasa, @nasa), or its address on x.com (https://x.com/nasa).
accountstringThe connected X account to read with (GET /v2/accounts).

List your home timeline

20 creditsa call60 tweets a page

The home timeline of your connected X (Twitter) account, its Following tab (the tweets of the accounts it follows, newest first) or its For you tab (X's own selection for it), each tweet with its text, counts, media and author.

OptionTakesWhat it is
tabfollowing, for_youdefault followingThe tab of the home page: following, the tweets of the accounts the connected account follows, newest first; for_you, the tweets X selects for the account, in X's own order.
accountstringThe connected X account whose timeline is read (GET /v2/accounts).

List your bookmarks

20 creditsa call20 tweets a page

The tweets your connected X (Twitter) account bookmarked, the last bookmarked first, 20 a page, each with its text, counts, media and author.

OptionTakesWhat it is
accountstringThe connected X account whose bookmarks are read (GET /v2/accounts).

Use the X (Twitter) API in your agent

One key, then your agent or your code calls every operation of this page.

  1. 01

    Connect lobstr.io

    Add the lobstr.io MCP server to Claude, ChatGPT, Cursor or any MCP client, or take an API key for your code.

    Claude
    ChatGPT
    Cursor
  2. 02

    Ask, or call

    Tell your agent what you need from X (Twitter): it finds the operations that fit and runs them. From your code, it is one POST to /v2/run.

    Find this week’s most liked tweets about web scraping, then tell me what people answer to the top three and who wrote them.

    Search tweets
    List a tweet's replies
    Get a profile
  3. 03

    Pay per call

    1 to 20 credits a call that returns data, from your plan’s credits. The free plan gives 100 credits a month.

    20 tweets 20
    Empty pageFree
    Failed callFree

Why lobstr.io

What you get when your agent or your code calls X (Twitter) through lobstr.io.

01

One key, every source

No developer app, no OAuth, no X credits to buy in advance. One lobstr.io key reaches X and 20 other sources, from Google Maps to LinkedIn Sales Navigator, on the same credits.

02

Built for agents

Five MCP tools, nothing to learn: your agent finds the operation, reads what it takes and gives, runs it and follows next. Your code gets the same through the SDKs or plain HTTP.

lobstr.ioConnected
find_operations
get_operation
run_operation
get_balance
send_feedback
03

Measured in public

Every call of the last 90 days counts in the figures on this page, and a failed call is free. Each operation is also run every 3 hours by our own checks.

Last 30 days

lobstr.io or the X API v2

What X’s own API v2 gives, and what lobstr.io gives, for the same tweets.

X API v2lobstr.io
Price$0.005 a post read, $0.010 a profile or a follower, from credits bought in X’s Developer Console1 credit a tweet or a profile, 20 a page of tweets, replies or accounts: $0.50 to $2 per 1,000 credits
Posts a month3 million read at most on pay-per-use, more on an Enterprise planAs many as your credits hold, at the pace X gives each connected account
Reads withYour app: a Bearer token for public data, OAuth 2.0 to act for a userYour own X account, connected once with the lobstr.io Chrome extension
To startA developer account, an app and credits bought upfrontAn API key, with 100 free credits a month

From X’s developer documentation, 3 December 2026.

What it costs

Set what you need from each operation in a month: the credits add up, and the plan that holds them is the price.

Every plan
Search tweets1,0001,000 credits
Get a tweet100100 credits
List a tweet's replies1,000500 credits
List a profile's tweets00 credits
Get a profile100100 credits
List a profile's followers1,000300 credits
List a profile's following00 credits
List your home timeline00 credits
List your bookmarks00 credits

Each operation’s price a call: 20 or 40 or 60 tweets or 70 profiles.

A month

$20

2,000 credits a month: Starter holds 10,000.

Live

X (Twitter) API reliability

Every call counts; a day is green at 95% successful.

Successful calls
99.49%
Median call
2.4 s
90 days agoToday
95% or more (SLA)90 to 95%75 to 90%Under 75%

A call fails when the site does not answer or we cannot read its answer; a wrong input is not counted.

X (Twitter) API FAQ

What people ask before calling the X (Twitter) API.

Tweets, profiles and followers

Is there an official X API?

Yes: the X API, once the Twitter API, paid per use from credits bought in advance, up to 3 million posts read a month before an Enterprise plan. It reads with your developer app’s keys. lobstr.io reads X as your own account sees it: a search, a tweet and its replies, a profile, its followers, your timeline and bookmarks, with an API key.

Do I need an X account?

Yes. Every X operation reads with one of your X accounts, connected once with the lobstr.io Chrome extension. Pass its id as account, or leave it out and the first of your X accounts with a free slot reads. X counts each account’s requests, about 50 searches every 15 minutes. x/timeline/list and x/bookmarks/list read the connected account’s own timeline and bookmarks, no one else’s. lobstr.io never takes an account in silence.

Can I search tweets with X’s operators?

Yes. Give x/tweets/search the search as you would type it in X’s search box, operators included (from:nasa lang:en min_faves:100, since: and until: for dates), on its Top or Latest tab: 20 tweets a page, each with its text, counts, media and author. An empty page is not the end of a search: follow next until it is null.

Can I list an account’s followers?

Yes. x/followers/list gives 50 to 70 followers a page, the most recent first, each as x/profiles/get gives a profile, further than x.com’s own page scrolls. Its tabs also give the verified followers alone, or those your account follows. x/following/list gives the accounts it follows.

Using the API

Do I need an X developer account?

No. A lobstr.io API key is all it takes, with no X credits to buy, and the free plan gives 100 credits a month.

What does a call cost?

1 credit for a tweet or a profile (x/tweets/get, x/profiles/get), 20 for a page of tweets, replies or accounts, a short page included: 1,000 credits cost $0.50 to $2 depending on the plan. An empty page, a busy account and a failed call are free.

Can my AI agent use it?

Yes. Add the lobstr.io MCP server to Claude, ChatGPT, Cursor or any MCP client: the agent finds the operation, runs it and follows next by itself. Setup for each agent.

Is there an SDK?

Yes: lobstrio, on PyPI and npm, with a typed method for each operation (client.x.tweets.search in Python) and a loop over every page. The SDKs.

Can I combine X with other sources?

Yes, on the same key and the same credits. Pass a profile’s website_url to websites/contacts/get for the emails on its website, then read what YouTube and Google News say on the same subject. An agent chains them by itself.

How reliable is the X (Twitter) API on lobstr.io?

Every call of the last 90 days is drawn on this page, day by day, and a failed call is free. Each operation is also run every 3 hours by our own checks, so a change on X shows within 3 hours.

Ready to call it?

An API key in a minute, then the call above, from your code or your agent.