Viewports and Devices
Control browser dimensions, device emulation, and responsive captures.
Control the browser viewport size and device characteristics for your captures.
Custom Viewport
Set exact dimensions for your capture:
{
"url": "https://example.com",
"viewport": {
"width": 1440,
"height": 900
}
}Standard desktop viewport for general captures.
{
"url": "https://example.com",
"viewport": {
"width": 390,
"height": 844,
"device_scale_factor": 3,
"is_mobile": true,
"has_touch": true
}
}Mobile viewport with touch support and high DPI.
{
"url": "https://example.com",
"viewport": {
"width": 1920,
"height": 1080,
"device_scale_factor": 2
}
}High-resolution desktop viewport for crisp screenshots.
{
"url": "https://example.com",
"viewport": {
"width": 820,
"height": 1180,
"device_scale_factor": 2,
"is_mobile": false,
"has_touch": true
}
}Tablet viewport with touch capability.
Viewport constraints
Width: 320-2000 pixels | Height: 480-1400 pixels | Device scale: 1-3x
Device Presets
Use pre-configured device profiles for accurate mobile and desktop emulation.
{
"url": "https://example.com",
"viewport": {
"device": "iphone-14"
}
}Automatically sets viewport, user agent, and touch support for iPhone 14.
{
"url": "https://example.com",
"viewport": {
"device": "pixel-7"
}
}Google Pixel 7 viewport with appropriate dimensions and DPR.
{
"url": "https://example.com",
"viewport": {
"device": "ipad-air-11"
}
}iPad Air 11" viewport for tablet testing.
{
"url": "https://example.com",
"viewport": {
"device": "desktop-1080p"
}
}Standard 1080p desktop display.
Available Presets
| ID | Device Name | Width | Height | DPR | Type |
|---|---|---|---|---|---|
| iphone-14 | iPhone 14 | 390 | 844 | 3 | Mobile |
| iphone-14-pro-max | iPhone 14 Pro Max | 430 | 932 | 3 | Mobile |
| pixel-7 | Google Pixel 7 | 412 | 915 | 2.625 | Mobile |
| galaxy-s23 | Samsung Galaxy S23 | 360 | 780 | 3 | Mobile |
| ipad-air-11 | iPad Air 11 | 820 | 1180 | 2 | Tablet |
| macbook-pro-14 | MacBook Pro 14 | 1512 | 982 | 2 | Desktop |
| desktop-1080p | Desktop 1080p | 1920 | 1080 | 1 | Desktop |
Dynamic presets
Get the latest device list via GET /v1/devices endpoint. New devices are added regularly.
Common Use Cases
Social Media Cards (1200x630)
{
"url": "https://yoursite.com/blog/post",
"viewport": { "width": 1200, "height": 630 },
"clip": { "x": 0, "y": 0, "width": 1200, "height": 630 }
}Mobile Screenshots
{
"url": "https://example.com",
"viewport": {
"device": "iphone-14"
}
}High-DPI Screenshots
{
"url": "https://example.com",
"viewport": {
"width": 1920,
"height": 1080,
"device_scale_factor": 2
}
}