> ## 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 Node-fetch

> Take your backend requests to the next level! Integrating Oculus Proxies with Node-fetch ensures consistent, secure connections that bypass security filters.

## What is Node-fetch?

**Node-fetch** is a minimal wrapper that brings the browser-standard `window.fetch` API to Node.js. It is favored by developers who want consistency between frontend and backend code. **Oculus Proxies** are essential because Node-fetch lacks the complex header-handling of a full browser; rotating IPs helps bypass basic security filters that flag repetitive headless requests.

<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 Node-fetch

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

    ```
    npm install node-fetch https-proxy-agent
    ```
  </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 `proxyAgent`.

    ```javascript theme={null}
    const fetch = require('node-fetch');
    const { HttpsProxyAgent } = require('https-proxy-agent');

    const proxyAgent = new HttpsProxyAgent('http://USERNAME:PASSWORD@proxy.oculus-proxy.com:PORT');

    async function checkIP() {
    const response = await fetch('http://httpbin.org/ip', { agent: proxyAgent });
    const body = await response.text();
    console.log('IP via node-fetch:', body);
    }
    checkIP();
    ```
  </Step>
</Steps>
