Playwright Proxies

Rotating Proxies for Playwright & Puppeteer

Both Playwright and Puppeteer support proxy authentication natively, so Proxy Rotator drops in with a few lines. Get a fresh IP per request from a 100M+ pool of residential, datacenter, mobile and IPv6 proxies, with no extra packages and no auth popups to handle.

Plans from $24.95/mo   New IP per request   HTTPS & SOCKS5

Rotating & sticky Residential, datacenter, mobile, IPv6 HTTPS & SOCKS5 City & country targeting User:pass or IP whitelist
Why Proxy Rotator

Why Proxy Rotator for Playwright & Puppeteer

Headless browser automation needs IPs that look real and rotate cleanly. The gateway does the rotation for you.

New IP per request

The gateway picks a fresh exit IP for each request, so your headless sessions blend into normal traffic.

Rotating or sticky

Hold one IP through a multi-step flow with a sticky session, or rotate for high-volume collection.

All proxy types

Residential, datacenter, mobile and IPv6 in one pool, switchable from your dashboard with no code change.

Native proxy auth

Playwright takes username and password in launch(); Puppeteer uses page.authenticate(). No extra packages.

City & country targeting

Render localized pages by targeting a country, and a city on residential IPs.

Built to scale

Thread-based plans handle many concurrent browser contexts, from small jobs to production workloads.

Before you start

Prerequisites

  • An active Proxy Rotator plan (from $24.95/mo).
  • Your gateway host and port: gateway.proxyrotator.com:8080.
  • Your gateway username and password, or a whitelisted server IP, from your dashboard. See the rotating proxy API for endpoint details.
  • Playwright (pip install playwright) or Puppeteer (npm i puppeteer).

Throughout this guide, replace USER:PASS with your real gateway credentials.

Setup

Add Proxy Rotator to Playwright & Puppeteer

Both frameworks support authenticated proxies natively, so user:pass needs no workaround.

Playwright (Python) with user:pass

Pass the gateway server, username and password in the proxy option of launch(). Playwright sends the credentials for you.

playwright_app.py
from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch(
        proxy={
            "server":   "http://gateway.proxyrotator.com:8080",
            "username": "USER",
            "password": "PASS",
        }
    )
    page = browser.new_page()
    page.goto("https://api.ipify.org")
    print(page.inner_text("body"))  # exit IP
    browser.close()

Puppeteer (Node) with user:pass

Puppeteer sets the proxy server on launch, then authenticates per page with page.authenticate().

puppeteer_app.js
import puppeteer from "puppeteer";

const browser = await puppeteer.launch({
  args: ["--proxy-server=gateway.proxyrotator.com:8080"],
});
const page = await browser.newPage();
await page.authenticate({ username: "USER", password: "PASS" });

await page.goto("https://api.ipify.org");
console.log(await page.evaluate(() => document.body.innerText)); // exit IP
await browser.close();

IP whitelist auth (fallback)

Prefer not to embed credentials? Whitelist your server IP in the dashboard, then drop the username and password. The gateway authorizes your IP directly.

whitelist (Playwright / Puppeteer)
# Playwright
browser = p.chromium.launch(
    proxy={"server": "http://gateway.proxyrotator.com:8080"}
)

// Puppeteer
const browser = await puppeteer.launch({
  args: ["--proxy-server=gateway.proxyrotator.com:8080"],
});
// no page.authenticate() needed when IP is whitelisted
Verify

Verify it works

Confirm the gateway is reachable and rotating from the command line before launching a browser.

cURL
curl -x http://USER:PASS@gateway.proxyrotator.com:8080 https://api.ipify.org
# run it again, you get a different IP

A different IP on each run confirms your credentials work and the gateway is rotating.

Rotating vs sticky for Playwright & Puppeteer

For headless flows that span a login and several navigations, sticky proxies keep the same IP across the session. For broad collection where each context can come from a different IP, use rotating proxies and let the gateway hand out a new IP per request. Switch between them from your dashboard without changing your launch code.

FAQ

Playwright & Puppeteer proxy FAQ

Do Playwright and Puppeteer support proxy username and password?
Yes. Playwright takes username and password in the proxy option of launch(), and Puppeteer authenticates per page with page.authenticate(). No extra packages or workarounds are needed.
Which plan do I need for Playwright or Puppeteer?
Any Proxy Rotator plan works. Plans start at $24.95/mo and scale with how many concurrent browser contexts you run. See pricing.
Do you support SOCKS5 with Playwright and Puppeteer?
Yes. The gateway supports HTTPS and SOCKS5. Point the server option at the SOCKS endpoint shown in your dashboard.
How do I authenticate without credentials in code?
Whitelist your server IP in the dashboard, then pass only the server and drop the username and password. The gateway authorizes requests by IP.
Can I keep the same IP across a browser session?
Yes. Use a sticky proxy to hold one IP through a multi-step flow, then switch back to rotating for broad crawls.
Playwright cannot change a proxy mid-context, so how do I rotate IPs without relaunching?
Point the context proxy at gateway.proxyrotator.com:8080 and the gateway rotates the exit IP per request automatically, so you never relaunch to get a new IP. Use a sticky session instead when a flow like a login or checkout must keep one IP.
Can I give each Playwright BrowserContext its own rotating IP for parallel scraping?
Yes. Create multiple BrowserContexts in one browser, each configured with the gateway, and every context draws independent rotating IPs from the pool, giving each context a clean IP while running in parallel.
How do I authenticate when Playwright does not support authenticated SOCKS5?
Use the HTTPS endpoint with username:password in Playwright's proxy option, since Playwright supports user:pass over HTTP and HTTPS but not over SOCKS5. In Puppeteer, pass the same credentials via page.authenticate(), or whitelist your IP and omit credentials entirely.

Run Playwright and Puppeteer on rotating proxies

Create an account, grab your gateway credentials, and drive headless browsers through a 100M+ IP pool. Plans from $24.95/mo.

Copied!