Skip to content

Do you need proxies to scrape Twitter?

Last updated August 24, 2026

For session-free reads, no. Search, profiles, timelines and followers are fetched for you, so no address of yours reaches x.com and nothing in the request takes a proxy. One exception exists: POST user/user_login accepts proxy_url and the reference strongly recommends a residential one, since datacenter logins draw challenges. Reads stay flat at $0.0008 a call.

Every rate here is the pricing TwitterAPIs publishes. The billed rate is $0.0008 per call; $0.04 per 1,000 tweets is derived from it at a full 20-tweet page, which is the default page size rather than a guaranteed yield (source: twitterapis.com/pricing).

The answer depends entirely on whose address is talking to X

Run the scraper yourself and yes, you need proxies, because your own egress address is the identity X throttles and eventually blocks. Call a hosted endpoint instead and the question stops applying, since the request that reaches X comes from our side rather than your laptop or your cloud instance. There is no pool for you to buy, rotate or babysit. That covers every session-free read on the surface, which is most of what people mean by scraping: search, profiles, timelines, follower lists, media. One narrow exception survives, and it is the only place an address field appears in the request contract at all. Registering your own X account as a session is that exception, and telling the two cases apart is most of what this page is for.

What a proxy is actually doing inside a self-managed scraper

A proxy does exactly one job: it changes which address X sees. Automated browsing from a single address gets recognised quickly, and the response is a slowdown first and a cut-off after, frequently within hours of a heavy run. So you buy a pool, spread requests across it, retire addresses that start returning challenges, and top the pool back up. None of that is scraping logic. It is infrastructure you maintain so the scraping logic gets a chance to run at all. Residential addresses survive longer than datacenter ones because they read as ordinary consumer traffic, which is why that tier exists and why it is the expensive tier. The pool is also the part that quietly sets your real throughput, and nobody publishes that number for you.

A hosted route deletes the layer instead of managing it

TwitterAPIs handles the fetching, the reliability and the endpoint upkeep, and hands back structured JSON. Concretely, three blocks of your code stop existing: the proxy configuration and rotation, the retry loops wrapped around bans and stalls, and the HTML parsing that turned a rendered page into records. What replaces all of it is a GET against a documented path carrying Authorization: Bearer YOUR_API_KEY, and a JSON body you read fields off. The header x-api-key with the same value is accepted too if that suits your stack better. Nothing in a read request takes an address, a user agent or a pool handle, because on this side of the call none of those are yours to supply.

Session-free reads, and the four null fields that prove it

Most routes here are described in the reference as session-free reads: the API makes the upstream request for you, with no X identity of yours attached. That has a visible consequence worth designing around. Community Info returns role, can_join, is_pinned and viewer_relationship_type as null on every single response, because each of those four answers a question about the calling identity, and on a session-free read that identity is not yours. The keys are kept rather than stripped, so it stays obvious that X sends them. Read that as the signature of a session-free read: everything about the object itself is populated, and anything caller-relative is deliberately empty. When you need caller-relative truth, what you need is a session, not an address.

The one call where an address is still recommended: user_login

POST user/user_login mints an X session from a username and password, and it takes an optional third parameter, proxy_url, described in the reference as strongly recommended. The reason is specific rather than general: credential logins from datacenter IPs are commonly challenged by X. A residential address makes the sign-in look like a person connecting from home, which is the exact distinction the challenge is drawing. This call costs $0.01 and is billed only when a login actually succeeds, so an attempt that dies on a challenge is not charged as one. If you can copy cookies out of a browser tab instead, prefer customer/session, which the reference recommends over credential login precisely because it avoids the challenge path.

customer/session takes an address too, plus a user agent

Registering cookies is the preferred way to attach your own account. customer/session takes auth_token and ct0 in the JSON body, never the query string, and two optional fields matter here. user_agent defaults to a current Chrome string. proxy_url accepts an HTTP or SOCKS URL written as http://user:pass@host:port and defaults to direct, so setting it routes that session's traffic through egress you control. The registration call itself is free and stores the pair once, after which every Session Read, Write Action and Direct Message route runs as your account. Most session endpoints also accept the pair inline as the x-auth-token and x-ct0 headers, which skips stored state entirely; home_timeline, likes and followers_you_know need a registered session.

