Puppeteer Proxies 101: How to Use Proxies in Puppeteer

Are you looking for the best proxies for Puppeteer? Then you are on the right page as we would be describing some of the best proxies for Puppeteer and how to integrate them into the bots you created using Puppeteer.

Proxies for Puppeteer


Overview of Puppeteer Proxies


  • Bright Data: 72+ million IPs in Pool – <Starts from $300 for 20GB | $15 per GB> – Best Proxies for Puppeteer
  • Soax: 5+ million IPs in Pool – <Starts from $75 per 5GB | $15 Per GB> – Clean proxy pool alternative
  • Smartproxy: 40+ million IPs in Pool – <Starts from $75 per 5GB | $15 Per GB> – Best in terms of speed
  • Shifter: 31+ million IPs in Pool – <Starts from $249 for 10 ports | $25 per port> – Best Unlimited Bandwidth Proxies
  • Proxyrack: 2+ million IPs in Pool – <Starts from $80 for 100 threads | $0.80 per thread>- Unmetered Bandwidth and no Limit to Number of IPs you can use

Proxies are incredibly versatile in terms of tools you can use them for. They are flexible and have support for a good number of already-made client applications. Interestingly, most libraries meant for programmers to develop custom client applications do have support for proxies if they will have Internet connectivity support. Our focus in this article will be the Puppeteer library which is quite popular among Node.JS developers whose tasks involve automating browsers.

The tool does support the use of proxies by default, just like every other tool of its likes. However, it does not provide you the proxies – you will have to add the proxies yourself. When it comes to proxies for Puppeteer, there is a lot of options available to you. This is because the tool itself does not restrict you to certain proxies. You can use mobile proxies, residential proxies, and even datacenter proxies, and it will integrate with the tool.

However, the choice of proxies is dependent on your task and target site. So, we would be recommending proxies that you can use for most tasks you carry out using Puppeteer. Before going into that in detail, let take a look at what Puppeteer is and why you need proxies for it.


What is Puppeteer?

YouTube video

Puppeteer is a Node library that provides a high-level API to control Chrome or Chromium over the DevTools Protocol. If the definition sounds complicated to you, all it means is that Puppeteer is a library for automating the Chrome browser.

The tool works in headless mode by default, which means that you can automate Chrome using Puppeteer and Node.JS without the Chrome UI appearing. However, it does have support for the non-headless, which in most cases, would be required as at the time you are developing your script for debugging purposes.

The Puppeteer library is an alternative but is more specialized, focusing only on Node.js and Chrome. What can you do with Puppeteer? Well, if you read the above, you will see that the library is for automating Chrome – what you do with that power is up to you.

Basically, you can do most things you do manually in the browser using Puppeteer.  Some of the things you can do with this tool include web scraping and crawling both regular websites as well as heavily Ajaxified websites such as Single-Page Applications (SPA).

You can use it to generate screenshots and PDFs for pages, test Chrome extensions and website UIs, and automate form submission, and do other tasks you do that are repetitive. You can even use it to develop a full-fledged bot with all of the features you want. Aside from the main Puppeteer library, there is the puppeteer-core that is the lightweight version and does not download any browser by default.


Why Use Proxies for Puppeteer?

It might interest you to know that proxies are not a requirement for using Puppeteer. You can use Puppeteer without proxies to develop your bot and put it to work – until it gets blocked – if you send too many requests to your target site. So why would you need proxies for Puppeteer?

  • Hide IP Footprint While Botting

Hide IP Footprint While Botting

Bots are easily identified because of the too many requests they send within a short period of time which is impracticable for humans to replicate. I use the word bot because that is what most developers develop using Puppeteer.

Without using proxies, all of the requests would have the same IP address and, as such, revealing IP to be controlled by a bot and thus, blocking the IP since most web services do not like bot access or traffic. With rotating proxies, your IP gets changed frequently, thereby making it difficult for web services to use IP tracking to identify and block your bot.

  • Giving your Bot Ability to Access Geo-Targeted Content

Access Geo-Targeted Content

Puppeteer is nothing but a library for automating Chrome and does not help in accessing geo-targeted content. The web content you have access to without using proxies is the content targeted to all web users and web users from your location. If you have an interest in accessing data meant for users in other locations, as in the case of scraping SERP for keywords for other locations, then that is the duty of proxies.

It is important you know that for this, you must make use of proxies with IPs from the location you want to access content for. This is because web services use IP addresses to determine users’ location.


Best Proxies for Puppeteer

The best proxies for Puppeteer are residential proxies. This is because they are undetectable and most residential proxy networks offer rotating proxy ports, making it possible to automatically rotate IP addresses to avoid exceeding request limits that would lead to blocks.

Also important is the fact that many residential proxy networks have got support for multiple locations and good location targeting features which make them perfect for accessing localized content. Below are some of the residential proxy providers you can buy residential proxies to use together with your Puppeteer application.


Bright Data

Bright Data - Luminati

  • IP Pool Size: Over 72 million
  • Locations: All countries in the world
  • Concurrency Allowed: Unlimited
  • Bandwidth Allowed: Starts at 20GB
  • Cost: Starts from $300 monthly for 20GB

brightdata residential network

Bright Data is arguably the best residential proxy network in the market. Its residential proxies are perfect for use with Puppeteer. With proxies from this provider, web scraping becomes easy. This is because the proxies are undetectable and good for web scraping and other forms of botting. The proxy pool provided by Bright Data formerly Luminati is the largest in the market, with over 72 million IP addresses in it, Learn how to use Luminati proxy network here.

In terms of location support, this service also is the best with proxies from every country and region in the world, making accessing geo-targeted content possible. The service also has sticky proxies and is one of the best session management supports in the market. Its pricing is based on bandwidth, and the smallest plan goes for $300 monthly.


