Screenshot Options
Customize your screenshots with viewport, format, and quality settings
Screenshot Options
Learn how to customize your screenshots with various options for viewport, format, quality, and more.
Viewport Settings
Control the browser viewport size for your screenshots:
{
"url": "https://example.com",
"viewport": {
"width": 1920,
"height": 1080
}
}Common Viewport Sizes
| Device | Width | Height |
|---|---|---|
| Desktop (1080p) | 1920 | 1080 |
| Desktop (1440p) | 2560 | 1440 |
| Laptop | 1440 | 900 |
| Tablet | 768 | 1024 |
| Mobile | 375 | 667 |
Full Page Capture
Capture the entire page, not just the viewport:
{
"url": "https://example.com",
"fullPage": true
}Full page screenshots can be very tall. Maximum height is 16,384 pixels.
Image Formats
PNG (Default)
Lossless compression, best for:
- Screenshots with text
- UI captures
- When quality is critical
{
"url": "https://example.com",
"format": "png"
}JPEG
Lossy compression, best for:
- Photos and images
- Smaller file sizes
- Faster downloads
{
"url": "https://example.com",
"format": "jpeg",
"quality": 85
}WebP
Modern format with excellent compression:
{
"url": "https://example.com",
"format": "webp",
"quality": 90
}Quality Setting
For JPEG and WebP, control image quality (1-100):
{
"format": "jpeg",
"quality": 95 // Higher = better quality, larger file
}| Quality | Use Case |
|---|---|
| 60-70 | Thumbnails, previews |
| 80-85 | General use (default) |
| 90-95 | High quality |
| 100 | Maximum quality |
Delay Option
Wait before capturing to ensure dynamic content loads:
{
"url": "https://example.com",
"delay": 2000 // Wait 2 seconds
}Maximum delay is 10,000ms (10 seconds). Longer delays increase capture time.
Block Ads
Remove ads and trackers for cleaner screenshots:
{
"url": "https://example.com",
"blockAds": true
}This blocks:
- Common ad networks
- Tracking scripts
- Cookie consent popups (in most cases)
Combining Options
You can combine multiple options:
{
"url": "https://example.com",
"format": "webp",
"quality": 90,
"fullPage": true,
"viewport": {
"width": 1440,
"height": 900
},
"delay": 1000,
"blockAds": true
}Device Emulation
Emulate mobile devices with the right viewport and user agent:
{
"url": "https://example.com",
"viewport": {
"width": 375,
"height": 667
},
"deviceScaleFactor": 2 // Retina display
}Best Practices
- Use appropriate formats - PNG for UI, JPEG/WebP for photos
- Set reasonable delays - Only add delay if content is dynamic
- Consider file size - Lower quality for thumbnails
- Test viewports - Ensure your target page renders correctly
- Enable ad blocking - Cleaner results, faster captures