Puppeteer proxy integration

Test Puppeteer Proxy Integration with Bright Data

Learn how to setup your Puppeteer proxy settings and integrate with Bright Data’s Proxy IPs.

Puppeteer is a Node library created to control headless and non-headless Chrome and Chromium with its high-level API.

New Bright Data product: Scraping Browser

Puppeteer Compatible
Easily make an API call to fetch any number of browser sessions and interact with them using Puppeteer (Python) or Playwright (Node.js) over a CDP protocol. Ideal for scraping projects that require website interactions to retrieve data, like hovering over a page, clicking buttons, scrolling, adding text, etc.

Bright Data Super Proxy and Puppeteer Integration

  • Begin by going to your Bright Data Dashboard and clicking ‘create a Zone’.
  • Choose ‘Network type’ and click save.
  • Within Puppeteer fill in the ‘Proxy IP:Port’ in the ‘proxy-server’ value, for example zproxy.lum-superproxy.io:22225.
  • Under ‘page.authenticate’ input your Bright Data account ID and proxy Zone name in the ‘username’ value, for example: lum-customer-CUSTOMER-zone-YOURZONE and your Zone password found in the Zone settings.
  • For example:
const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch({
    headless: false,
    args: ['--proxy-server=zproxy.lum-superproxy.io:22225']
  });
  const page = await browser.newPage();
    await page.authenticate({
        username: 'lum-customer-USERNAME-zone-YOURZONE',
        password: 'PASSWORD'
    });
    await page.goto('http://lumtest.com/myip.json');
    await page.screenshot({path: 'example.png'});
    await browser.close();
})();

Proxy Manager and Puppeteer Integration

  • Create a Zone with the network, IP type, and number of IPs you wish to use.
  • Install the Proxy Manager.
  • Click ‘add new proxy’ and choose the Zone and settings you require, click ‘save’.
  • In Puppeteer, under the ‘proxy-server’, input your local IP and Proxy Manager port (i.e. 127.0.0.1:24000)
    • The local host IP is 127.0.0.1
    • The port created in the Proxy Manager is 24XXX, for example, 24000
  • Leave the username and password values empty, as the Bright Data Proxy Manager has already been authenticated with the Super Proxy.
  • For example:
const puppeteer = require('puppeteer');

(async () => {
    const browser = await puppeteer.launch({
        headless: false,
        args: ['--proxy-server=127.0.0.1:24000']
    });
    const page = await browser.newPage();
    await page.authenticate();
    await page.goto('http://lumtest.com/myip.json');
    await page.screenshot({path: 'example.png'});
    await browser.close();
})();

About Bright Data proxies:

Residential proxies: With over 72 million real IPs from 195 countries, Bright Data’s residential proxies enable you to access any website content regardless of location, while avoiding IP bans and CAPTCHAs.

ISP proxies: With over 700,000 ISP IPs, leverage real static IPs from any city in the world, assigned by ISPs and leased to Bright Data for your exclusive use, for as long as you require.

Datacenter proxies: With over 770,000 datacenter IPs, Bright Data’s datacenter proxy network is built of multiple IP types across the world, in a shared IP pool or for individual purchase.

Mobile proxies: With over 7 million mobile IPs, Bright Data’s advanced Mobile IP Network offers the fastest and largest real-peer 3G/4G/5G IPs network in the world.

Bright Data’s top proxy locations

United States flag

4,921,536
IPs

UK flag

1,812,091
IPs

Germany flag

1,310,111
IPs

2,105,246
IPs

France flag

558,960
IPs

China flag

1,126,622
IPs

Canada flag

449,816
IPs

Spain flag

584,729
IPs

Russia flag

3,213,676
IPs

Japan flag

340,217
IPs

South Korea flag

205,654
IPs

India flag

5,486,965
IPs