Playwright vs HTTP requests on proxy bandwidth, speed, and cost
Every byte your scraper pulls through a proxy ends up on the bill. A plain HTTP request fetches one HTML file and stops. Playwright loads the page the way a real browser does, so it also pulls in images, scripts, fonts, and tracking pixels.
That difference adds up fast. This guide compares both methods on proxy bandwidth, speed, and cost. Then it shows how to shrink Playwright's footprint when you can't avoid a browser.
Why Playwright uses more proxy bandwidth
When you send an HTTP request with a library like requests or httpx, you get one response back. That's it. No CSS, no JavaScript, no images.
page.goto() works differently. Playwright parses the HTML, then requests every resource the page references. Those scripts often fire off requests of their own: analytics, ads, chat widgets, lazy-loaded images.
The HTTP Archive 2025 Web Almanac shows how lopsided this is. Here are the median transfer sizes for mobile pages:
|
Resource |
Median size (mobile) |
|---|---|
|
HTML |
33 KB |
|
JavaScript |
646 KB |
|
Images |
911 KB |
|
CSS |
79 KB |
|
Fonts |
23 KB |
|
Full page, all resources |
2,164 KB |
The median mobile page also makes about 72 requests. The HTML you actually want to parse is roughly 1.5% of the total download.
This is the heart of the Playwright proxy bandwidth problem. A browser downloads the whole page through your proxy, even when you only need the text.
Speed and resource use at scale
Bandwidth is only half the gap. HTTP clients are also faster and much lighter on your servers.
A browser has to start a process, build the DOM, run JavaScript, and wait for the network to settle. That's seconds per page, not milliseconds.
Memory climbs quickly too. In one benchmark of headless Chrome, peak memory went from about 611 MB with a single worker to about 2.5 GB with 25 parallel workers. An HTTP worker needs a small fraction of that, so one machine can run far more of them.
Proxy latency also hurts browsers more. An HTTP scrape pays the proxy round trip once per page. A Playwright page with 70+ requests pays it again and again, and render-blocking scripts and stylesheets make the page wait each time. Our guide on measuring and fixing proxy latency shows how to find where that time goes.
|
HTTP requests |
Playwright |
|
|---|---|---|
|
Requests per page |
1 |
~70+ |
|
Runs JavaScript |
No |
Yes |
|
Memory per worker |
Low |
High |
|
Pages per minute per worker |
High |
Low |
What the bandwidth gap costs on a per-GB plan
Most residential proxies are billed per GB. In 2026, prices run from roughly $1 to $10 per GB, depending on the provider and volume. Here's what 100,000 pages would cost at $3/GB, using the median sizes above.
|
Method |
Data per page |
Total for 100k pages |
Cost at $3/GB |
|---|---|---|---|
|
HTTP request (HTML only) |
~33 KB |
~3.3 GB |
~$10 |
|
Playwright, nothing blocked |
~2.2 MB |
~216 GB |
~$650 |
Same pages. Same data. About 65 times the bill.
Real numbers are messier than this. Product and listing pages often weigh more than the median, and headers and TLS handshakes add overhead to both methods.
Failed requests count too. If 20% of your requests get blocked, your cost per successful GB rises by 25%. With a browser, each failed page burns megabytes instead of kilobytes.
Your plan type matters as well. If Playwright jobs push hundreds of gigabytes a month, compare unlimited residential proxies vs pay-per-GB before you scale. For more ways to trim the bill, see our guide to cutting proxy costs in web scraping.
How to cut Playwright proxy bandwidth
Some sites only show their data after JavaScript runs. There, the goal is to make the browser download less.
Block heavy resources. Playwright's route() API lets you abort requests before they leave the browser. An aborted request never reaches the proxy, so you never pay for it.
BLOCKED = {"image", "media", "font"}
async def block_heavy(route):
if route.request.resource_type in BLOCKED:
await route.abort()
else:
await route.continue_()
await context.route("**/*", block_heavy)
Going by the medians above, images and fonts alone make up about 43% of a typical page. Add stylesheets if layout doesn't matter to your parser. Be careful with scripts, since blocking them often breaks the content you came for.
One catch: Playwright's docs note that enabling routing disables the HTTP cache. On sites that reuse the same large scripts across pages, measure your traffic with and without blocking before you commit.
Capture the API, not the page. Many JavaScript-heavy sites load their data from a JSON endpoint. Find that call in your browser's DevTools Network tab and request it directly. JSON responses are tiny compared to a rendered page.
Use page.request for follow-up calls. Playwright's API request context sends HTTP requests without loading a page, and page.request shares cookies with the browser context. Log in once in the browser, then fetch the rest as plain requests.
Reuse contexts. A fresh context for every URL means new connections, new handshakes, and lost cookies. Keep one context per session where your target allows it. Our guide to sticky vs rotating sessions in Playwright explains how to match this with the right proxy session type.
When to use each, and the hybrid approach
Pick HTTP requests when:
-
The data is already in the raw HTML (check with View Source or curl)
-
The site has a public JSON endpoint
-
You need high volume at a low cost
Pick Playwright when:
-
Content only appears after JavaScript runs
-
You need to click, scroll, or log in
-
The site runs a JavaScript challenge that plain HTTP clients can't pass
Often the best answer is both. Use Playwright to open the site once, pass the challenge, and collect the cookies. Then hand those cookies to an HTTP client for the next few hundred pages. You pay browser-level bandwidth on one page instead of every page.
This works until the cookies expire, or until the site links them to a browser fingerprint your HTTP client can't match. When that happens, refresh the session in the browser and carry on. If you keep hitting walls, our guide on avoiding Cloudflare blocks with proxies covers the usual causes.
Start with HTTP, and switch to a browser only when the page forces you to. Your proxy bill will show the difference.