screenshotly-js package provides a convenient interface for the Screenshotly API in Node.js.
Installation
Setup
Capture a screenshot
Capture options
| Parameter | Type | Default | Description |
|---|---|---|---|
url | string | — | URL to capture (required) |
name | string | — | Optional name for the screenshot |
width | number | 1920 | Viewport width in pixels |
height | number | 1080 | Viewport height in pixels |
fullPage | boolean | false | Capture the full scrollable page |
format | string | 'png' | Output format: 'png', 'jpeg', 'webp' |
deviceScaleFactor | number | 1 | Device pixel ratio (2 for retina) |
isMobile | boolean | false | Emulate mobile device |
hasTouch | boolean | false | Enable touch events |
isLandscape | boolean | false | Landscape orientation |
waitForSelector | string | — | CSS selector to wait for |
delay | number | 0 | Delay in ms before capture |
timeout | number | 30000 | Request timeout in ms |

