Skip to main content
Web scraping · Engineering guide

Headless Browsers at Scale: Playwright vs Selenium vs Puppeteer for Web Scraping, and What They Cost at 1M Pages a Day

Your scraper needs a real browser, and the first question your team asks is which tool should drive it. The Playwright vs Selenium web scraping debate fills forums, with Puppeteer never far behind. It matters less than people think. At a million pages a day, the tool changes your bill a little. Whether you need a browser for every page, what each page downloads, and where its traffic exits change it by a factor of more than 100. This guide compares the three tools honestly, then does the arithmetic.

DDDataDwip Team · Reviewed by our data collection engineers
Published 23 Dec 2026 14 min read

Last updated 23 December 2026. Tool facts checked against each project's documentation. Cost figures are a model with stated assumptions, not a quote.

Playwright vs Selenium for web scraping: the short answer

Playwright vs Selenium for web scraping has a default answer for new projects: start with Playwright. It waits for elements on its own, runs many isolated sessions inside one browser, and has official support for four languages. Selenium is the right choice when your team already runs it. Puppeteer suits Node.js teams that only need Chrome.

Default pickPw

Playwright

Microsoft · since 2020

The strongest all-rounder for new scraping work.

  • You are starting from scratch
  • Your team writes Python, JavaScript, Java or .NET
  • You want many sessions in one browser
Se

Selenium

Selenium project · since 2004

The standard, with the widest reach.

  • Your team already knows it
  • You need Ruby, or real Safari
  • You already run a Selenium Grid
Pp

Puppeteer

Google Chrome team · since 2017

The lean choice for Chrome.

  • Your stack is Node.js
  • Chrome is the only browser you need
  • You want the thinnest layer over Chrome

All three are open source under the Apache 2.0 licence, and all three can load a page, run its JavaScript and hand you the result. The differences are in how they talk to the browser and what they make easy. Those are covered next, and then the part that decides your budget.

Headless browser scraping: what the browser is for

Headless browser scraping means running a real browser with no window, controlled by code. You need one when a page builds its content with JavaScript after loading, when the data only appears after a click or a scroll, or when the site checks that a real browser is on the other end.

A plain HTTP request fetches one file: the HTML. A browser fetches that file and then everything it references, including scripts, style sheets, images and fonts, and runs the scripts. That is why a browser sees content an HTTP client can't, and why it costs far more. The HTTP Archive's 2025 Web Almanac puts the median desktop home page at 2.86 MB, of which the HTML is 22 KB. A browser downloads the lot unless you tell it not to.

"Headless" itself comes in more than one form. Playwright's documentation explains that it uses a regular Chromium build when a window is shown and a separate, lighter headless shell when one isn't, with Chrome's newer headless mode available as an option. The lighter shell is faster to start and uses less memory. The newer mode behaves more like the browser real people use. For scraping, test your target pages in both before you fix the choice, because some pages render differently.

If you are new to the basics, our Python web scraping tutorial and guide to web scraping with JavaScript and Node.js cover both approaches from the first line of code.

How Selenium, Puppeteer and Playwright drive a browser

Selenium, Puppeteer and Playwright differ most in the route a command takes from your script to the browser. That route explains nearly every practical difference between them.

From your script to the browser

The path a single command takes in each tool.

Selenium

Your scriptJava, Python, C#, Ruby, JavaScript
WebDriver commands
one request, one reply
Browser driverOne per browser vendor
vendor's own channel
BrowserChrome, Edge, Firefox, Safari

A W3C standard that every major browser implements. A two-way channel, WebDriver BiDi, is being added.

Puppeteer

Your scriptJavaScript or TypeScript
DevTools Protocol or
WebDriver BiDi, two-way
BrowserChrome or Firefox

No separate driver. The script holds an open connection to the browser and hears about events as they happen.

Playwright

Your scriptJavaScript, Python, Java, .NET
one API for
every language
Playwright driverTranslates for each browser
two-way connection
BrowserChromium, Firefox, WebKit

Ships its own tested browser builds, so a given version always meets the same browsers.

Selenium: the standard

Selenium is the oldest of the three, and its WebDriver interface became a W3C standard that browser makers implement themselves. Your script sends a command, the browser's driver carries it out and replies. Selenium's own documentation describes this classic model as strict request and response, in one direction at a time, and says the project is moving its whole implementation to the two-way WebDriver BiDi protocol.

For scraping, the practical effects are these. Each session is its own browser, so parallel work means many browsers. Waiting for content is your job, through explicit waits. In return you get the widest language and browser support, and Selenium Grid, which exists to run sessions in parallel across many machines.

Puppeteer: straight to Chrome

