Capture scrolling videos and screen recordings
Record videos of websites with automatic scrolling, perfect for demos, tutorials, and showcasing long-form content. SnapshotAI supports multiple video formats and fine-grained control over scrolling behavior.
To capture a video instead of a static screenshot, set media_type_capture to "video":
curl -X POST https://www.snapshotai.dev/api/v1/screenshots \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"options": {
"media_type_capture": "video",
"video_format": "mp4",
"video_duration": 10
}
}'Default Behavior
Without scrolling parameters, the video will capture the viewport for the specified duration. Add scrolling options to create a scrolling video.
mp4gifmovaviwebmFormat Recommendations
Create smooth scrolling videos to showcase entire pages. Control scroll speed, duration, and behavior:
curl -X POST https://www.snapshotai.dev/api/v1/screenshots \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"options": {
"media_type_capture": "video",
"video_format": "mp4",
"video_duration": 30,
"video_scroll_delay": 500,
"video_one_scroll_duration": 1500,
"video_scroll_by": 1000
}
}'video_scroll_delayDelay between scrolls in milliseconds
Lower = faster scrolling
video_one_scroll_durationDuration of one scroll action in milliseconds
Controls scroll smoothness
video_scroll_byPixels to scroll per action
Larger = faster progression
video_durationTotal video duration in seconds
Max 60 seconds
Fine-tune your video recording with additional timing and behavior controls:
curl -X POST https://www.snapshotai.dev/api/v1/screenshots \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"options": {
"media_type_capture": "video",
"video_format": "webm",
"video_duration": 45,
"video_start_delay": 2000,
"video_scroll_delay": 300,
"video_one_scroll_duration": 1200,
"video_scroll_by": 800,
"video_stop_scrolling_after": 30000,
"viewport_width": 1920,
"viewport_height": 1080
}
}'video_start_delayWait time before starting recording (ms). Useful for letting animations or content load.
Example: 2000 = wait 2 seconds before recording
video_stop_scrolling_afterStop scrolling after this duration (ms), but continue recording. Useful for showing the final state of a page.
Example: 30000 = scroll for 30s, then hold
video_scroll_back_afterScroll back to top after this duration (ms). Creates a loop effect.
Example: 40000 = scroll back after 40s
const response = await fetch('https://www.snapshotai.dev/api/v1/screenshots', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://example.com',
options: {
media_type_capture: 'video',
video_format: 'mp4',
video_duration: 20,
video_scroll_delay: 500,
video_one_scroll_duration: 1500,
video_scroll_by: 1000
}
})
});
const job = await response.json();
// Poll for completion
let video = null;
while (!video) {
await new Promise(resolve => setTimeout(resolve, 5000));
const statusRes = await fetch(
`https://www.snapshotai.dev/api/v1/screenshots/${job.id}`,
{
headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
}
);
const status = await statusRes.json();
if (status.status === 'completed') {
video = status;
console.log('Video ready:', status.download_url);
} else if (status.status === 'failed') {
throw new Error(status.error_message);
}
}Create engaging product demonstrations showing features and workflows in action.
Showcase entire landing pages with smooth scrolling for portfolios and case studies.
Generate eye-catching video content for social platforms and marketing campaigns.
Create visual documentation showing how to navigate and use web applications.
Best Practices
Video processing takes longer than screenshots due to encoding:
Related Guides