Skip to main content
Version: 3.1

Puppeteer with proxy

This example demonstrates how to load pages in headless Chrome / Puppeteer over Apify Proxy.

To make it work, you'll need an Apify account with access to the proxy. Visit the Apify platform introduction to find how to log into your account from the SDK.


To run this example on the Apify Platform, select the apify/actor-node-puppeteer-chrome image for your Dockerfile.

Run on
import { Actor } from 'apify';
import { PuppeteerCrawler } from 'crawlee';

await Actor.init();

// Proxy connection is automatically established in the Crawler
const proxyConfiguration = await Actor.createProxyConfiguration();

const crawler = new PuppeteerCrawler({
async requestHandler({ page }) {
const status = await page.$eval('td.status', (el) => el.textContent);
console.log(`Proxy Status: ${status}`);

console.log('Running Puppeteer script...');


console.log('Puppeteer closed.');

await Actor.exit();