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, compared with $0.18–$0.40 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 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 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) | From $0.18 | 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 | An API key |
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 results, 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 = "", []
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()
tweets += [t for t in body.get("data", []) if t]
if not body.get("has_next_page") or not body.get("next_cursor"):
break
cursor = body["next_cursor"]
time.sleep(5) # free Credits allow one request every 5 seconds
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.
What is the cheapest Twitter scraper?
Among the options checked on 2026-10-19, TwexAPI was the cheapest at about $0.05 per 1,000 tweets, versus $0.18–$0.40 per 1,000 for popular Apify Actors and $5.00 on the official X API.
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 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.