Last updated October 1, 2026
A Twitter scraper API lets you pull X data with an HTTP request: tweets, search results, profiles, followers, replies, lists, communities and media. You don't have to run a headless browser, accounts and proxies yourself. twitr.sh has 14 tools behind POST https://twitr.sh/api/tools/<tool>. Each returned item costs $0.0012, with a $0.0024 minimum per paid call. You pay in USDC per call with no API key, or from a card-funded balance. Below you'll find what you can extract, what it costs, and working code in curl, Python and Node.
| Data | Tool and input | Price |
|---|---|---|
| Tweets by ID, up to 100 per call | x_read · get-tweet, batch-tweets | $0.0024 single; $0.0012 each in a batch |
| Tweet search with X operators | x_search · q, queryType, fromUser, language, sinceDate, minFaves… | $0.0012 per tweet returned |
| Profiles by handle or ID, up to 100 | x_read · get-user, batch-users | $0.0024 single; $0.0012 each in a batch |
| People search | x_search · type search-users | $0.036 per results page |
| User tweets, replies, likes, media, mentions | x_timeline · user-tweets, user-replies… | $0.0012 per item |
| Followers, following, verified followers | x_timeline · followers, following… | $0.0012 per account |
| Replies, quotes, threads, likers, reposters | x_timeline · tweet-replies, tweet-quotes… | $0.0012 per item |
| List tweets, members, followers | x_lists | $0.0012 per item |
| Community info, members, moderators, posts, search | x_communities | $0.0024 info; $0.0012 per item |
| Images and videos, up to 50 tweets | x_read · download-media | $0.0012 per tweet, $0.0024 minimum |
| Long-form articles | x_read · article | $0.006 |
| Trends by region | x_read · trends | $0.0036 |
| Does A follow B? | x_read · check-follower | $0.006 |
| Bulk datasets: 23 extractors, up to 10,000 rows | x_extract | $0.0012 per row (articles $0.006) |
Full input schemas are in /openapi.json, and each tool has its own page under /tools.
Every tool takes a flat JSON body. Your first request, with no credentials, returns HTTP 402 Payment Required with the exact amount, a line-item breakdown and what an empty result would cost ($0). Your wallet signs a USDC payment and retries the same request, and you get the data. Fixed-price calls accept x402 on Base or Solana and MPP on Tempo. Per-result reads settle on Base and charge only for records returned. Volume tools require a resultsLimit, so you never pay for more than you asked for.
# 1) unpaid probe: returns the price
curl -i -X POST https://twitr.sh/api/tools/x_search \
-H 'Content-Type: application/json' \
-d '{"q":"from:nasa","queryType":"Latest","resultsLimit":20}'
# -> HTTP/2 402
# "amount": "0.024000", "billing": "per-returned-record"
# "breakdown": [{ "label": "20 results × $0.001200" }]
# 2) pay from a USDC wallet and retry, capped at 5 cents
npx agentcash fetch https://twitr.sh/api/tools/x_search -m POST \
-b '{"q":"from:nasa","queryType":"Latest","resultsLimit":20}' \
--max-amount 0.05New to the wallet? npx agentcash try https://twitr.sh lists every tool and walks you through the first call.
import requests
URL = "https://twitr.sh/api/tools/x_search"
body = {"q": "from:nasa", "queryType": "Latest", "resultsLimit": 20}
# 1) unpaid probe: the 402 body carries the exact price
quote = requests.post(URL, json=body)
print(quote.status_code, quote.json()["amount"]) # 402 0.024000
# 2) paid call from a card-funded balance
r = requests.post(URL, json=body, headers={"Authorization": "Bearer tw_live_..."})
for tweet in r.json()["items"]:
print(tweet["id"], tweet["text"])const url = "https://twitr.sh/api/tools/x_search";
const body = JSON.stringify({ q: "from:nasa", queryType: "Latest", resultsLimit: 20 });
const headers = { "Content-Type": "application/json" };
// 1) unpaid probe
const quote = await fetch(url, { method: "POST", headers, body });
console.log(quote.status, (await quote.json()).amount); // 402 "0.024000"
// 2) paid call from a card-funded balance
const res = await fetch(url, {
method: "POST",
headers: { ...headers, Authorization: `Bearer ${process.env.TWITR_API_KEY}` },
body,
});
const { items } = await res.json();To pay from a wallet inside your own code, wrap fetch or requests with an x402 client library, such as Coinbase's @x402/fetch or the x402 Python package. Per-result reads use the upto scheme on Base. API keys come from the dashboard after a Google sign-in, and the prices are the same either way.
Synchronous reads return up to 2,500 items per call. For bigger jobs, such as every follower of a large account or every reply to a viral post, use x_extract. It runs 23 extractors as async jobs of up to 10,000 rows. You pay up front for the resultsLimit you ask for and get a claim check straight away. Then you poll a free status URL until the dataset is ready to download:
# start the job (Idempotency-Key makes retries safe)
npx agentcash fetch https://twitr.sh/api/tools/x_extract -m POST \
-H 'Idempotency-Key: nasa-followers-001' \
-b '{"tool":"follower_explorer","targetUsername":"nasa","resultsLimit":10000}'
# -> {"snapshot_id":"sd_ex_...","status":"pending","status_url":"/api/snapshots/sd_ex_..."}
# poll for free with the same wallet until status is "ready"
npx agentcash fetch https://twitr.sh/api/snapshots/sd_ex_...The extractors cover followers, following, verified followers, posts, replies, reposts, quotes, threads, articles, likers, mentions, user likes and media. They also cover community members, moderators and posts, list members, posts and followers, Spaces, people search and tweet search. Ten thousand rows cost $12.
| DIY scraper | Apify Actors | Official X API | twitr.sh | |
|---|---|---|---|---|
| Setup | Browser automation, X accounts, residential proxies | Apify account, or an x402 prepaid token | Developer account and app | None with a wallet |
| Cost | Your servers, proxies and time | Set per Actor, e.g. $0.18–$0.40 per 1,000 tweets | $0.005 per post, $0.010 per user | $0.0012 per item |
| Upkeep | Yours whenever X changes | The Actor's developer | X | twitr.sh |
| Beyond reads | Whatever you build | Mostly reads | Writes and filtered stream | Writes and real-time monitors |
The cheapest Apify Actors cost less per tweet for big batch jobs. See the Apify comparison and the official API comparison for the full trade-offs.
There is no single answer. X's terms of service prohibit crawling or scraping without its prior written consent. Whether collecting public posts is lawful depends on your jurisdiction and purpose. Personal data in tweets is still personal data under privacy laws such as the GDPR. twitr.sh is not affiliated with X, and the only access X sanctions is its own API (see X API pricing and X API alternatives). Collect only what you need, and check X's terms and your local law first.
Yes. That is what it was built for. Point Claude Code, Cursor or any MCP client at https://twitr.sh/api/mcp (listing tools is free), or install the skills with npx skills add lnvestor/twitr-skills. Then ask in plain English: “export everyone who replied to this tweet” or “what has @nasa posted this week?” The docs cover setup. To try the data free first, run the shadowban checker or the X algorithm checker.
A Twitter scraper API returns X data, such as tweets, search results, profiles and followers, from an HTTP request, so you don't have to run a headless browser, accounts and proxies yourself. twitr.sh is one, with 14 tools at POST https://twitr.sh/api/tools/<tool>.
Send the request with no credentials. twitr.sh answers HTTP 402 with the exact price; an x402 or MPP wallet such as AgentCash pays it in USDC and retries, and the tweets come back. The wallet is the account.
$1.20 on twitr.sh: $0.0012 per tweet returned. A paid call costs at least $0.0024, and a search that returns nothing costs $0.
Yes. x_timeline with kind followers, following or verified-followers returns up to 2,500 accounts per call at $0.0012 each. For bigger lists, x_extract's follower_explorer runs as an async job of up to 10,000 rows.
Yes. x_timeline with kind tweet-replies returns the replies, and tweet-quotes, tweet-thread, tweet-favoriters and tweet-retweeters cover quotes, threads, likers and reposters. Each item costs $0.0012.
Yes. x_read with resource download-media takes one tweet ID or up to 50 and returns media file URLs on twitr.sh. The links last 7 days.
Yes. x_lists returns a list's tweets, members or followers, and x_communities returns a community's info, members, moderators or posts, or searches inside it. Items cost $0.0012 each, and community info costs $0.0024 per lookup.
Volume tools require a resultsLimit between 1 and 10,000. Synchronous reads return up to 2,500 items per call. x_extract runs async jobs of up to 10,000 rows and you fetch the dataset when it is ready.
No. Per-result reads charge only for records returned, so an empty result costs $0.
It depends on where you are and what you do with the data. X's terms of service prohibit crawling or scraping without its prior written consent, and personal data in tweets is still personal data under privacy laws. twitr.sh is not affiliated with X. Check X's terms and your local law for your use case.
Yes. Any HTTP client works. Pay per call from a wallet with an x402 client library or the AgentCash CLI, or sign in with Google, add a card balance and send an Authorization: Bearer API key from requests or fetch.
Yes. Point any MCP client at https://twitr.sh/api/mcp, or install the skills with npx skills add lnvestor/twitr-skills. Claude can then search, read timelines and export followers by itself, paying per call.