Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Control viewport dimensions and emulate mobile devices, tablets, and retina displays for responsive design testing.
viewport_width
viewport_height
const screenshot = await client.capture({ url: 'https://example.com', viewport_width: 1440, viewport_height: 900 });
1280x1024
device_scale_factor
viewport_mobile
viewport_has_touch
viewport_landscape
const screenshot = await client.capture({ url: 'https://example.com', viewport_width: 390, viewport_height: 844, device_scale_factor: 3, viewport_mobile: true, viewport_has_touch: true });
curl -X POST https://api.screenshotly.dev/v1/capture \ -H "X-API-Key: $SCREENSHOTLY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://example.com", "options": { "viewport_width": 390, "viewport_height": 844, "device_scale_factor": 3, "viewport_mobile": true, "viewport_has_touch": true } }' \ --output screenshot.png
const screenshot = await client.capture({ url: 'https://example.com', viewport_width: 1024, viewport_height: 768, device_scale_factor: 2, viewport_mobile: true, viewport_has_touch: true, viewport_landscape: true });
const screenshot = await client.capture({ url: 'https://example.com', viewport_width: 1440, viewport_height: 900, device_scale_factor: 2 });
full_page: true
const breakpoints = [375, 768, 1024, 1440, 1920]; for (const width of breakpoints) { const screenshot = await client.capture({ url: 'https://example.com', viewport_width: width, viewport_height: 800, full_page: true }); console.log(`Captured at ${width}px`); }