> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oculusproxies.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Set Up Oculus Proxies With Puppeteer

> Learn how to integrate Oculus Proxies with Puppeteer to enhance your automation workflows. This guide will help you set up secure and anonymous proxy connections for efficient web scraping and data collection.

<img src="https://mintcdn.com/oculus/4CVh05wC6-hsrqWV/integration-guides/img/oculus_integrations/Puppeteer.png?fit=max&auto=format&n=4CVh05wC6-hsrqWV&q=85&s=535e66736d3b7b1a413f14862a754bd5" alt="title" width="720" height="200" data-path="integration-guides/img/oculus_integrations/Puppeteer.png" />

## What is Puppeteer?

**Puppeteer** is a Node.js library that provides a high-level API for controlling headless browsers, such as Google Chrome or Chromium, via the DevTools Protocol. It is widely used for tasks like web scraping, browser automation, and automated testing of web applications.&#x20;

<Tip>
  If you're using **Oculus** to access search engines like **Google, Bing, or Yandex** and facing connection issues, the proxy type could be the reason. **ISP Premium Proxies** ensure stable and unrestricted access, preventing blocks that standard proxies might encounter. Switching to **ISP Premium Proxies** can help maintain smooth and reliable performance.
</Tip>

## How to Integrate Oculus Proxies With Puppeteer

<Steps>
  <Step title="Install the Required Tools">
    1\. **Node.js**: Download and install it from [nodejs.org](https://nodejs.org/).

    2\. **Code Editor**: Use an editor like VS Code.

    3\. **Puppeteer Package**: Initialize a Node.js project and install Puppeteer by running:

    ```bash theme={null}
    npm install puppeteer
    ```
  </Step>

  <Step title="Access Your Oculus Proxy Credentials">
    1\. Log in to your [Oculus Dashboard](https://oculusproxies.com/dashboard/page/plans).

    2\. Locate and copy your proxy credentials: **Host, Port, Username, Password**.
  </Step>

  <Step title="Configure Puppeteer for Oculus Proxies">
    To integrate Oculus Proxies with Puppeteer, follow these steps:

    1\. Set the **proxy-server** argument in Puppeteer’s launch configuration, using this format: `host:port`.

    2\. Use Puppeteer’s **page.authenticate()** method to provide the proxy **username** and **password**.
  </Step>

  <Step title="Example Code">
    Use the following script to configure Puppeteer with Oculus Proxies:

    ```javascript theme={null}
    const puppeteer = require('puppeteer');

    (async () => {
      const browser = await puppeteer.launch({
        headless: false,  // Set to true for headless mode
        args: ['--proxy-server=[HOST]:[PORT]']
      });

      const page = await browser.newPage();

      // Provide Oculus proxy credentials for authentication
      await page.authenticate({
        username: '[USERNAME]',
        password: '[PASSWORD]'
      });

      // Test the proxy by navigating to a verification URL
      await page.goto('http://httpbin.org/ip');
      // Capture a screenshot to confirm the setup
      await page.screenshot({path: 'example.png'});

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

    <Tip>
      **For country-specific proxies, you can enter a format like `your-username-country-US` to receive a US exit node.**
    </Tip>
  </Step>
</Steps>

**That’s it!** You’ve successfully integrated **Oculus Proxies** with **Puppeteer**. Now you can securely automate web scraping, data collection, and browser testing while maintaining anonymity and minimizing detection risks.
