Why self-hosted Twitter scrapers keep breaking
- Login walls. Most of X — search, timelines, followers — needs a logged-in session, so scrapers need accounts.
- Accounts get limited or suspended. Accounts used for scraping hit rate limits quickly and get locked.
- Constant breakage. Every change to X's web app can break selectors, tokens and query IDs.
- Infrastructure. Proxies, headless browsers and retries cost money and time before you see any data.
Scraper vs. RelayX API
| DIY scraper | RelayX API | |
|---|---|---|
| X accounts needed | Yes, and they get banned | None |
| Proxies / headless browser | Usually | No |
| Maintenance when X changes | You | Us |
| Output | HTML/GraphQL you parse | Clean JSON |
| Cost | Proxies + accounts + your time | ~$0.13 per 1,000 tweets, pay per item |
What you can scrape
- Tweets — a user's latest posts, replies timeline, any search with X's operators (
from:,since:,min_faves:, …). - Profiles — bio, counts, verification, join date; batches by ID.
- Followers & followings — full user objects or bulk IDs.
- Engagement — replies, quotes, retweeters, thread context.
- Lists, communities, Spaces and trends.
Everything is listed in the API reference.
Scrape tweets in Python
import requests
r = requests.get("https://api.relayxapi.com/twitter/tweet/advanced_search",
headers={"X-API-Key": "YOUR_KEY"},
params={"query": "from:nasa since:2026-09-01", "queryType": "Latest"})
for t in r.json()["tweets"]:
print(t["createdAt"], t["likeCount"], t["text"][:80])Full walk-throughs: get tweets with Python andscrape Twitter followers with Python (CSV export, paging).
Pricing
Pay per item returned: tweets 13 credits, profiles 15 credits, followers 1–3 credits each, with 100,000 credits = $1. No subscription; credits don't expire. Details and examples on thepricing page.
Don't want to code?
Use X/Twitter data straight from Claude, ChatGPT or Cursor via our MCP server, or try thefree tools.
FAQ
Is there a Twitter scraper that still works?
Self-hosted scrapers break whenever X changes its web app and need logged-in accounts that get rate-limited or suspended. An API such as RelayX returns the same public data — tweets, profiles, followers, search — over plain HTTPS, without any accounts or proxies on your side.
Can I scrape Twitter without the official API?
Yes. RelayX is independent of the official X API: no developer account or approval is needed. You create a key and call REST endpoints, paying per item returned.
How do I scrape tweets with Python?
Call the RelayX endpoints with requests — for example /twitter/tweet/advanced_search with a query like from:nasa since:2026-01-01. Our guides show complete scripts for tweets and followers, including paging and CSV export.
How much does it cost to scrape Twitter?
Tweets cost 13 credits each and profiles 15 credits each, with 100,000 credits = $1 — about $0.13 per 1,000 tweets. Followers cost 1–3 credits each. New keys include free trial credits.
Can it scrape private accounts or DMs?
No. RelayX reads public data only: protected accounts, DMs and anything behind someone else’s login are out of scope.