Skip to content

Type an option name like full_page, an error code, or a topic.

Devices

Capture a page as a phone, tablet, laptop or desktop would show it, using one option and a list of ready-made presets.

Add viewport_device and the page is drawn as that device would show it.

Request
curl "https://curlshot.com/api/v1/screenshot?access_key=YOUR_ACCESS_KEY&url=https://en.wikipedia.org/wiki/Eiffel_Tower&viewport_device=iphone_15_pro" \
  --output eiffel-iphone.png

You get the mobile version of the article, in a file that is 1179 by 2556 pixels.

The Wikipedia article about the Eiffel Tower in its mobile layout
The result: the article as an iPhone 15 Pro shows it.

#What a device preset sets

A preset is a bundle of settings with a name. One value of viewport_device sets all of these:

SettingWhat it meansiPhone 15 Pro
Width and heightThe size of the viewport. The viewport is the browser window the page is drawn in.393 x 852
Pixel densityHow many image pixels are drawn for each page pixel.3
Mobile layoutWhether the page is treated as a phone or tablet page.yes
TouchWhether the browser reports a touch screen.yes
User agentThe browser name sent to the site. Some sites pick their layout from it.iPhone Safari

Presets for phones and tablets turn on the mobile layout. Presets for laptops and desktops do not.

Without a preset, the page is drawn in a 1280 by 1024 window at density 1, as a desktop browser.

#Try a tablet

Change one word and you get a different device.

Request
curl "https://curlshot.com/api/v1/screenshot?access_key=YOUR_ACCESS_KEY&url=https://en.wikipedia.org/wiki/Eiffel_Tower&viewport_device=ipad" \
  --output eiffel-ipad.png
The Wikipedia article about the Eiffel Tower in its tablet layout
The result: the same article on an iPad, 820 x 1180 at density 2.

The name is forgiving about spelling. iphone_15_pro, iphone-15-pro and iPhone 15 Pro all pick the same preset.

#Pixel density in one line

Pixel density multiplies the image size: a 393 x 852 viewport at density 3 gives a 1179 x 2556 image, with sharper text and the same layout.

That is why device screenshots are larger than the viewport numbers suggest. The option behind it is device_scale_factor. The default is 1. The largest value is 3. For full-page screenshots, your plan can set a lower maximum.

#Override part of a preset

Any viewport option you send yourself wins over the preset. The rest of the preset stays.

This keeps the iPhone layout and user agent, but asks for density 1, so the file is a light 393 by 852 pixels:

Request
curl "https://curlshot.com/api/v1/screenshot?access_key=YOUR_ACCESS_KEY&url=https://en.wikipedia.org/wiki/Eiffel_Tower&viewport_device=iphone_15_pro&device_scale_factor=1" \
  --output eiffel-iphone-small.png

You can override these:

#Landscape

Phone and tablet presets are in portrait, which means taller than wide. Add viewport_landscape=true to turn the device on its side.

Request
curl "https://curlshot.com/api/v1/screenshot?access_key=YOUR_ACCESS_KEY&url=https://en.wikipedia.org/wiki/Eiffel_Tower&viewport_device=ipad&viewport_landscape=true" \
  --output eiffel-ipad-landscape.png

The iPad viewport becomes 1180 by 820 in place of 820 by 1180.

The default is false. On a preset that is already wider than tall, such as a laptop, it changes nothing.

#Without a preset

You do not need a preset to get a phone-sized screenshot. Set the numbers yourself:

Request
curl "https://curlshot.com/api/v1/screenshot?access_key=YOUR_ACCESS_KEY&url=https://en.wikipedia.org/wiki/Eiffel_Tower&viewport_width=400&viewport_height=800&viewport_mobile=true&device_scale_factor=2" \
  --output eiffel-custom.png

viewport_mobile=true matters here. It makes the browser respect the page's own mobile settings, the way a phone does. Without it, a narrow window is still treated as a desktop browser.

The width can be from 100 to 3840 pixels. The height can be from 100 to 4320 pixels.

#All devices

#Phones

viewport_deviceDeviceViewportPixel densityMobile layout
iphone_seiPhone SE375 x 6672yes
iphone_12iPhone 12390 x 8443yes
iphone_13iPhone 13390 x 8443yes
iphone_13_miniiPhone 13 mini375 x 8123yes
iphone_14iPhone 14390 x 8443yes
iphone_14_plusiPhone 14 Plus428 x 9263yes
iphone_14_proiPhone 14 Pro393 x 8523yes
iphone_14_pro_maxiPhone 14 Pro Max430 x 9323yes
iphone_15iPhone 15393 x 8523yes
iphone_15_plusiPhone 15 Plus430 x 9323yes
iphone_15_proiPhone 15 Pro393 x 8523yes
iphone_15_pro_maxiPhone 15 Pro Max430 x 9323yes
iphone_16iPhone 16393 x 8523yes
iphone_16_plusiPhone 16 Plus430 x 9323yes
iphone_16_proiPhone 16 Pro402 x 8743yes
iphone_16_pro_maxiPhone 16 Pro Max440 x 9563yes
pixel_5Pixel 5393 x 8512.75yes
pixel_7Pixel 7412 x 9152.625yes
pixel_8Pixel 8412 x 9152.625yes
pixel_8_proPixel 8 Pro448 x 9983yes
pixel_9Pixel 9412 x 9232.625yes
pixel_9_proPixel 9 Pro410 x 9143yes
galaxy_s23Galaxy S23360 x 7803yes
galaxy_s24Galaxy S24360 x 7803yes
galaxy_s24_ultraGalaxy S24 Ultra384 x 8243.75yes
galaxy_a54Galaxy A54360 x 8003yes

#Tablets

viewport_deviceDeviceViewportPixel densityMobile layout
ipadiPad (10th gen)820 x 11802yes
ipad_miniiPad mini744 x 11332yes
ipad_airiPad Air820 x 11802yes
ipad_pro_11iPad Pro 11"834 x 11942yes
ipad_pro_13iPad Pro 13"1024 x 13662yes
galaxy_tab_s9Galaxy Tab S9800 x 12802yes
pixel_tabletPixel Tablet800 x 12802yes

#Laptops

viewport_deviceDeviceViewportPixel densityMobile layout
macbook_air_13MacBook Air 13"1440 x 9002no
macbook_pro_14MacBook Pro 14"1512 x 9822no
macbook_pro_16MacBook Pro 16"1728 x 11172no
laptop_hdLaptop (1366 x 768)1366 x 7681no
laptop_hidpiLaptop HiDPI (1440 x 900 @2x)1440 x 9002no

#Desktops

viewport_deviceDeviceViewportPixel densityMobile layout
desktop_hdDesktop HD (1280 x 720)1280 x 7201no
desktop_full_hdDesktop Full HD (1920 x 1080)1920 x 10801no
desktop_qhdDesktop QHD (2560 x 1440)2560 x 14401no
desktop_4kDesktop 4K (3840 x 2160)3840 x 21601no
imac_24iMac 24"2240 x 12602no

#Get the list as JSON

The same list is available from the API, for a device picker in your own app. This request needs no access key and does not count against your quota.

Request
curl "https://curlshot.com/api/v1/devices"
Response, status 200
{
  "devices": [
    {
      "name": "iphone_se",
      "label": "iPhone SE",
      "category": "phone",
      "viewport_width": 375,
      "viewport_height": 667,
      "device_scale_factor": 2,
      "viewport_mobile": true,
      "has_touch": true,
      "user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1"
    }
  ]
}

The real answer holds one entry like this for every device in the tables above. category is phone, tablet, laptop or desktop.

#Where to go next