Tutorials · June 14, 2026 · 5 min

Custom Viewport Sizes: Capturing Mobile and Desktop Views

Responsive websites render differently depending on screen size. Testing how a page looks on both mobile and desktop is a common requirement.

Setting width and height

GET /api/screenshot?url=https://example.com&width=375&height=812&key=YOUR_API_KEY

Use widths around 375px to simulate common mobile devices, and 1920px for standard desktop resolutions.

Practical use cases

  • QA teams verifying responsive breakpoints
  • Marketing teams generating device mockups
  • Agencies producing client-ready previews

Combining custom viewports with full_page=1 gives you a complete picture of how a page adapts across devices.

← Back to blog