Scrolling Screenshots API

Turn a scrolling webpage into a video or GIF

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.

  • MP4, WebM & GIF
  • Scroll and pause controls
  • Hosted recording URLs
Real API requests followed by their generated recordings.
Request
POST https://hcti.io/v1/recording
url
https://planetscale.com/
actions
[{"type":"simple_scroll"}]
output format
gif
output scale
1
duration ms
10000
duration mode
at_most
device scale
1
viewport height
720
viewport width
1280

Scrolling screenshot API

A URL and one scroll action

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.

  • No padding at the end

    The default duration_mode, at_most, ends the recording when scrolling finishes instead of waiting out duration_ms.

  • Viewport size

    viewport_width and viewport_height set the browser size the page is laid out and recorded at.

POST https://hcti.io/v1/recording request example.
Request
POST https://hcti.io/v1/recording
{
"url": "https://htmlcsstoimage.com",
"duration_ms": 10000,
"viewport_width": 1280,
"viewport_height": 720,
"output": {
"format": "mp4"
},
"actions": [
{
"type": "simple_scroll"
}
]
}
200 OK Response
{
"id": "your-unique-recording-id",
"recording_url": "https://hcti.io/v1/recording/your-unique-recording-id.mp4",
"status_url": "https://hcti.io/v1/recordings/your-unique-recording-id/status"
}

Recording actions

Script what happens during the recording

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.

actions: [ … ] Select an action to see its JSON
actions[0]

Click a button if it exists

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": []
}

Use cases

Show a whole page in one clip

Create a scrolling screenshot

Website portfolios

Show a landing page from its headline through the details below the fold.

Product walkthroughs

Combine scrolling with clicks and pauses to demonstrate a feature or interaction.

Website previews

Generate a moving preview for a directory, launch announcement, or customer presentation.

Common questions

How scrolling recordings work

What gets recorded, where scrolling stops, and what happens to lazy-loaded content.

Is this a tall, stitched screenshot?

No. It's a video or GIF of the page scrolling. For one still image of the whole page, use full-page URL screenshots.

Will it always reach the bottom?

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.

What about lazy-loaded images?

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?

Record a scrolling video of any public URL

Paste a URL into the scrolling screenshot tool to see the result, then send the same request from your code.