How do I get tweets programmatically in 2026?
Last updated July 12, 2026
The reliable way to get tweets programmatically in 2026 is a hosted pay-per-call API rather than scraping X directly, which breaks on every layout change. TwitterAPIs returns tweets as clean JSON from a single bearer-token call at $0.0008 per call, about 20 tweets each, which works out to $0.04 per 1,000 tweets. Search, timelines, threads, and follower lists are one endpoint each, with no X developer account.
Every rate here is the pricing TwitterAPIs publishes, $0.0008 per call and $0.04 per 1,000 tweets (source: twitterapis.com/pricing).
What is the fastest way to pull tweets in code?
The fastest path is a hosted REST endpoint you call with a bearer token, no OAuth dance and no scraper to maintain. On TwitterAPIs you sign up, copy your key, and send a GET request to the search or timeline endpoint; the response is structured JSON with the tweet text, author, timestamps, and engagement counts already parsed. Each standard call costs $0.0008 and returns about 20 tweets, so a script pulling a few thousand tweets runs for a few cents. Your first successful call happens in under 2 minutes from signup.
Which endpoints return tweets, and what do they cost?
Tweets come from several endpoints depending on what you need: advanced search for a query, user tweets for one account's timeline, tweet detail for a single post, and tweet replies or thread for a conversation. All of these bill at the standard $0.0008 per call except full thread expansion at $0.004 and full account history at $0.0024. There are 33 read endpoints in total across tweets, users, the follower graph, and lists, so most tweet-gathering jobs are one or two endpoints wired together.
How does this compare to scraping X yourself?
Scraping libraries like snscrape or twikit are free but read the public web HTML, so they break whenever X changes its markup or tightens rate limits, and they return inconsistent shapes you have to normalize by hand. A hosted API at $0.04 per 1,000 tweets removes that maintenance burden and returns the same JSON shape every time. For a one-off experiment scraping can be fine; for anything that has to keep running, the per-tweet cost buys reliability and a stable contract.
How do I authenticate and make the first call?
Authentication is a single bearer token passed in the Authorization header; there is no X developer account, no app registration, and no approval queue. You add the header, hit the endpoint, and read the JSON. A $0.50 signup credit lands on every new account with no card required, which covers roughly 625 calls or about 12,500 tweets, enough to build and test a real pipeline before you add a payment method.
What does it cost to backfill a large tweet archive?
Because the rate is flat at $0.0008 per call regardless of volume, a large backfill scales linearly and predictably. Pulling 1 million tweets costs about $40 at $0.04 per 1,000; 10 million costs about $400. There is no monthly minimum and no tier ceiling that throttles a long-running job, so a research archive costs the same per tweet as a small sample. Full account history is available on a dedicated $0.0024 endpoint when you need every post from one user in a single paginated call.
Ways to get tweets programmatically, compared
| Method | Cost per 1,000 tweets | Ongoing maintenance | Developer account | Reliability |
|---|---|---|---|---|
| TwitterAPIs (hosted API) | $0.04 | None | No | High, stable JSON |
| Official X API | $5 to $10 | Low | Yes, application and review | High |
| Scraping (snscrape, twikit) | $0 | High, breaks on layout change | No | Low |
| twitterapi.io | $0.15 | None | No | High |
Starting February 9, we will no longer support free access to the Twitter API, both v2 and v1.1. A paid basic tier will be available instead.
Questions and answers
- What is the cheapest way to get tweets in code?
- A pay-per-call hosted API. TwitterAPIs bills $0.0008 per call at about 20 tweets each, which is $0.04 per 1,000 tweets, lower per tweet than twitterapi.io at $0.15 and far below the official X API at $5 to $10 per 1,000. There is no monthly minimum.
- Do I need the official X developer account to fetch tweets?
- No. TwitterAPIs uses a single bearer token issued at signup, with no X developer account, no app registration, and no approval wait. You pass the token in the Authorization header and read structured JSON back.
- What format do the tweets come back in?
- Clean JSON. Each response carries the tweet text, author profile, created-at timestamp, and engagement counts already parsed, so you do not scrape or normalize HTML. The same shape is returned on every call, which keeps parsing code stable.
- How many tweets can I pull with the free credit?
- The $0.50 signup credit covers roughly 625 calls, and each standard call returns about 20 tweets, so around 12,500 tweets before you pay. No credit card is required to claim it, which is enough to build and test a real pipeline.
- Is scraping X a good long-term option?
- Rarely. Scrapers read public HTML and break whenever X changes its layout or rate limits, and they return inconsistent shapes. For anything that must keep running, a hosted API at $0.04 per 1,000 tweets trades a small per-tweet cost for a stable, maintained contract.
Keep reading
Start with $0.50 in free credits
No credit card. Roughly 12,500 tweets to test every endpoint.