Using Proxies with Puppeteer or Playwright

We make it very easy to use your own or third-party proxies with our service.

Simply pass a ?proxy= parameter to configure our browsers with the proxy you specified.

For a simple example (without proxy authentication), see below:

const puppeteer = require('puppeteer')

const browser = await puppeteer.connect({
    browserWSEndpoint: 'wss://[YOUR-TOKEN]&proxy=https://myproxy.local:3333'

const page = await browser.newPage()
await page.goto('')
const pw = require('playwright')

(async () => {
  const browser = await pw.chromium.connectOverCDP({
    wsEndpoint: 'wss://[YOUR-TOKEN]&proxy=https://myproxy.local:3333',

  const context = await browser.newContext()
  const page = await context.newPage()
  await page.goto('')
  await browser.close()

Proxy Authentication

To authenticate against the proxy you supplied, you can use 2 options:


You can authenticate against the proxy by setting a Proxy-Authorization header.
Important: the username and password you supply should be base64 encoded.

await page.setExtraHTTPHeaders({
    'Proxy-Authorization': 'Basic username:password',
    // or you can use:
    Authorization: 'Basic username:password',


This will instruct the browser to enter the username and password you supply in the input dialog requesting authentication.

await page.authenticate({
    username: 'username',
    password: 'password',

GeoLocation Proxies with Puppeteer/Playwright

HeadlessTesting makes it possible to use a geo-location proxy, which will change the IP address of the Puppeteer/Playwright script.

See our geolocation option for more information.