Animated Screenshot Request
Create animated GIF screenshots with Capture API. Record web page interactions up to 30 seconds with dark mode, device emulation, and custom viewport configurations.
The animated screenshot endpoint allows you to capture animated screenshots of web pages in GIF format.
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 Options
| Query | Default value | Description |
|---|---|---|
| url | - | URL-encoded target url |
| preset | - | Apply predefined configuration preset |
| duration | 5 | Recording duration in seconds (1-30) |
| hideScrollbars | true | Hide scrollbars during capture for cleaner output |
| vw | 1440 | Viewport width in pixels |
| vh | 900 | Viewport height in pixels |
| scaleFactor | 1 | Device scale factor |
| emulateDevice | - | Emulate a specific device (e.g., iphone_14, ipad, pixel_8) - see device list below |
| delay | 0 | Seconds to wait before starting capture (0-25) |
| waitFor | - | Wait for CSS selector to appear |
| waitForId | - | Wait for element with specific ID to appear |
| darkMode | false | Enable dark mode |
| blockCookieBanners | false | Automatically dismiss cookie consent popups |
| blockAds | false | Block advertisements |
| httpAuth | - | HTTP Basic Authentication base64url encoded in format base64url(username:password) |
| userAgent | - | Custom user agent (base64url encoded) |
| fileName | - | Custom filename for the output file |
Usage Examples
Basic Animated Screenshot
https://cdn.capture.page/your-api-key/hash/animated?url=https://example.com&duration=10Dark Mode Animation
https://cdn.capture.page/your-api-key/hash/animated?url=https://example.com&duration=20&darkMode=true&hideScrollbars=trueMobile Device Recording
https://cdn.capture.page/your-api-key/hash/animated?url=https://example.com&emulateDevice=iphone_15_pro&duration=10Technical Limitations
- Format: GIF only
- Maximum Duration: 30 seconds
Device Emulation
The emulateDevice parameter allows you to capture animated screenshots as they would appear on specific mobile devices. This is particularly useful for:
- Testing responsive design behavior
- Creating mobile app demos
- Recording mobile-specific interactions
Available Devices
To get the complete list of available devices with their specifications, use the devices endpoint:
curl "https://edge.capture.page/screenshot/devices"Sample Response:
{
"success": true,
"count": 120,
"devices": [
{
"name": "iPhone 15 Pro",
"key": "iphone_15_pro",
"userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1",
"viewport": {
"width": 393,
"height": 659,
"deviceScaleFactor": 3,
"isMobile": true,
"hasTouch": true,
"isLandscape": false
}
}
]
}Use the key field from the response as the value for the emulateDevice parameter in your animated screenshot requests.
Device Emulation Notes
- When using
emulateDevice, the viewport dimensions and scale factor are automatically set to match the selected device - Touch events and mobile user agents are properly configured
- If an invalid device key is provided, the API falls back to default viewport settings
Authentication & Headers
Configure HTTP Basic Authentication and custom user agent headers for capturing protected content, internal applications, and authenticated websites with Capture API.
PDF Request
Generate PDFs from any website with Capture API. Configure paper size, margins, orientation, scaling, and custom dimensions. Supports A4, Letter, Legal, and custom formats.