Prompt

How do I use residential proxies with Puppeteer?

Technology / Data Infrastructure1 observationLast seen Jul 15, 2026

Latest observation

Jul 15, 2026OpenAI APIWeb search: off

To use a residential proxy with Puppeteer, you typically pass the proxy server when launching Chromium, then handle proxy authentication if required.

Basic example

const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch({
    headless: true,
    args: [
      '--proxy-server=http://proxy-host:proxy-port'
    ]
  });

  const page = await browser.newPage();

  // If your proxy needs username/password:
  await page.authenticate({
    username: 'proxy-username',
    password: 'proxy-password'
  });

  await page.goto('https://example.com', { waitUntil: 'networkidle2' });

  console.log(await page.title());

  await browser.close();
})();

Notes

1) Proxy format

  • HTTP proxy:
    --proxy-server=http://host:port
    
  • SOCKS5 proxy:
    --proxy-server=socks5://host:port
    

2) Authentication

If your residential proxy provider gives you credentials, use:

await page.authenticate({ username, password });

3) Per-page proxy

Puppeteer doesn’t support different proxies per page in the same browser instance out of the box. Common approaches are:

  • launch separate browser instances
  • use browser contexts with tools/libraries that support proxy routing
  • use a proxy rotation service upstream

4) Example with environment variables

const proxy = 'http://user:pass@proxy-host:proxy-port';

const browser = await puppeteer.launch({
  args: [`--proxy-server=${proxy}`]
});

Note: even if credentials are embedded in the proxy URL, Puppeteer/Chromium may still require page.authenticate() for some proxies.

Troubleshooting

  • Proxy not working: verify the proxy protocol matches the provider’s requirements.
  • Auth failed: make sure you call page.authenticate() before page.goto().
  • IP still unchanged: some providers require session parameters or specific gateway domains.
  • CAPTCHAs / blocks: residential proxies help, but don’t eliminate anti-bot detection.

If you want, I can also show:

  1. a rotating residential proxy setup, or
  2. a working Puppeteer script with Bright Data / Oxylabs / Smartproxy-style proxies.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.