One published ceiling replaces the rotation arithmetic

With a pool you never learn your limit, you discover it by getting blocked, and the number moves with the pool's health. Here the limit is written down and identical on every route: 600 requests per minute and 20 concurrent in flight, per key. Cross either bound and you get a 429 carrying a Retry-After header in whole seconds, so backoff becomes one branch reading one header rather than a heuristic wrapped around silence. Every response also carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. There is no per-endpoint quota, no fifteen-minute bucket and no tier to buy past, so capacity planning is arithmetic against one number and your credit balance rather than a guess about how many addresses to hold.

What you stop maintaining, which is where the real bill sits

A free library downloads for nothing and then bills you in hours. Reverse-engineered clients read X's internal endpoints, so any change the site ships breaks them. snscrape has sat mostly dead since 2023, and the forks people still run demand constant patching. A scraper that fails at two in the morning costs more than an endpoint that simply keeps answering. Proxy spend is only the visible half of that. The invisible half is the engineer who owns rotation, challenge handling, parser repair and the pager. Moving to a hosted route usually touches one file, because the shape you were assembling by hand arrives already assembled, and the code you delete is the address handling and the parsing rather than your actual analysis.

Cost, stated without inventing anybody else's numbers

A standard read is $0.0008 and returns roughly twenty posts, which puts a thousand posts near four cents. New accounts open with $0.50 in credit and no card, worth about 625 calls or roughly 12,500 posts, enough to run a real pilot before attaching payment. Against that, the honest line for the free libraries is not a price at all: the licence is $0 and you fund the proxies and the compute yourself, at whatever your provider charges. We publish no figure for that, because it is not ours to publish and it moves with the tier you buy. Compare the two on total cost including the engineering time, not on the licence line, which is the only line where free wins. $0.0008 a call, per our published pricing.

Quick summary

If you run your own scraper against X, yes, you need proxies, usually residential ones, plus logged-in sessions and someone to keep both working. If you read X through a hosted data API, no: the request goes to the API with a bearer key from your own server, and the address question belongs to the provider. The rest of this page explains why, what each approach costs, and the one route here where an address is still recommended.

How to intercept X's API, and the official X API option

There are three ways to get the data. The official public API is licensed and billed per returned post. Intercepting X's internal API means driving a browser, capturing the GraphQL calls the web app makes, and replaying them with your own session and a proxy; it works until X rotates a query id or flags the account. A hosted data API makes those calls for you and returns stable JSON. Only the second needs you to manage proxies.

Data types you can collect

Posts with text, media, timestamps and engagement counts; user profiles with bios, follower and following counts; follower and following lists; replies and full threads; search results by keyword, operator and date; lists, communities and trends. On a hosted API each is a separate endpoint returning parsed JSON, so there is no HTML or GraphQL parsing to maintain.

Scraping tweets with Playwright or Selenium

Scraping tweets yourself means rendering pages or replaying internal calls, handling login walls, rotating addresses when you get rate limited and fixing selectors when the page changes. Requesting them from an API is one HTTPS call: GET /twitter/user/tweets with a username, or /twitter/tweet/advanced_search with a query, returning about 20 posts per call at $0.0008. Self-built scrapers usually drive a real browser with Playwright or Selenium, because X renders posts with JavaScript; Playwright is the common choice now for its speed and network interception, Selenium for teams that already run it.

Extracting individual tweet data

For one post, GET /twitter/tweet/detail with its id or URL returns the full object: text, author, media, counts, the post it quotes or replies to, and its conversation id. That id then feeds /twitter/tweet/replies for the replies under it or /twitter/tweet/thread for the author's chain.

What proxies work best for X, and how its hidden API works

