Documentation Index
Fetch the complete documentation index at: https://docs.screenshotly.dev/llms.txt
Use this file to discover all available pages before exploring further.
Get your API key
After registering, go to API settings in your dashboard. Copy your API key and store it securely — you’ll need it for every request.Never expose your API key in client-side code or public repositories. Store it in environment variables.
export SCREENSHOTLY_API_KEY="your-api-key-here"
Capture your first screenshot
Choose your preferred method:import { Screenshotly } from 'screenshotly-js';
const client = new Screenshotly(process.env.SCREENSHOTLY_API_KEY);
const screenshot = await client.capture({
url: 'https://example.com',
viewport_width: 1280,
viewport_height: 800,
format: 'png'
});
if (screenshot.success) {
console.log('Screenshot URL:', screenshot.data.imageUrl);
}
By default, the API returns the screenshot as a binary image. To get a JSON response with metadata, set response_type to json:{
"success": true,
"data": {
"id": "67b8a1c2d3e4f5a6b7c8d9e0",
"url": "https://example.com",
"image_url": "https://cdn.screenshotly.dev/screenshots/67b8a1c2d3e4f5a6b7c8d9e0.png",
"status": "completed",
"metadata": {
"file_size": 245760,
"format": "png",
"dimensions": { "width": 1280, "height": 800 }
}
},
"remaining_credits": 99
}
Next steps
Full-page captures
Capture entire scrollable pages.
Device emulation
Simulate mobile devices and custom viewports.
Batch processing
Capture multiple URLs in one request.
API reference
See all available parameters.