> ## 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 Use Oculus Proxies With Nightmare.js

> Maximize your browser automation by integrating Oculus Proxies with Nightmare.js to bypass per-IP session limits and maintain anonymous, dynamic interactions.

## What is Nightmare.js?

**Nightmare.js** is a high-level browser automation library built on Electron. It provides a simple "human-readable" API to interact with pages. **Oculus Proxies** are necessary to bypass "Per-IP" session limits on dynamic sites where the site tracks how many accounts or searches are active from a single connection.

<Tip>
  If you're using **Oculus** to scrape search engines like **Google, Bing, or Yandex** and facing connection issues, your proxy type may need adjustment. **ISP Premium Proxies** provide stable and unrestricted access, preventing blocks that standard proxies may encounter. Switching to **ISP Premium Proxies** can improve performance.
</Tip>

## How to Use Oculus Proxies With Nightmare.js

<Steps>
  <Step title="Install package">
    Install via cmd:

    ```
    npm install nightmare
    ```
  </Step>

  <Step title="Example code">
    Use the following code as an example for Nightmare.js. Make sure to replace the correct proxy credentials from your [dashboard](https://oculusproxies.com/dashboard/) inside `nightmare`.

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

    const nightmare = Nightmare({
      switches: { 'proxy-server': 'proxy.oculus-proxy.com:PORT' }
    });

    nightmare
      .authenticate('USERNAME', 'PASSWORD')
      .goto('http://httpbin.org/ip')
      .evaluate(() => document.body.innerText)
      .end()
      .then(console.log);
    ```
  </Step>
</Steps>