If you do run your own scraper, datacenter addresses are flagged quickly; residential or mobile proxies last longer because they look like home users. Sticky sessions that keep one address per logged-in account work better than rotating every request, because an account that jumps between countries gets challenged. Budget for both the proxy plan and the accounts, since each account eventually gets locked. Under the page, the X web app loads posts through GraphQL calls with rotating query ids and a guest or session token; scrapers that capture and replay those calls skip page rendering, but every replay still comes from your address and account, which is why the proxy choice matters.

Twitter robots.txt

X publishes a robots.txt that tells crawlers which paths they may fetch, and it disallows most automated access by crawlers it has not named. Robots.txt is a signal of the site's wishes rather than a law, but courts and platforms treat ignoring it as evidence of intent, and X's terms separately prohibit scraping without consent. A hosted API sidesteps the question for your own code because you never crawl X.

Project setup without a proxy layer

The whole setup on a hosted route is one environment variable holding the bearer key and an HTTP client. There is no browser to install, no proxy credentials, no logged-in accounts to keep alive and no session refresh job, so a new project goes from signup to first call in about two minutes on the $0.50 starting credit.

Find influencers: the tweet and profile URLs to scrape

A typical scraping job is finding influencers in a niche: search for the topic, collect the authors, then rank them by followers and engagement. On an API that is advanced search for the posts, the authors that come back inside each post, and a user info read for anyone you want more detail on, all from one key at the standard rate.

Put it all together: scrape tweets with Python, or call an API

A self-hosted scraper is a browser, a proxy plan, a set of logged-in accounts and a maintenance rota. A hosted route is a key and a loop. Choose self-hosting if you need something no API returns and you have engineering time to spare; otherwise the proxy question disappears along with the scraper.

When a self-hosted scraper still makes sense

Self-hosting is worth its cost in narrow cases: you need a field or surface no API returns, you are researching the scraping problem itself, or your volume is so large and so steady that owning the stack beats any per-call price. Even then, budget for the full operating cost: proxy bandwidth, replacement accounts, a person who fixes the scraper when X changes its front end, and the gap in your data every time it breaks. For monitoring, research datasets and agent tools, a hosted route is cheaper once that maintenance time is counted.

What the proxy bill really includes

A residential proxy plan bills by the gigabyte, and X pages are heavy: a rendered timeline pulls megabytes of script and media before you reach a single post, so bandwidth, not request count, sets the bill. Add the accounts each address logs in with, the captcha or verification service you need when an account is challenged, and the engineering hours spent when X changes its front end. A hosted call returns about 20 parsed posts as a few kilobytes of JSON for $0.0008, with none of those line items attached.

A maintained Twitter scraper API, and how it works

A maintained scraper API is the third option between the official API and your own scraper: a provider runs the collection, keeps it working as X changes, and sells the result as plain HTTPS endpoints. Here that means one bearer key, about 20 posts per call at $0.0008, and parsed JSON with authors and engagement counts attached. Your code never logs in to X, never holds a proxy, and never parses HTML, so the maintenance that breaks self-built scrapers sits with the provider rather than your team.

Python Twitter scraper: build one or skip it

Python is the usual language for a Twitter scraper: Playwright or Selenium for the browser, an HTTP client for replayed GraphQL calls, and a parser for the responses. Building one teaches you how X serves data, and it is the right call when you need something no API returns. For most jobs, the same Python script can skip the scraper and call an API with the requests library: one GET with an Authorization header, then response.json(), with pagination by cursor and no proxy, browser or account to keep alive.

Self-managed scraping against a hosted API, layer by layer

Layer you ownSelf-managed scraperTwitterAPIs
Egress addressesYou buy and rotate a pool, and you fund itHandled for you, and no proxy_url on any session-free read
Staying unblockedYours to solve again after every X changeHandled for you, so an X change is not your incident
ParsingRendered HTML or internal endpoints, reshaped constantlyStructured JSON off a documented path
Retry and backoffHand-written around blocks and silent stalls429 carries Retry-After in whole seconds
Throughput ceilingUnpublished, discovered by getting blocked600 requests a minute, 20 concurrent, per key
Acting as your own accountYour cookies and your egress, alwaysproxy_url on user_login, residential recommended
Cost model$0 licence, you fund proxies and compute$0.0008 a call, near four cents per 1,000 posts
The HTTP 429 Too Many Requests client error response status code indicates the client has sent too many requests in a given amount of time.
MDN Web Docs, HTTP 429 Too Many Requests. Source

