Video Recording API

Record websites and web applications as MP4 video via REST API. Generate product demos, create tutorial videos, capture animations, and record user flow walkthroughs — no screen recording software required.

Get Free API Key

Record a Website as Video in One API Call

curl -X POST https://api.snapapi.pics/v1/video \
  -H "X-Api-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "duration": 10,
    "width": 1280,
    "height": 720,
    "fps": 30
  }'

The response contains a CDN URL to the generated MP4 file. Duration supports 1 to 30 seconds. The browser navigates to the URL, waits for the page to load, then records at the specified frame rate until the duration is reached.

Video Recording Use Cases

Product Demo Videos

Auto-generate product walkthrough videos from staging environments on every deploy. Embed in product pages, emails, and onboarding flows without manually re-recording on each release.

Animation Capture

Record CSS animations, Lottie files, WebGL scenes, and interactive data visualisations as MP4. Export to GIF for email clients or keep as video for web embedding.

Bug Reproduction

Record a specific URL state as a video and attach to bug reports. Give developers a visual context for issues that are difficult to reproduce from text descriptions alone.

Social Media Content

Capture web-based interactive content, charts, or product features as short videos for social media posts. Generate at 1080x1920 for vertical video formats used by Instagram Reels and TikTok.

Tutorial Generation

Build automated tutorial video systems that record user flows through your application using custom JavaScript injection to simulate interactions before and during recording.

E-Learning Content

Record web-based training material, interactive quizzes, and simulation tools as video for LMS platforms that accept MP4 content uploads alongside SCORM packages.

Node.js: Automate Product Demo Videos

const axios = require('axios');

async function recordDemo(url, outputName) {
  const { data } = await axios.post(
    'https://api.snapapi.pics/v1/video',
    {
      url,
      duration: 20,
      width:    1280,
      height:   720,
      fps:      30,
      delay:    2000,  // wait 2s after load before recording
    },
    { headers: { 'X-Api-Key': process.env.SNAP_API_KEY } }
  );
  console.log(`Demo video: ${data.cdn_url}`);
  return data.cdn_url;
}

// Run after each deploy in CI
recordDemo('https://staging.myapp.com/onboarding', 'onboarding-demo');

Video Parameters Reference

ParameterValuesDescription
duration1–30 (seconds)Recording length. Default 10 seconds.
width240–1920Video width in pixels. Default 1280.
height240–1080Video height in pixels. Default 720.
fps10, 24, 30, 60Frames per second. Default 30.
delay0–10000 (ms)Wait after page load before starting recording.
custom_jsJS stringExecute JavaScript before or during recording.

FAQ

What format is the output?

MP4 with H.264 video codec. The CDN URL links directly to the MP4 file, suitable for direct embedding with an HTML video tag or download.

Can I record pages that require authentication?

Yes. Pass a session cookie string via the cookies parameter or inject an auth token into localStorage using custom_js before recording begins.

Can I interact with the page during recording?

Yes via custom_js. Execute JavaScript to click buttons, fill forms, or trigger animations at specific times during the recording window using setTimeout calls in your injected script.

How long does video rendering take?

Roughly 1.5x to 2x the video duration plus page load time. A 10-second video of a typical page completes in 15-25 seconds total. For real-time use cases, trigger recording asynchronously and poll or use a webhook.

Start Recording Websites as Video

200 free recordings per month. No credit card required.

Create Free Account

Video Recording API Parameters

Every video recording request accepts a rich set of parameters to control the output. Specify viewport dimensions, recording duration, frames per second, scroll behavior, and interaction scripts. The API returns a direct download URL or a base64-encoded video file depending on your preference.

ParameterTypeDefaultDescription
urlstringrequiredThe page URL to record
durationinteger5Recording duration in seconds (max 60)
fpsinteger24Frames per second (8, 12, 24, or 30)
widthinteger1280Viewport width in pixels
heightinteger720Viewport height in pixels
scrollbooleanfalseAuto-scroll the page during recording
block_adsbooleantrueBlock ads and tracking scripts
formatstringmp4Output format: mp4 or webm

The scroll parameter automatically scrolls from the top to the bottom of the page at a natural reading speed, making it ideal for recording long-form landing pages or documentation. Combine with custom_css injection to hide fixed headers or cookie banners before recording begins.

Python and Go Integration Examples

