Devices Endpoint
The devices endpoint lists every device you can emulate with viewport_device on /v1/take, with what a render gets for it.
Requests to this endpoint are free: they do not count against your quota.
List Devices
This endpoint returns the devices of viewport_device: phones, tablets and laptops,
each with its viewport, device scale factor (at most 3), mobile and touch emulation and
its browser's user agent. Pass a device's id (or its name, in any case) as
viewport_device; viewport_width, viewport_height, device_scale_factor,
viewport_mobile and viewport_has_touch of the request replace the device's values,
and viewport_landscape=1 turns it.
Response Properties
- Name
data- Type
- array
- Description
The devices, by name.
- Name
data[].id- Type
- string
- Description
The value of
viewport_device, for exampleiphone-15-pro.
- Name
data[].name- Type
- string
- Description
The device's name, for example
iPhone 15 Pro;viewport_devicetakes it too.
- Name
data[].viewport_width- Type
- integer
- Description
The viewport's width in CSS pixels.
- Name
data[].viewport_height- Type
- integer
- Description
The viewport's height in CSS pixels.
- Name
data[].device_scale_factor- Type
- number
- Description
The device scale factor the render uses.
- Name
data[].mobile- Type
- boolean
- Description
Whether the render emulates a mobile browser (the page's meta viewport applies).
- Name
data[].has_touch- Type
- boolean
- Description
Whether the render emulates a touch screen.
- Name
data[].user_agent- Type
- string|null
- Description
The user agent the render sends;
<version>stands for the version of the render's browser.nullkeeps the render's default user agent. Auser_agentof the request wins over it.
Request
curl -G https://api.screenshotbase.com/v1/devices \
-H "apikey: YOUR-API-KEY"
Response
{
"data": [
{
"id": "iphone-15-pro",
"name": "iPhone 15 Pro",
"viewport_width": 393,
"viewport_height": 852,
"device_scale_factor": 3,
"mobile": true,
"has_touch": true,
"user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1"
},
{
"id": "pixel-7",
"name": "Pixel 7",
"viewport_width": 412,
"viewport_height": 915,
"device_scale_factor": 2.625,
"mobile": true,
"has_touch": true,
"user_agent": "Mozilla/5.0 (Linux; Android 13; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<version> Mobile Safari/537.36"
}
]
}
Use a device
curl -G https://api.screenshotbase.com/v1/take \
-H "apikey: YOUR-API-KEY" \
--data-urlencode "url=https://example.com" \
-d viewport_device=iphone-15-pro \
-o iphone.png