Mobile Website Screenshot API: iPhone, iPad and Android Viewports

Last updated:

URLBooth screenshots any public URL at a phone or tablet viewport when you pass a mobile device id, such as iphone-17-pro, ipad-air-11 or android. The page is laid out at that device’s exact CSS width and height, so responsive breakpoints and mobile styles apply.

What does device emulation do?

For each preset the browser is set to:

  • the preset’s width and height in CSS pixels, matching the size the hardware reports;
  • the preset’s device pixel ratio, 2x for every phone and tablet below, so the image is sharp (a 402 pixel wide viewport produces an 804 pixel wide image);
  • mobile and touch mode, which turns on the mobile viewport behavior and touch input support;
  • an iPhone, iPad or Android user agent string for the matching presets.

With fullPage the pixel ratio drops to 1x; see full-page screenshots. You can only choose from the presets; custom viewport sizes are not supported.

Which phone and tablet presets are available?

18 presets are touch devices. Pass the id as device. The same data, plus desktop and Mac presets, is in the device reference.

IdDeviceViewportDPR
tabletTablet768 × 10242x
mobileMobile390 × 8442x
iphone-17-pro-maxiPhone 17 Pro Max / 16 Pro Max440 × 9562x
iphone-17-proiPhone 17 Pro / 17 / 16 Pro402 × 8742x
iphone-airiPhone Air420 × 9122x
iphone-16-plusiPhone 16 Plus / 15 Plus430 × 9322x
iphone-16iPhone 16 / 15 / 15 Pro393 × 8522x
iphone-16eiPhone 16e / 14 / 13390 × 8442x
iphone-13-miniiPhone 13 mini375 × 8122x
iphone-seiPhone SE375 × 6672x
ipad-pro-13iPad Pro 13″1032 × 13762x
ipad-pro-11iPad Pro 11″834 × 12102x
ipad-air-13iPad Air 13″1024 × 13662x
ipad-air-11iPad Air 11″ / iPad820 × 11802x
ipad-miniiPad mini744 × 11332x
ipad-classiciPad 9th gen810 × 10802x
androidAndroid phone412 × 9152x
android-compactAndroid compact360 × 8002x

Which preset should I choose?

Pick the viewport you want to test, not the exact model. Several labels cover more than one phone because they share a viewport, for example iphone-17-pro also matches the iPhone 17 and 16 Pro. Use android-compact for a narrow 360 pixel Android layout, iphone-se for the smallest iPhone, andipad-pro-13 for the largest tablet. All presets are portrait; there is no landscape or rotation option. Test the widths your own CSS breakpoints care about, and compare each against a desktop capture of the same URL.

How do I capture the same page on desktop and on a phone?

Send two requests that differ only in device. Both use the default PNG format and have cleanup on.

Desktop curl example
curl --fail-with-body "https://urlbooth.com/v1/screenshots" \
-H "Authorization: Bearer $URLBOOTH_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","device":"desktop"}' \
-o desktop.png
iPhone curl example
curl --fail-with-body "https://urlbooth.com/v1/screenshots" \
-H "Authorization: Bearer $URLBOOTH_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","device":"iphone-17-pro"}' \
-o iphone.png

The API needs a Pro plan at $20 per month; see pricing and the options reference. A step-by-step intro is in how to take a website screenshot with an API.

Can I put the phone screenshot in a device frame?

Yes. Add "frame": true for a mockup in an iPhone, iPad or Android frame; see device frame screenshots. Cookie banners and ads are removed by default, which matters most on small screens where a banner can cover half the page; see cookie banner removal.

Limits and caveats

  • This is viewport emulation in a Chromium-based browser (Cloudflare Browser Run), not a real iPhone or real Safari. iPhone and iPad presets send a Safari user agent, but the rendering engine is Chromium, so engine-specific behavior can differ from a real device.
  • Sites that choose layouts by user agent, or that block automated browsers, may show something different from a real phone.
  • The output is a still image of the first screen unless you set fullPage.
  • Plan limits apply: 10,000 a day, 60 a minute and 10 at once, with images stored for 2 days. See the API reference.