Questions and answers

Do I need a proxy to call the search endpoint?
No. Search, profiles, timelines, follower lists and media need no session, and the upstream request comes from our side rather than yours. The request contract for those routes has no address field, no user agent and no pool handle, because none of them are yours to set on this side. You send a query and a Bearer header, and you read JSON back. Your own connection never touches x.com at any point in that exchange.
Which calls actually accept a proxy_url parameter?
Two of them. POST user/user_login accepts proxy_url alongside username and password, and the reference calls it strongly recommended. POST customer/session accepts proxy_url as well, plus an optional user_agent, and defaults to direct when you leave it out. Both are about attaching your own X identity rather than reading public data, which is exactly the dividing line: session-free reads take no address, account-acting session setup can take one.
Why does logging in from a datacenter address get challenged?
The reference states it plainly: credential logins from datacenter IPs are commonly challenged by X. A sign-in is the moment the platform cares most about whether a person is present, and an address block belonging to a cloud provider is weak evidence for that. A residential address reads as an ordinary home connection instead. That is why proxy_url exists on the login route and appears nowhere in the read surface at all.
Is residential genuinely better than datacenter here?
For the credential login, yes, and that is the only place it is recommended. The documentation says to log in from a residential proxy because datacenter origins draw challenges. For every session-free read the comparison is moot, since you are not supplying an address at all. We publish no per-provider prices or success rates for proxy tiers, because those figures belong to the vendor selling them rather than to us.
Does owning more addresses raise my rate limit?
Not here. The ceiling is per API key rather than per address: 600 requests a minute and 20 concurrent in flight. Buying more egress does not lift it, and running everything from one machine does not lower it. Past either bound the answer is a 429 with Retry-After in whole seconds. Under a self-managed pool the opposite holds, where usable capacity really is a function of how many healthy addresses you hold.
Can I still route traffic through my own network if policy demands it?
For session traffic, yes. proxy_url on customer/session sends that session's requests through an HTTP or SOCKS endpoint you control, written as http://user:pass@host:port, and it defaults to direct when unset. Session-free reads offer no equivalent hook, because the upstream call there is made on our side, not as your identity. So the answer splits by route rather than being one blanket policy across the whole surface.
What happens to my own account if I scrape without a proxy?
Pointing a self-run scraper at x.com from a fixed address invites throttling first and a block after, and a login-driven scraper puts the account itself at risk of being locked. Reading through a hosted endpoint moves that exposure off your infrastructure entirely, since neither your address nor your credentials are part of the transaction. That separation matters more in practice than any per-call price difference between the two approaches.
Will a proxy help my scraper survive an X update?
No, and conflating the two is common. A proxy solves who you appear to be. A site change breaks what you parse. Reverse-engineered clients read internal endpoints, so a shipped change snaps them no matter how healthy the pool is underneath. That is a separate maintenance stream you own forever, and it is why a free library's true cost shows up in engineering hours rather than on any invoice.
How much of a scraping budget usually goes on proxies?
We cannot answer that with a number, because we do not sell proxies and quoting a rate we never charge would mean inventing one. What can be said is the shape of it: with a free library the licence is $0 and the addresses and compute are yours to fund, while with a metered read the line item is $0.0008 a call with no separate infrastructure bill sitting underneath it.
Can I test this before building any egress at all?
Yes, and that is the normal path. Signup hands you $0.50 in credit with no card, about 625 calls or roughly 12,500 posts, and not one of those calls needs an address from you. Send a GET with Authorization: Bearer and your key, read the JSON, and check the shape against what you expected. If it fits you never build the proxy layer, and if it does not you have spent nothing.

Start with $0.50 in free credits

No credit card. Roughly 12,500 tweets to test every endpoint.