ScreenshotLensscreenshotlensdocs

Rolling Video API

Record a public page as it scrolls, and get back an MP4 or a GIF.

GET /v1/videos/rolling

The target url must be absolute and use http or https.

Basic request

curl -G "https://api.screenshotlens.com/v1/videos/rolling" \
  --data-urlencode "url=https://example.com" \
  --data-urlencode "api_key=YOUR_API_KEY" \
  --data-urlencode "response_type=json"
const params = new URLSearchParams({
  url: "https://example.com",
  api_key: process.env.SCREENSHOTLENS_API_KEY!,
  response_type: "json",
})

const response = await fetch(
  `https://api.screenshotlens.com/v1/videos/rolling?${params}`,
)

const capture = await response.json()

Parameters

ParameterTypeDefaultLimits
urlabsolute URLnoneRequired. Must use http or https.
api_keystringnoneRequired unless the request carries a dashboard session.
response_typebinary or jsonbinaryUse json while integrating.
formatenumMp4Mp4, Gif
durationinteger51 to 30 seconds of recording
viewport_devicestringnoneA Playwright device name, e.g. iPhone 13 or Pixel 5. Emulates that device's viewport, user agent, and touch support, overriding viewport_width and viewport_height.
viewport_widthinteger12801 to 7680 pixels
viewport_heightinteger7201 to 4320 pixels
delayinteger00 to 10 seconds, waited before recording
timeoutinteger300 to 30 seconds
start_delayinteger00 to 10000 milliseconds of still frames before the first scroll
scroll_delayinteger5000 to 5000 milliseconds paused between scroll steps
one_scroll_durationinteger1500100 to 5000 milliseconds for a single scroll step
scroll_byinteger1000100 to 5000 pixels per scroll step
wait_untilenumLoadLoad, DomContentLoaded, NetworkIdle0, NetworkIdle2
darkbooleanfalseEmulates a dark color scheme
block_adsbooleantrueBlocks common ad resources
block_cookie_bannersbooleantrueBlocks and dismisses common cookie banners
block_chatbooleanfalseBlocks common chat widgets

Response modes

JSON

response_type=json returns the stored asset URL.

{
  "video_url": "https://cdn.screenshotlens.com/captures/example.mp4",
  "credits_charged": 5
}

Binary

The default response_type=binary redirects to the stored media URL, so pass -L to follow it.

curl -L -G "https://api.screenshotlens.com/v1/videos/rolling" \
  --data-urlencode "url=https://example.com" \
  --data-urlencode "api_key=YOUR_API_KEY" \
  --output capture.mp4

Pricing

Rolling video costs 5 credits in both formats and at any duration. See Credits and Billing for when the charge lands and when it does not.

On this page