Puppeteer is, in its own words, a JavaScript library that provides a high-level API to control Chrome or Firefox, over the DevTools Protocol or WebDriver BiDi. It runs headless by default. Because it speaks the same protocol Chrome's developer tools use, it can do whatever those tools can: intercept requests, read network traffic, measure performance.

Its limits are its focus. It is a Node.js library, and it grew up around Chrome.

Playwright: one API, three engines

Playwright was started by engineers who had worked on Puppeteer, and it shows. It keeps the two-way connection, adds official bindings for JavaScript and TypeScript, Python, Java and .NET, and drives Chromium, Firefox and WebKit through one API. Its documentation notes that each Playwright version requires specific browser builds, which it installs for you. That removes a whole class of "works on my machine" failures.

Two features matter most for scraping. Playwright waits for an element to be ready before acting on it, which removes most of the timing code scrapers are full of. And it offers browser contexts: separate, isolated sessions, each with its own cookies, inside a single browser process.

Playwright vs Selenium vs Puppeteer: feature comparison

Playwright, Selenium and Puppeteer overlap on the basics, so the comparison below sticks to the features that change how a scraper is built and run.

For scrapingPlaywrightMICROSOFTSeleniumSELENIUM PROJECTPuppeteerGOOGLE CHROME TEAM
LanguagesJavaScript, TypeScript, Python, Java, .NETJava, Python, C#, Ruby, JavaScriptJavaScript, TypeScript
BrowsersChromium, Firefox, WebKit; also Chrome and EdgeChrome, Edge, Firefox, SafariChrome, Firefox
How it connectsOwn driver, two-wayW3C WebDriver; BiDi being addedDevTools Protocol or WebDriver BiDi
Waiting for contentAutomaticBuilt into every actionManualYou write explicit waitsPartlyAutomatic with locators
Many sessions in one browserYesBrowser contextsNoOne browser per sessionYesBrowser contexts
Block images and fontsBuilt inRequest routingPossibleLess directBuilt inRequest interception
Scaling across machinesYoursYou run the orchestrationBuilt inSelenium GridYoursYou run the orchestration
LicenceApache 2.0Apache 2.0Apache 2.0
Checked against each project's documentation in December 2026. All three change quickly; confirm before you commit.

Two rows deserve a second look. "Many sessions in one browser" decides how much memory each parallel page costs you. "Block images and fonts" decides how much data each page pulls. Both come back in the cost section. The documentation for Playwright, Puppeteer and Selenium Grid has the detail.

Puppeteer vs Playwright for scraping: closer than they look

Puppeteer vs Playwright is the closest contest of the three, because they share an ancestry and a design. For scraping Chrome from Node.js, they are near enough to equal that team familiarity should decide. Playwright pulls ahead when you want Python, when you need a non-Chromium engine, or when you value automatic waiting everywhere. Puppeteer stays attractive when you want the smallest dependency and the most direct line to Chrome.

What neither will do is make an expensive design cheap. That depends on the next question.

Do you need a headless browser at all?

A headless browser is the most expensive way to fetch a page, so the first optimisation is to avoid it where you can. Many "JavaScript sites" still send their data in the first response, or load it from an endpoint you can read directly. Work down this list for each source before you reach for a browser.

Three questions before you start a browser

Ask them per source. The answers are rarely the same across a whole project.

QUESTION 1Is the data already in the HTML when you fetch the page without a browser?
Use an HTTP clientNo browser needed.CHEAPEST · FASTEST
QUESTION 2Does the page fetch its data in a separate, public request you can see in the network tab?
Read that responseStructured data, no rendering.CHEAP · STABLE
QUESTION 3Do only some page types need rendering, such as product pages but not listings?
Mix the twoA browser only where it's needed.USUALLY THE BEST ANSWER
Use a headless browserThen control what it downloads.

Stay on the right side of the site as you do this: public pages only, no logins, and sensible request rates. And remember that protected sites judge the visitor as well as the request, a subject covered in how websites detect web scrapers.

How to scrape JavaScript websites at scale: the maths of 1M pages a day

To scrape JavaScript websites at scale you have to turn a daily target into machines, and the conversion is simple enough to do on paper. A million pages a day sounds enormous. Spread over 86,400 seconds it is fewer than twelve pages a second.

The number that matters is how many pages are open at once. If each page takes five seconds to load and render, twelve new pages a second means about 58 in flight at any moment. Nobody runs a system at 100% of capacity, so plan for 60% and you need room for 96. Give each open page half a CPU core and a gigabyte of memory, and the fleet is 48 cores and 96 GB: twelve ordinary four-core machines.

From a daily target to a fleet

Each step is one multiplication or division. Assumptions are in the labels.

