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

# JavaScript Rendering

> Site Unblocker JavaScript Rendering

If the page you intend to scrape necessitates the execution of JavaScript in order to dynamically load all the necessary data, you may enable JavaScript rendering without the need to use a headless browser.

#### Receive rendered page content in HTML

<CodeGroup>
  ```shellscript cURL theme={null}
  curl -k -v -x unblock.decodo.com:60000 \
  -U "USERNAME:PASSWORD" "https://ip.decodo.com/" \
  -H "X-SU-Headless: html"
  ```

  ```python Python theme={null}
  import requests

  proxies = {
      'http': 'http://USERNAME:PASSWORD@unblock.decodo.com:60000',
      'https': 'http://USERNAME:PASSWORD@unblock.decodo.com:60000'
  }

  headers= {
     "X-SU-Headless": "html"
  }

  response = requests.request(
      'GET',
      'https://ip.decodo.com/',
      verify=False,
      proxies=proxies,
      headers=headers
  )

  print(response.text)
  ```

  ```javascript Node.js theme={null}
  import fetch from 'node-fetch';
  import createHttpsProxyAgent from 'https-proxy-agent'

  const username = 'YOUR_USERNAME';
  const password = 'YOUR_PASSWORD';

  const agent = createHttpsProxyAgent(
    `http://${username}:${password}@unblock.decodo.com:60000`
  );

  process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0;

  const headers = {
   	'X-SU-Headless': 'html'
  }

  const response = await fetch('https://ip.decodo.com/', {
    method: 'get',
    headers: headers,
    agent: agent
  });

  console.log(await response.text());
  ```
</CodeGroup>

#### Receive rendered page content as PNG

The response will contain raw bytes of an image that can be saved in PNG format

<CodeGroup>
  ```shellscript cURL theme={null}
  curl -k -v -x unblock.decodo.com:60000 \
  -U "USERNAME:PASSWORD" "https://ip.decodo.com/" \
  -H "X-SU-Headless: png"
  ```

  ```python Python theme={null}
  import requests

  proxies = {
      'http': 'http://USERNAME:PASSWORD@unblock.decodo.com:60000',
      'https': 'http://USERNAME:PASSWORD@unblock.decodo.com:60000'
  }

  headers= {
     "X-SU-Headless": "png"
  }

  response = requests.request(
      'GET',
      'https://ip.decodo.com/',
      verify=False,
      proxies=proxies,
      headers=headers
  )

  print(response.text)
  ```

  ```javascript Node.js theme={null}
  import fetch from 'node-fetch';
  import createHttpsProxyAgent from 'https-proxy-agent'

  const username = 'YOUR_USERNAME';
  const password = 'YOUR_PASSWORD';

  const agent = createHttpsProxyAgent(
    `http://${username}:${password}@unblock.decodo.com:60000`
  );

  process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0;

  const headers = {
   	'X-SU-Headless': 'png'
  }

  const response = await fetch('https://ip.decodo.com/', {
    method: 'get',
    headers: headers,
    agent: agent
  });

  console.log(await response.text());
  ```
</CodeGroup>

***

<Columns cols={2}>
  <Card title="Support" href="https://direct.lc.chat/12092754" cta="Let's chat!">
    Need help or just want to say hello? Our support is available 24/7. \
    You can also reach us anytime via email at [support@decodo.com](mailto:support@decodo.com).
  </Card>

  <Card title="Feedback" href="mailto:feedback@decodo.com" cta="Share feedback">
    Can't find what you're looking for? Request an article! \
    Have feedback? Share your thoughts on how we can improve.
  </Card>
</Columns>
