Skip to main content

Animated Screenshot Request

The animated screenshot endpoint allows you to capture animated screenshots of web pages in GIF, MP4, or WebM formats. This endpoint supports scrolling animations, custom durations, and various frame rates.

URL Format

https://cdn.capture.page/{API_KEY}/{GENERATED_HASH}/animated?url={TARGET_URL}
  • API_KEY: Your Capture API key
  • GENERATED_HASH: MD5 hash of the target URL and your API secret
  • TARGET_URL: The URL you want to capture (URL-encoded)

Request Parameters

Mandatory Parameters

ParameterTypeDescription
urlstringTarget URL to capture (URL-encoded)

Animation Options

ParameterTypeDefaultDescription
formatstringmp4Output format: gif, mp4, or webm
durationnumber5Recording duration in seconds (1-30)
fpsnumber30Frames per second (5-60)
scrollingbooleanfalseEnable automatic scrolling during capture
scrollSpeednumber200Scrolling speed in pixels (50-1000)
hideScrollbarsbooleantrueHide scrollbars during capture for cleaner output

Viewport Options

ParameterTypeDefaultDescription
vwnumber1440Viewport width in pixels
vhnumber900Viewport height in pixels
scaleFactornumber1Device scale factor

Capture Behavior

ParameterTypeDefaultDescription
delaynumber0Seconds to wait before starting capture (0-25)
waitForstring-Wait for CSS selector to appear
waitForIdstring-Wait for element with specific ID to appear
selectorstring-Capture specific element by CSS selector
fullPagebooleanfalseCapture full page height

Page Interaction

ParameterTypeDefaultDescription
darkModebooleanfalseEnable dark mode
blockCookieBannersbooleanfalseAutomatically dismiss cookie consent popups
blockAdsbooleanfalseBlock advertisements
bypassBotDetectionbooleanfalseSolve captchas automatically

Authentication

ParameterTypeDescription
httpAuthstringHTTP Basic Authentication (base64url encoded as username:password)
userAgentstringCustom user agent (base64url encoded)

File Storage

ParameterTypeDescription
fileNamestringCustom filename for the output file
s3AclstringS3 Access Control List (e.g., public-read)
s3RedirectbooleanRedirect to S3 URL instead of returning file data

Format Specifications

GIF Format

  • Extension: .gif
  • Content-Type: image/gif
  • Max FPS: 30 (technical limitation)
  • Best for: Simple animations, broad compatibility

MP4 Format

  • Extension: .mp4
  • Content-Type: video/mp4
  • Max FPS: 60
  • Codec: H.264 with yuv420p pixel format
  • Best for: High quality video, web streaming

WebM Format

  • Extension: .webm
  • Content-Type: video/webm
  • Max FPS: 60
  • Codec: VP9
  • Best for: Web-optimized video, smaller file sizes

Usage Examples

Basic Animated Screenshot

https://cdn.capture.page/your-api-key/hash/animated?url=https://example.com&duration=10&format=mp4

Scrolling GIF with Custom Settings

https://cdn.capture.page/your-api-key/hash/animated?url=https://example.com&format=gif&duration=15&scrolling=true&scrollSpeed=300&fps=24

High-Quality WebM with Dark Mode

https://cdn.capture.page/your-api-key/hash/animated?url=https://example.com&format=webm&duration=20&fps=60&darkMode=true&hideScrollbars=true

Element-Specific Animation

https://cdn.capture.page/your-api-key/hash/animated?url=https://example.com&selector=.main-content&duration=8&format=mp4&fps=30

Technical Limitations

  • Maximum Duration: 30 seconds
  • FPS Range: 5-60 fps (GIF capped at 30fps)
  • Scrolling: Automatic smooth scrolling with configurable speed
  • Browser: Uses Chrome/Chromium with Puppeteer
  • Extensions: Supports uBlock Origin for ad blocking

Best Practices

  1. Choose Appropriate Format:

    • Use GIF for simple animations and maximum compatibility
    • Use MP4 for high-quality video content
    • Use WebM for web-optimized, smaller file sizes
  2. Optimize Duration:

    • Shorter durations reduce credit usage
    • 5-15 seconds often sufficient for most use cases
  3. Frame Rate Selection:

    • 24-30 fps for most content
    • 60 fps only for smooth motion requirements
  4. Scrolling Settings:

    • Enable scrolling for long pages
    • Adjust scroll speed based on content length
    • Consider hiding scrollbars for cleaner output
  5. Performance:

    • Use delay parameter for dynamic content
    • Consider waitFor for specific elements
    • Enable ad blocking for faster loading