Scrolling Screenshot
Automatically scroll a webpage from top to bottom and capture the result as a GIF or MP4. Perfect for showcasing full-page designs, product pages, or any long-scrolling content.
Scrolling screenshots are available on Growth plan and above.
Endpoint
GET
/v1/scrollParameters
| Parameter | Type | Default | Description |
|---|
Response
Returns a binary GIF, MP4, or WebM file with the appropriate Content-Type header.
Content-Type: image/gif
Content-Disposition: attachment; filename="scroll.gif"
X-Request-Id: 550e8400-e29b-41d4-a716-446655440000
X-Response-Time: 8234Examples
Basic GIF (curl)
curl "https://api.snapsharp.dev/v1/scroll?url=https://stripe.com&format=gif&duration=6" \
-H "Authorization: Bearer $SNAPSHARP_API_KEY" \
--output scroll.gifSlow scroll in dark mode
curl "https://api.snapsharp.dev/v1/scroll?url=https://linear.app&format=gif&duration=8&scroll_speed=2&dark_mode=true" \
-H "Authorization: Bearer $SNAPSHARP_API_KEY" \
--output linear-dark-scroll.gifNode.js
import { SnapSharp } from '@snapsharp/sdk';
import { writeFileSync } from 'fs';
const snap = new SnapSharp(process.env.SNAPSHARP_API_KEY!);
const gif = await snap.scroll({
url: 'https://stripe.com',
format: 'gif',
duration: 6,
scroll_speed: 3,
});
writeFileSync('scroll.gif', gif);Python
import httpx
import os
api_key = os.environ["SNAPSHARP_API_KEY"]
response = httpx.get(
"https://api.snapsharp.dev/v1/scroll",
params={
"url": "https://stripe.com",
"format": "gif",
"duration": 6,
"scroll_speed": 3,
},
headers={"Authorization": f"Bearer {api_key}"},
timeout=60.0,
)
response.raise_for_status()
with open("scroll.gif", "wb") as f:
f.write(response.content)PHP
<?php
$apiKey = getenv('SNAPSHARP_API_KEY');
$params = http_build_query([
'url' => 'https://stripe.com',
'format' => 'gif',
'duration' => 6,
'scroll_speed' => 3,
]);
$context = stream_context_create([
'http' => [
'header' => "Authorization: Bearer $apiKey\r\n",
'timeout' => 60,
],
]);
$gif = file_get_contents(
"https://api.snapsharp.dev/v1/scroll?$params",
false,
$context
);
file_put_contents('scroll.gif', $gif);Use cases
| Use case | Recommended settings |
|---|---|
| Portfolio / landing page showcase | format=gif&duration=8&scroll_speed=2 |
| Bug report for CI/CD | format=mp4&duration=10&scroll_speed=3 |
| Product demo for social media | format=mp4&duration=6&width=390&height=844 (mobile viewport) |
| Long-form blog post preview | format=gif&duration=12&scroll_speed=2 |
Notes
- GIF files are larger than MP4/WebM but work as image embeds in markdown, GitHub comments, and emails
- MP4 files are smaller and sharper — use for video players
- For very long pages, increase
durationrather thanscroll_speedto avoid choppy output - The scroll starts from the top of the page automatically — use
delayif the page has a loading animation