Soax

Soax Logo for all proxy

  • IP Pool Size: Over 5 million
  • Locations: Over 100 countries across the globe
  • Concurrency Allowed: Unlimited
  • Bandwidth Allowed: Starts at 5GB
  • Cost: Starts from $75 monthly for 5GB

Soax Overview

Soax is a proxy service that offers residential proxies you can use as Puppeteer proxies. Soax has proven to be a force to reckon with even though it is the newest provider on the list. The service made its debut in the market only recently, but it has been able to develop itself into becoming one of the best.

Its proxy pool with over 5 million IP addresses is one of the cleanest as it regularly checks the pool in other to remove bad IPs. In terms of location support, you can get proxies from over 100 countries from this provider. One thing you will come to like about Soax is its affordability, which makes it perfect for those with a small budget.  All you need is $75 to get started.


Smartproxy

smartproxy image logo

  • IP Pool Size: Over 40 million
  • Locations: 195 locations across the globe
  • Concurrency Allowed: Unlimited
  • Bandwidth Allowed: Starts at 5GB
  • Cost: Starts from $75 monthly for 5GB

smartproxy

Smartproxy is a premium proxy provider that caters to both small and big marketers. The feature I like about Smartproxy is its speed which is one of the best in the residential proxy market. Smartproxy has got one of the largest proxy pools, with over 40 million IP addresses in its pool sourced from over 195 locations across the globe.

Aside from the fact that Smartproxy residential proxies are fast, they are quite reliable, stable, and compatible for use with all popular websites on the Internet. The proxies are rotating proxies, but they do have support for sticky IPs, making them the perfect proxy provider for Puppeteer. Pricing is the same as Soax, and it can be argued that Smartproxy’s pricing is what inspired Soax proxy pricing.


Shifter

Shifter Logo

  • IP Pool Size: Over 31 million
  • Locations: 130 countries
  • Concurrency Allowed: Unlimited
  • Cost: Starts at $249.99 monthly for 10 ports

Shifter network

Shifter backconnect residential proxies are some of the best for Puppeteer. If the proxies you require are socks proxies, then we would recommend Shifter as the go-to provider for such – it also offers HTTP(S) proxies in conjunction with the socks proxies. Another feature that will make you want to make use of Shifter is it proxies come with unlimited bandwidth support.IP rotation for Shifter, just like the others above, is automatic.

However, unlike the others, IP rotation is time-based and done after every 5 minutes. The proxy pool owned by Shifter is quite large, with over 31 million IPs in it. It has got support for over 100 locations, and pricing can be said to be moderate.


Proxyrack

ProxyRack Logo

  • IP Pool Size: Over 2 million
  • Locations: 140 countries
  • Concurrency Allowed: Unlimited
  • Cost: Starts from $199 for 100 threads

Proxyrack Overview

The Proxyrack proxies are also some of the proxies you can use for Puppeteer. We recommend you make use of the Proxyrack unmetered residential proxies. These proxies allow you to enjoy unlimited bandwidth and as many IP addresses as you like from its pool of over 2 million IP addresses, making it unique on the list – providing you the best of Shifter (unlimited bandwidth and IPs (Bright Data).

For this provider, pricing is based on the number of threads. The smallest plan is sold for $199 and comes with 100 threads which are enough for many botting needs. The service offers both rotating and sticky proxies, making them perfect for developing web scrapers or account management bots using Puppeteer. This service offers socks proxies together with HTTPS proxies.


How to Setup Proxies for Puppeteer

It is one thing to know the best proxies to use for Puppeteer; it is another for you to know how to set up the proxies, especially since some of the proxies support only username and password authentication.

In this section of the article, we will be showing you how to set up your Puppeteer-driven application to use proxies.

  • The first is obvious – you should have Node.JS installed on your computer. If you do not, you should visit the download page of Node.JS to follow the installation.

Note Js Homepage

  • You also need to have the Puppeteer application installed. To install Puppeteer, if you do not have it already installed, read this guide to learn how to get it done.

Puppeteer overview

  • Go to the user dashboard, and of the proxy provider you bought proxies from and write down the proxy address, port, username, and password.
  • We would be using the Puppeteer application to open whatismyipaddress.com, which is a website that reveals your IP address if you visit it. I will advise you to visit the site now without setting up proxies and write down your IP address so that you can compare it with the IP address when you have proxies configured in your script.

WhatismyIPAddress Homepage

  • Create a new Node.JS application and in the script, enter the code below.
const puppeteer = require('puppeteer');


async function run() {

const browser = await puppeteer.launch({

headless: false,

args: [ '--proxy-server=200.73.128.156:3128' ]

  });

const page = await browser.newPage();


constpageUrl = 'https://whatismyipaddress.com/';


awaitpage.goto(pageUrl);

awaitpage.setExtraHTTPHeaders({

    'Proxy-Authorization': 'Basic ' + Buffer.from('user:pass').toString('base64'),

}

run();
  • Make sure you replace the proxy server and port with the proxy address and port you wrote down earlier. In the second to the last line above, you should also replace user:pass with the username and password you wrote down.
  • Launch the script, and you will see that Chrome is launched and opens the IP look-up website, revealing the IP address of the proxy server you are using instead of your real IP address.

Conclusion

While most Puppeteer tutorials you will see online do not talk about proxies as if they are not needed. The reality on the ground is that many of the tasks you will need Puppeteer for would require proxies, especially if it has to do with accessing web services that you do not own – and the service does have anti-spam systems for bot detection and blockage.

While Puppeteer does not force you to use proxies from specific providers, the above are some of the best providers you can buy proxies for Puppeteer from and how to integrate the proxies with Puppeteer.


Read more,

Popular Proxy Resources