Viewport Control
Set custom viewport dimensions to capture websites at any screen size. Perfect for testing responsive designs, capturing mobile views, and generating device-specific screenshots.
How Viewport Control Works
Use the width and height parameters to set the browser viewport size before capturing. The page will render as if viewed on a device with those dimensions.
This triggers CSS media queries and responsive breakpoints, allowing you to capture the exact layout users would see on mobile phones, tablets, laptops, or ultra-wide monitors.
API Parameters
width={pixels}
height={pixels}
Set viewport width and height in pixels. The default is 1280x800. Common sizes: 375x812 (iPhone), 768x1024 (iPad), 1920x1080 (Desktop). Add devicefactor=2 for a retina (2x) image.
Common Device Viewports
# Mobile - iPhone 14 Pro
width=393&height=852
# Tablet - iPad
width=768&height=1024
# Laptop
width=1366&height=768
# Desktop Full HD
width=1920&height=1080
# 4K Display
width=3840&height=2160
Example: Mobile Screenshot
Capture a mobile view of any website
https://api.rasterwise.com/v1/get-screenshot
?apikey=YOUR_API_KEY
&url=https://example.com
&width=375
&height=812
&fullpage=true
This renders example.com at an iPhone-sized viewport. To also send a mobile user agent, use a device preset such as preset=iphonex in place of width and height. With a preset, use noheight=true instead of fullpage for a full-page capture.
Common Use Cases
Viewport control enables precise device-specific captures
Mobile Testing
Verify responsive designs render correctly on mobile viewports. Catch layout issues before they affect users.
Cross-Device QA
Automate visual regression testing across multiple viewport sizes. Compare screenshots to detect unintended changes.
Portfolio Mockups
Generate device-specific screenshots for portfolio presentations and case studies.
Learn moreCompetitor Monitoring
Track competitor mobile and desktop experiences. Monitor how they optimize for different devices.
Learn moreSocial Media Assets
Generate screenshots at specific dimensions for social media posts, ads, and thumbnails.
Learn moreDocumentation
Create consistent screenshots at standardized sizes for product documentation and help articles.
Combine with Other Features
Viewport control works seamlessly with other capabilities
Full Page Screenshots
Set a mobile or tablet width and add fullpage=true to capture the entire page.
Custom CSS
Apply responsive CSS media queries with your viewport settings.
Element Targeting
Capture mobile navigation menus or responsive components.
PDF Generation
PDFs are always A4. Use an image capture when you need exact pixel dimensions.
Ready to Control Your Viewport?
Get started with GetScreenshot's viewport control. Available on all plans.