Target1Mpages a day
Rate11.6pages a second
In flight58pages open at once
Capacity96slots to provide
Fleet48cores, with 96 GB
÷ 86,400 s× 5 s a page÷ 60% load× 0.5 core, 1 GB
Five seconds a page, 60% target load, and half a core and 1 GB per open page are assumptions. Measure your own pages; heavy ones can need double.

This is where the tools differ in practice. With browser contexts, in Playwright or Puppeteer, those 96 slots can share a handful of browser processes per machine. With one browser per session, each slot carries a full browser's overhead. The gap depends on your pages, so measure it instead of trusting a benchmark from someone else's.

What 1M pages a day costs

The cost of 1M pages a day has two parts that behave very differently: the machines, and the data that flows through your proxies. Machines are cheap. At an assumed $0.04 per core-hour, 48 cores cost about $1,382 a month.

Data is not cheap, because proxies are sold by the gigabyte. A browser that loads full pages at 2.5 MB each moves 75,000 GB a month. Block images, fonts and media and we assume a page falls to around 0.5 MB, or 15,000 GB. Fetch only the HTML and we assume 0.1 MB, or 3,000 GB. Then multiply by the price of the exit: we assume $0.60 a gigabyte for datacenter proxies and $4.00 for residential ones. Our guide to proxies explains when each is needed.

Six ways to collect the same million pages a day

Monthly infrastructure cost, and cost per 1,000 pages. A model, with assumed prices.

Datacenter proxy · $0.60/GBResidential proxy · $4.00/GB
HTTP onlyNo browser · 0.1 MB a page · 4 cores
$0.06per 1,000 pages$1,915 a month
$0.40per 1,000 pages$12,115 a month
Browser, assets blocked0.5 MB a page · 48 cores
$0.35per 1,000 pages$10,382 a month
$2.05per 1,000 pages$61,382 a month
Browser, full pages2.5 MB a page · 48 cores
$1.55per 1,000 pages$46,382 a month
$10.05per 1,000 pages$301,382 a month

Where the money goes

13%Data through proxies 87%
Data through proxies 99.5%
MachinesData through proxies
30-day month, 30 million pages. Compute at $0.04 per core-hour. Engineering time is not included. All prices are assumptions to replace with your own.

Three things stand out.

  • The spread is 157 times. The same million pages cost $1,915 or $301,382 a month, and none of the difference comes from choosing Playwright, Selenium or Puppeteer.
  • Data dominates. Even in a cheap browser setup, 87% of the bill is traffic through proxies. Blocking images and fonts, which Playwright and Puppeteer make easy, cuts that by four fifths in this model.
  • The tool still matters at the edges. It affects how many cores those 96 slots need and how much engineering time the fleet takes. Those are real savings. They are just smaller than the three above.

Five ways to cut the cost of headless browser scraping

Headless browser scraping gets cheaper through design choices long before it gets cheaper through hardware. In rough order of effect:

  1. Render less often. Use the browser to discover how a page gets its data, then fetch that data directly on later runs where the site allows it.
  2. Block what you don't read. Images, fonts, video and analytics scripts make up most of a page's weight and none of your dataset.
  3. Collect less often. A daily run costs a twenty-fourth of an hourly one. Our guide on how often to scrape a website shows how to tier products by how fast they change.
  4. Share browsers. Run many contexts in one browser process instead of one browser per page, and keep browsers warm between pages.
  5. Match the proxy to the site. Use the cheaper kind wherever it works, and keep the expensive kind for the sources that need it.

Each of these is a multiplier on the others. Applied together, they are the difference between the top-left and the bottom-right of the matrix.

For comparison, commercial scraping services publish pay-as-you-go rates around $1.50 per 1,000 pages, as noted in our pricing guide. That sits inside this table, which is a fair sign the model is in the right range.

Headless browser cost calculator

Change any assumption and see the fleet and the bill. Start from a preset, then enter your own page weight and proxy price. Nothing you type leaves your browser.

Cost per 1,000 pages
Per month
  • Pages open at once
  • Slots to provide
  • Cores
  • Machines, per month
  • Data through proxies
  • Proxy cost, per month

What breaks when headless browsers run at scale

Headless browsers at scale fail in ways a single script on a laptop never shows you. None of these problems is exotic, and each one shows up well before a million pages a day.

ProblemWhat you seeThe usual fix
Memory creepA browser that used 300 MB at breakfast uses 3 GB by lunchRecycle each browser after a fixed number of pages
Hung pagesA slot that never returns, quietly shrinking your capacityA hard timeout on every navigation, enforced from outside the browser
Orphaned processesMachines full of browsers nobody is usingOne browser per container, and kill the container on failure
Version driftHalf the fleet behaves differently after an updatePin the tool and the browser build together, and roll out in stages
Queue pile-upsOne slow site delays every other sourceSeparate queues per source, with limits on retries
Silent bad dataPages load, but a field is empty or wrongValidate every run before delivery

