Twitter scraper
Twitter Scraper API: Scrape Tweets, Profiles and Followers
Prices checked:
Quick Answer
The simplest way to scrape X (Twitter) in 2026 is a scraping API: you send an HTTP request and get JSON back, with no headless browser, proxies or X accounts to run. TwexAPI costs about $0.05 per 1,000 tweets or profiles, from keyword search or account timelines, compared with $0.14–$0.40 per 1,000 tweets for popular Apify Actors and $5.00 on the official X API.
Twitter scrapers by data type
| Scraper | What it returns | TwexAPI endpoint |
|---|---|---|
| Twitter search and posts scraper | Tweets matching keywords, accounts, operators and date ranges | POST /twitter/advanced_search/page |
| Twitter hashtag scraper | Tweets for one or more hashtags in a time window | POST /twitter/hashtags |
| Twitter profile scraper | Bio, follower and following counts, location, verification, join date | POST /twitter/users |
| Twitter followers scraper | Followers or following of any public account, page by page | POST /twitter/followers/page, POST /twitter/following/page |
| Twitter timeline scraper | A user’s tweets, or tweets and replies | POST /twitter/{screen_name}/timeline/page |
| Twitter replies scraper | Replies to a tweet | POST /twitter/tweets/{tweet_id}/replies/page |
| Twitter media and image scraper | Image, video and GIF URLs on each tweet | The media field of any tweet endpoint, or POST /twitter/tweets/lookup |
| Twitter list scraper | List members and list tweets | POST /twitter/list/members/page, POST /twitter/list/tweets/page |
| Twitter trends scraper | Trending topics by country | GET /twitter/{country}/trending |
Most read endpoints, keyword search and hashtag results included, use about 5 Credits per result, or $0.05 per 1,000 results at 100,000 Credits per $1. Exact rates for each endpoint are on the pricing page.
Twitter profile scraper
POST /twitter/users takes a list of usernames and returns one profile for each: name, bio, location, follower and following counts, post count, join date and verification. Each profile uses 5 Credits.
curl -X POST https://api.twexapi.io/twitter/users \
-H "Authorization: Bearer $TWEXAPI_KEY" \
-H "Content-Type: application/json" \
-d '["nasa", "github"]'Twitter hashtag scraper
POST /twitter/hashtags returns 20 tweets a page for one or more hashtags, sorted by Latest or Top. You can set a minimum number of likes (the field is spelled mininumLikes) and page with next_cursor. For a date range, pass startTime and endTime as Unix seconds in strings. In our test on December 1, 2026 a 24-hour window worked and a 1-hour window came back empty, so use windows of a day or more.
curl -X POST https://api.twexapi.io/twitter/hashtags \
-H "Authorization: Bearer $TWEXAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"hashtags": ["ai", "openai"], "sortBy": "Latest", "mininumLikes": 50}'Twitter search scraper
POST /twitter/advanced_search/page runs any X search query and returns 20 tweets a page, each with its text, author, time, media and engagement counts. The query takes X’s search operators, such as from:, min_faves: and lang:. The Python example further down pages through a search and saves it to CSV.
curl -X POST https://api.twexapi.io/twitter/advanced_search/page \
-H "Authorization: Bearer $TWEXAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"searchTerms": ["from:nasa"], "sortBy": "Latest", "next_cursor": ""}'Twitter followers scraper
POST /twitter/followers/page returns the followers of a public account as full profiles, 70 on the first page in our test, with a next_cursor for the next page. POST /twitter/following/page does the same for the accounts it follows. To download a list without code, use the free follower exporter.
curl -X POST https://api.twexapi.io/twitter/followers/page \
-H "Authorization: Bearer $TWEXAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"screen_name": "nasa"}'Twitter list scraper
POST /twitter/list/members/page returns the accounts on a public list, and POST /twitter/list/tweets/page returns the list’s latest tweets, 80 to 98 a page in our test. The list_id is the number at the end of the list’s URL: x.com/i/lists/LIST_ID.
curl -X POST https://api.twexapi.io/twitter/list/members/page \
-H "Authorization: Bearer $TWEXAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"list_id": "LIST_ID"}'Twitter scraping options compared
| Option | Cost per 1,000 tweets | What you manage |
|---|---|---|
| Open-source scrapers (twscrape, Playwright or Puppeteer scripts) | Software is free | Logged-in X accounts, proxies, and fixes whenever X changes its site |
| Apify Tweet Scraper V2 (apidojo) | $0.40, at least 50 tweets per query | An Apify account; each scrape runs as an Actor job |
| Apify Tweet Scraper (kaitoeasyapi) | $0.14 ($0.10 on Apify’s $999-a-month Business plan) | An Apify account; each scrape runs as an Actor job |
| Official X API (pay-per-use) | $5.00, capped at 3M post reads a month | A developer account and prepaid X credits |
| TwexAPI | ~$0.05, by keyword search or from account timelines | An API key |
Scrape Twitter without the official API or a developer account
You do not need the official X API, or an X developer account, to collect public tweets. The official route is the only one that asks for one: on pay-per-use you buy credits upfront in X’s Developer Console and pay $5.00 per 1,000 posts read. The other three routes are:
- A scraping API such as TwexAPI. Sign up with an email or Google account, copy the API key and send HTTP requests. There is no X account to log in, no developer application and no proxy to run.
- An Apify Actor. It runs in Apify’s cloud under an Apify account, and you pay per result.
- An open-source scraper such as twscrape. The software is free, but it logs in with X accounts that you supply, so you manage the accounts, the proxies and the fixes.
How to scrape Twitter with TwexAPI
Any HTTP client works: Python requests, Node fetch, curl, n8n, Make or Zapier. The same key also works in the hosted MCP server, so AI agents in Claude or Cursor can run the same scrapes.
- Create a TwexAPI account to get 20,000 free Credits, about 4,000 tweets, search results or profiles, without a credit card.
- Copy your API key from the dashboard.
- Send a request such as POST https://api.twexapi.io/twitter/advanced_search/page with the header "Authorization: Bearer <your key>" and a body like {"searchTerms": ["from:nasa"], "sortBy": "Latest"}.
- Page through results with the /page variants of each endpoint, and save the JSON to CSV, a database or a spreadsheet.
Python Twitter scraper example
This script pages through search results and saves them to CSV. Change the query to scrape an account (from:nasa), a hashtag (#ai) or a date range (since:2026-10-01).
import csv
import os
import time
import requests
API_KEY = os.environ["TWEXAPI_KEY"]
URL = "https://api.twexapi.io/twitter/advanced_search/page"
def scrape(query, max_items=200):
cursor, tweets, empty = "", [], 0
while len(tweets) < max_items:
res = requests.post(
URL,
headers={"Authorization": f"Bearer {API_KEY}"},
json={"searchTerms": [query], "sortBy": "Latest", "next_cursor": cursor},
timeout=30,
)
res.raise_for_status()
body = res.json()
page = [t for t in body.get("data", []) if t]
time.sleep(5) # free Credits allow one request every 5 seconds
if not page:
# has_next_page can stay true after the last post. An empty page is
# sometimes temporary, so ask for the same page twice more, then stop.
empty += 1
if empty == 3:
break
continue
empty = 0
tweets += page
if not body.get("has_next_page") or not body.get("next_cursor"):
break
cursor = body["next_cursor"]
return tweets[:max_items]
with open("tweets.csv", "w", newline="", encoding="utf-8") as f:
writer = csv.writer(f)
writer.writerow(["tweet_id", "created_at", "user", "likes", "text"])
for t in scrape("ai agents min_faves:50"):
writer.writerow([
t.get("tweet_id"),
t.get("created_at"),
(t.get("user") or {}).get("screen_name"),
t.get("favorite_count"),
(t.get("text") or "").replace("\n", " "),
])Why scraping X got harder
X shut down guest accounts in early 2024, so logged-out scrapers and public Nitter instances stopped working. Self-hosted scrapers now need logged-in X accounts, rotating proxies and constant maintenance, and accounts used for scraping are often suspended. A scraping API moves that work to the provider: you only send requests and pay per result.
FAQ
How do I scrape Twitter without the official API?
Use a third-party scraping API such as TwexAPI, or run an open-source scraper with your own X accounts and proxies. The API route needs no X account and returns JSON from a single HTTP request.
Do I need an X developer account to scrape Twitter?
No. A developer account is only needed for the official X API. A scraping API such as TwexAPI works with its own API key, which you get by signing up with an email or Google account.
What is the cheapest Twitter scraper?
Of the options compared on this page, TwexAPI was the cheapest on November 27, 2026, at about $0.05 per 1,000 tweets from keyword search or account timelines. The cheapest popular Apify Actor charges $0.14 per 1,000 ($0.10 on Apify’s Business plan), Apify’s most-used Tweet Scraper V2 $0.40 and the official X API $5.00.
What is the best Twitter scraper in 2026?
It depends on how you run it. For apps, dashboards and AI agents, a scraping API such as TwexAPI returns JSON from one request. Apify suits teams that schedule no-code runs in its console. Open-source scrapers such as twscrape cost nothing but need your own X accounts, proxies and upkeep.
Is there a free Twitter scraper?
Open-source scrapers are free software, but you supply and risk your own X accounts. TwexAPI gives 20,000 free Credits on signup, about 4,000 tweets or search results and valid for 7 days, and a free follower exporter that downloads a list to CSV in the browser.
Can I scrape followers of any Twitter account?
Yes, for public accounts. Use the followers and following endpoints, or the free follower exporter to download a list to CSV. Protected accounts are not available.
Is scraping Twitter legal?
Collecting publicly available data is lawful in many places, but rules differ by country and X’s terms restrict automated access. Collect only public data, respect privacy law such as GDPR, and get legal advice for your use case.
Is TwexAPI affiliated with X?
No. TwexAPI is an independent third-party provider of public social data and is not affiliated with or endorsed by X Corp.
Related Guides
Sources
Prices change. Confirm current rates on each provider’s pricing page before you buy. TwexAPI is an independent provider and is not affiliated with or endorsed by X Corp.