Playwright drives a real browser, but every page it loads still leaves from your machine's IP. Run many contexts from one server and the site sees one address doing the work of many visitors. The usual reply is HTTP 429 Too Many Requests — the server telling you to slow down — or a block.
Proxy support is built in. You can set one proxy for the whole browser or a separate proxy for each browser context, so parallel workers leave through different IPs. Playwright documents the username and password fields for HTTP proxies.
Use HTTP for password-protected proxies in Chromium. Chrome supports no authentication method for SOCKS5 and won't use credentials written into proxy settings, so a socks5:// server with a password fails in Chromium even though Playwright accepts socks5:// addresses.
Scroll horizontally with the arrow keys to read all content.
Recommended Playwright setup
Criterion
Choose
Why
Product
Static datacenter proxy
Fastest and cheapest per IP, fixed for the whole term — right for test runs, CI and sites that accept server IPs
If the site blocks servers
Rotating residential, Budget line
Real household IPs from US$1.50/GB; you pay for traffic, not per IP
How many IPs
One per parallel worker (browser context)
Workers stop sharing one address and one rate limit
Country
Where your users are: US, CA, GB, DE, NL, JP, KR or SG for datacenter
Sites that adapt to location show each country its own version
Protocol
HTTP
Chromium can't send a SOCKS5 password; HTTP authenticates in every Playwright browser
IP changes
Datacenter: never during the term
Renew in My assets to keep the same IP
The button below opens Static Datacenter Proxies with the AI and automation use case. Choose Region, Term, Protocol and Quantity (up to 100 IPs at a time) before you pay.
The button below opens Static Datacenter Proxies (Per IP and term) with the AI and automation use case. Under Connection settings pick the Region, choose a Term and set Protocol to HTTP. Set Quantity to the number of IPs you need (one for each parallel worker, up to 100 at a time). Then click Review cost and generate.
Copy each IP
In My assets, Copy gives a ready line in host:port:user:password form. Put host and port in PROXY_HOST and PROXY_PORT, user and password in PROXY_USER and PROXY_PASS — environment variables keep the password out of your code.
Add the proxy to Playwright
Use the code below. A proxy on newContext() gives each worker its own IP; a proxy on launch() applies one IP to the whole browser. The server must be http://host:port.
Check the exit IP
The script opens api.ipify.org and prints the IP the site sees.
Expected result The printed IP is the proxy's address, not your server's.
If a site blocks datacenter IPs
Open Rotating Residential Proxies instead: set Line to Budget, use Add traffic to buy a package (from 1 GB), then set Exit mode to Global rotation for new exits on new connections, or to Choose region / sticky IP to stay in one country or city. Rotating residential connects through proxy.proxy302.com:2222 for HTTP.
Playwright proxy with username and password (Node.js)
Scroll horizontally with the arrow keys to read all content.
// npm i playwright then npx playwright install chromium
import { chromium } from 'playwright'
// From Proxy302 → My assets → Copy (host:port:user:password)
const { PROXY_HOST, PROXY_PORT, PROXY_USER, PROXY_PASS } = process.env
const browser = await chromium.launch()
// One proxy per browser context: each parallel worker gets its own exit IP
const context = await browser.newContext({
proxy: {
server: `http://${PROXY_HOST}:${PROXY_PORT}`, // HTTP: Chromium can't send a SOCKS5 password
username: PROXY_USER,
password: PROXY_PASS,
},
})
const page = await context.newPage()
await page.goto('https://api.ipify.org?format=json')
console.log(await page.textContent('body')) // {"ip":"..."}: the proxy's exit IP, not your server's
await browser.close()
Checked on 2026-10-18 with Playwright 1.63.0 and Chromium 153 against a local password-protected proxy: the right credentials loaded the page, a wrong password loaded nothing. Swap the IP-check URL for your target.
Check Do the username and password match the line in My assets? In Chromium, does the server start with http:// rather than socks5://?
Fix Copy the line again and paste host:port into server and the other two parts into username and password. These fields don't need URL encoding.
The page still shows your server's IP
Check Is the proxy set on the context that opened the page? Is the host listed in bypass?
Fix Set proxy on that newContext() (or on launch()) and remove the host from bypass.
Timeouts or net::ERR_PROXY_CONNECTION_FAILED
Check Is the IP active and unexpired in My assets? Does curl -x http://USER:PASS@HOST:PORT https://api.ipify.org work from the same machine?
Fix Renew or replace the IP. If curl fails too, the machine can't reach the proxy — check its firewall or outbound rules.
429s or a challenge page after a while
Check Are several contexts sharing one IP? How fast are pages loading?
Fix Give each context its own IP, slow down, or move that site to rotating residential.
Playwright proxy FAQ
How do I set a proxy in Playwright?
Use the proxy option with server, username and password — in launch() for the whole browser or in newContext() for one context. It works the same way in Node.js, Python, Java and .NET.
Open a new context with a different proxy for each worker or session. With rotating residential and Exit mode set to Global rotation, new connections can leave through new exits; for a proxy held in one region, Rotate in My assets changes its IP.
Residential or datacenter for Playwright?
Datacenter when the site accepts server IPs — it's the fastest and cheapest per IP. Rotating residential when the site blocks or keeps challenging server IPs.
Can npx playwright install download browsers through a proxy?
Yes. Playwright documents installing behind a proxy: set HTTPS_PROXY to your proxy URL before running npx playwright install.
Selenium proxy with username and password in Chrome: HTTP proxy in ChromeOptions plus Selenium's BiDi auth handler, no extensions. Static datacenter IPs for test runs.
Geo proxies for testing: see your website as visitors in other countries and cities see it — prices, language, banners — with matching locale and time zone.
Fast datacenter proxies with fixed IPs, low latency and high concurrency — the lowest cost per IP for APIs, testing and bulk jobs. Pick the country; pay per IP and term.
Rotating residential per-GB prices as published on the pricing page and used by the console (Budget US$1.50/GB, US$1.35/GB in the 100 GB package; Premium US$5.00/GB; 1 PTC = US$1). Static ISP and datacenter IPs are quoted live per IP and term.
Option names, billing modes and limits as shown in the live console on 2026-10-18: Line (Premium/Budget), Exit mode, Region, State, City, Protocol (HTTP/SOCKS5), Quantity (1–500), Term, Auto-renew IP (not yet available), My assets → Copy / Rotate / Renew / Copy for AI. Rotating residential connects through proxy.proxy302.com:2222 (HTTP) and :3333 (SOCKS5). Static datacenter IPs were sold in 8 countries on 2026-10-18 (read-only check of the production catalogue): US, CA, GB, DE, NL, JP, KR, SG.
Local proxy fixture run
Local example · Checked:
The code block was executed on 2026-10-18 against a local password-protected HTTP proxy that answers 407 without valid credentials; Playwright 1.63.0 with Chromium 153: the right credentials loaded the page through the proxy, a wrong password loaded nothing.
A local check proves the configuration syntax and authentication path, not access to any specific website, country or platform.
Ready to connect?
Create an account, top up once and pick rotating residential, static ISP or datacenter. Rotating residential exits cover 195+ countries and regions.