The last row is the one that hurts, because nothing crashes. We describe the checks in six validation layers every scraped dataset needs, and the wider causes of failure in why web scrapers break. To catch the rest you need a view of the fleet itself.

Browser fleet12 NODES · 96 SLOTS · LAST 24 HOURS · EXAMPLE
Pages, 24 h1,001,800target 1,000,000
In flight now61of 96 slots
Success97.4%validated pages
Page time, p958.2 smedian 4.6 s
Browser recycles2149 forced by timeout

Pages per hour peak 42,900 · low 33,800

00:0006:0012:0018:0023:00

Nodes memory in use

62%node-01
58%node-02
64%node-03
60%node-04
57%node-05
63%node-06
58%node-07
61%node-08
59%node-09
66%node-10
backnode-11
60%node-12
NODE-07 · 13:52Memory at 91%. Browsers recycled early; the node is back at 58%.
NODE-11 · 14:05Lost for 40 minutes. Its queue was redistributed; hourly output dipped and recovered.
An example fleet view with invented figures. It is not a DataDwip product screen.

Build the fleet or buy the pages?

Headless browser scraping at this scale is an operations job more than a coding one. The script is a week of work. Keeping twelve machines of browsers healthy, patched and unblocked is a permanent one, and it is the part that the cost matrix leaves out. We put a figure on that in the true cost of an in-house web scraping engineer.

Building makes sense when collection is core to your product and you have engineers who want to own it. Buying makes sense when the data is an input to something else you sell. If you are weighing the two for a budget, the model in the business case for web data sets the numbers side by side.

Frequently asked questions

Is Playwright better than Selenium for web scraping?

For most new scraping projects, yes. Playwright waits for content automatically, runs many isolated sessions in one browser and makes it easy to block images and fonts. Selenium remains a sound choice for teams that already use it, need Ruby or Safari, or run a Selenium Grid.

Is Puppeteer faster than Playwright?

On Chrome the two are close, because they connect to the browser in a similar way. Differences depend on the pages and on how the script is written. Page weight, wait strategy and concurrency affect speed far more than the choice between them.

How many pages can one headless browser scrape per day?

It depends on page time and concurrency. One browser handling eight pages at once, at five seconds each, completes about 138,000 pages in 24 hours. Heavier pages, retries and blocks reduce that, so measure on your own sources.

How much does it cost to scrape 1 million pages a day?

In our model, infrastructure runs from about $1,900 a month for HTML-only collection on datacenter proxies to about $300,000 for full-page browser loads on residential proxies. The middle setup, a browser with images and fonts blocked, comes to about $10,000 to $60,000 a month depending on the proxy. Engineering time is extra.

Do I need a headless browser to scrape a JavaScript website?

Not always. Check whether the data is in the initial HTML or in a separate public data request the page makes. If so, an HTTP client is cheaper and faster. Use a browser only for the pages that need rendering or interaction.

The short version

In the Playwright vs Selenium web scraping decision, Playwright is the default for new work, Selenium for teams already invested in it, and Puppeteer for Node.js teams on Chrome. All three will do the job. At a million pages a day the tool is a small part of the bill. The large parts are whether each page needs a browser, how much each page downloads, and what kind of proxy carries it. Those choices move the cost by more than 100 times.

So decide in this order: avoid the browser where you can, block what you don't need, pick the cheapest proxy that works, and only then argue about frameworks. Put your own numbers into the calculator before you buy a single machine.

How DataDwip runs headless browsers at scale

Browser-based collection at DataDwip is run as an operated service, with the fleet, the proxies and the checks handled by people whose job it is.

  • The right fetch for each page. We use a browser only where a source needs one, and plain requests everywhere else, which keeps the cost per page down.
  • A team that owns the fleet. A dedicated data acquisition team is three engineers, a QA lead and a delivery manager, so crashes and updates are someone's job.
  • Breakages caught and fixed to a deadline. The SLA commits to detection within 4 hours and a fix within 24 business hours.
  • Coverage you can measure. At least 97% of expected records per source on every run, and 95% of deliveries on time.
  • Checked before delivery. Every run passes validation and arrives with a quality report, so a page that rendered without its price doesn't reach you.
  • Yours to keep. The code and the data are yours, so nothing is lost if you later bring collection in-house.

Single sources and one-off datasets run through our web scraping services. To see data from a JavaScript-heavy site before deciding, ask for a free sample.

DD

DataDwip Team DataDwip runs web scraping and managed data acquisition for data-product companies in the US, UK and Europe: 1,000+ websites monitored, 50 million records delivered, 5.0 average rating across 38 verified reviews on Clutch and GoodFirms. Reviewed by our data collection engineers. About us.