SnapAPI supports all major languages. Here's how to record a page in Python using the requests library:

import requests, base64

resp = requests.post(
    "https://api.snapapi.pics/v1/video",
    headers={"X-Api-Key": "sk_live_YOUR_KEY"},
    json={"url": "https://example.com", "duration": 8, "scroll": True, "fps": 24}
)
data = resp.json()
with open("recording.mp4", "wb") as f:
    f.write(base64.b64decode(data["video"]))

Video recording requests are synchronous — the API waits until the browser has finished recording before returning the response. For recordings longer than 10 seconds, increase your HTTP client's read timeout to at least 90 seconds to avoid premature timeout errors on your end.

Webhook Delivery

For long recordings (30-60 seconds), use the webhook parameter to receive the finished video at a URL of your choice instead of waiting for the HTTP response. The webhook POST body contains the same JSON structure as the synchronous response, making your processing logic identical regardless of delivery mode. This is especially useful in serverless environments where function timeouts would otherwise cut off long recordings.

Pair webhook delivery with cloud storage upload: receive the webhook, decode the base64 video, and upload directly to S3 or Google Cloud Storage. The entire pipeline from trigger to stored video asset can be orchestrated in under 20 lines of serverless function code.

Production Use Cases for the Video Recording API

SaaS Onboarding and Feature Announcements

SaaS companies use SnapAPI to automatically generate personalized onboarding videos. When a new user signs up, record their provisioned environment with their name and company pre-filled, creating a custom welcome video without any manual screen recording. The same pattern works for feature announcement videos — record the new feature in a demo environment and embed the video in announcement emails.

E-Learning Content at Scale

Course platforms use the video API to record interactive lessons, software tutorials, and walkthrough demonstrations. With the scroll parameter and custom viewport sizes, you can capture a complete documentation page as a video lecture without a human presenter. Combine with the analyze endpoint to auto-generate transcripts and chapter markers from the page content.

Compliance and Audit Trails

Regulated industries use browser video recordings as evidence of page state at a specific point in time. Record competitor pricing pages, terms-of-service documents, or advertising creatives before they change. Store the videos alongside metadata (URL, timestamp, request ID) as a tamper-evident audit log. SnapAPI's Business plan at $299/month supports 500,000 monthly API calls — enough for enterprise-grade compliance logging across thousands of monitored pages.

Get Started with the Video Recording API

Sign up at snapapi.pics and your free account includes 200 API calls per month with no credit card required. Video recording is available on all plans including the free tier, so you can evaluate the quality and performance against your specific use case before committing.

The API documentation covers all video parameters, webhook setup, format options, and language examples in Node.js, Python, PHP, Go, Ruby, Swift, Kotlin, and C#. If you have questions or need a custom quota, reach out via the support widget on any page — typical response time is under two hours during business hours.

Browser Compatibility and Device Emulation

SnapAPI uses a full Chromium browser for all video recordings, ensuring pixel-perfect rendering of modern CSS, Web Animations API, CSS animations, and JavaScript-driven interactions. Every recording uses the latest stable Chromium build, so your videos reflect what users actually see — not a degraded headless rendering.

Use the device parameter to record in mobile viewport. With device set to "iPhone 15 Pro", the recording simulates the correct screen resolution, pixel ratio, user agent string, and touch event model. This is essential for SaaS products that need to demonstrate mobile responsiveness in their marketing videos without owning a physical device farm.

Custom JavaScript Before Recording

The js_code parameter lets you inject JavaScript that runs before the recording begins. Use this to log in to a demo account, populate a form with sample data, click through an onboarding wizard, or set localStorage values that trigger specific UI states. Combining js_code with the scroll parameter produces polished demo videos that show realistic user flows without any human input.

Custom CSS injection (css_code parameter) lets you hide watermarks, remove cookie banners, change fonts to match your brand, or inject custom overlays before the recording starts. All injections are applied after page load and before the recorder starts, ensuring they appear consistently throughout the video.

Video recording via API is the most efficient way to produce consistent browser recordings at scale without managing a Playwright or Puppeteer infrastructure. SnapAPI handles browser lifecycle, crash recovery, and output encoding so your team can focus on the application logic that uses the recordings rather than the infrastructure that produces them.

video recording api browser automation playwright puppeteer mp4 webm node python webhook async
browser video capture cloud api saas product demo tutorial recording