By default, Screenshotly captures only the visible viewport. Set full_page to true to capture the entire scrollable page.
Basic usage
const screenshot = await client.capture({
url: 'https://example.com',
full_page: true
});
How it works
When full_page is true, the browser scrolls through the entire page and stitches the result into a single image. The viewport_width parameter still controls the viewport width used for rendering, but viewport_height is overridden by the actual page height.
Full-page screenshots can be significantly larger in file size and take longer to process than viewport-only captures.
For pages with lazy-loaded content, use the scroll options to ensure all content loads before capturing:
| Option | Type | Default | Description |
|---|
full_page_scroll | boolean | — | Scroll through the page before capturing |
full_page_scroll_delay | integer | 400 | Milliseconds to wait between scroll steps (0–5000) |
full_page_scroll_by | integer | — | Pixels to scroll per step (0–5000) |
full_page_max_height | integer | — | Maximum capture height in pixels (0–50000) |
curl -X POST https://api.screenshotly.dev/v1/capture \
-H "X-API-Key: $SCREENSHOTLY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/infinite-scroll",
"options": {
"full_page": true,
"full_page_scroll": true,
"full_page_scroll_delay": 500,
"full_page_max_height": 20000
}
}' \
--output screenshot.png
Combining with other options
Full-page captures work with all other parameters:
const screenshot = await client.capture({
url: 'https://example.com/long-article',
full_page: true,
format: 'jpeg',
viewport_width: 1440,
delay: 2000, // wait for lazy-loaded content
device_scale_factor: 2 // retina quality
});
If the page has lazy-loaded images or infinite scroll, enable full_page_scroll or use the delay parameter to ensure all content loads before capture. See delays and selectors.