Website portfolios
Show a landing page from its headline through the details below the fold.
Scrolling Screenshots API
Send a URL and a scroll action. The API records the page scrolling in headless Chrome, scroll-triggered animations included, and returns a hosted MP4, WebM, or GIF URL.
Scrolling screenshot API
simple_scroll moves down 90% of the viewport at a time and pauses 400 ms between scrolls. It stops at the bottom of the page or when duration_ms runs out, so you don't have to measure the page.
The default duration_mode, at_most, ends the recording when scrolling finishes instead of waiting out duration_ms.
viewport_width and viewport_height set the browser size the page is laid out and recorded at.
Recording actions
Actions run in order while the page is recorded: scroll, click, run JavaScript, wait. A locate_selector action branches on whether an element is on the page.
if_found and if_not_found are each an array of actions. This clicks .show-details when it exists and moves on when it doesn't.
{
"type": "locate_selector",
"selector": ".show-details",
"if_found": [
{ "type": "click", "selector": ".show-details" }
],
"if_not_found": []
}Each step has its own target, duration, and easing. This one takes two seconds to reach #features.
{
"type": "scroll",
"steps": [{
"to": { "type": "selector", "selector": "#features" },
"duration_ms": 2000,
"easing": "ease_in_out_cubic"
}]
}The script is an async function body. The next action waits until it finishes, including anything it awaits.
{
"type": "execute_javascript",
"script": "document.querySelector('#features').classList.add('highlight');",
"timeout_ms": 1000
}A stall can go anywhere in the sequence. This one keeps the highlighted section on screen for one second before the recording ends.
{ "type": "stall", "duration_ms": 1000 }Use cases
Show a landing page from its headline through the details below the fold.
Combine scrolling with clicks and pauses to demonstrate a feature or interaction.
Generate a moving preview for a directory, launch announcement, or customer presentation.
Common questions
What gets recorded, where scrolling stops, and what happens to lazy-loaded content.
No. It's a video or GIF of the page scrolling. For one still image of the whole page, use full-page URL screenshots.
Not always. simple_scroll stops at the bottom or when duration_ms runs out. For a long page, raise duration_ms (up to 30 seconds), shorten ms_between_scrolls, or write your own scroll steps.
They're loaded first. Before recording starts, the page is scrolled once so lazy content is already there. Set skip_scroll_preload to true if you want the recording to show content loading as it scrolls.
Ready to record?
Paste a URL into the scrolling screenshot tool to see the result, then send the same request from your code.
Related features
Learn about related options for image and PDF generation, storage, security, and team access.