Integration-PDF API – Fast and Affordable Document Generation-screenshot-to-png

Website Screenshot

Use CustomJS to take full-page website screenshots and save them as PNG images through API or automation.


Reponse Type

Make sure that the response type is set to PNG.

CustomJS Code

const { SCREENSHOT } = require('./utils'); 

return SCREENSHOT(input.url);

Execution via API request

Passing the Website as a URL

This demonstrates how to capture a screenshot from a given website URL:

curl -X POST https://e.customjs.io/zeXXXy \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY_HERE" \
  -d '{
    "url": "https://www.google.de"
  }' --output screenshot.png