Screenshot API Documentation
Everything you need to capture website screenshots programmatically — every parameter documented, with copy-paste code samples in cURL, JavaScript, PHP, Python and Node.js.
Quickstart
Every screenshot is a single GET request to the endpoint below.
GET https://siteshot.shoslhgera.com/api/screenshot?url=https://example.com&key=YOUR_API_KEY
Don't have a key yet? Create a free account to get one instantly.
Parameters
| Parameter | Description | Example |
|---|---|---|
url
required
|
The full URL of the website to capture. Must be URL-encoded. | https://example.com |
key
required
|
Your personal API key, available in your account dashboard. | YOUR_API_KEY |
width
optional
|
Viewport width in pixels. Default is 1366. | 1920 |
height
optional
|
Viewport height in pixels. Default is 768. | 1080 |
full_page
optional
|
Capture the entire scrollable page instead of just the viewport. Use 1 to enable. | 1 |
format
optional
|
Output format: png, jpeg or pdf. Default is png. | jpeg |
delay
optional
|
Milliseconds to wait after page load before capturing, useful for JS-heavy pages. | 2000 |
country
optional
|
Two-letter country code to geotarget the request and view localized content. | us |
no_ads
optional
|
Block advertising banners before capturing. Use 1 to enable. | 1 |
no_cookie_popup
optional
|
Automatically dismiss cookie consent banners before capturing. Use 1 to enable. | 1 |
headers
optional
|
Custom request headers, useful for authenticated pages. Format: Header:Value. | Authorization:Bearer_TOKEN |
privacy
optional
|
Runs the capture in an isolated, cookie-free session. Use 1 to enable. | 1 |
Response format
On success, the API returns the raw image (or PDF) binary with the matching Content-Type
header (image/png, image/jpeg or application/pdf).
On failure, it returns a JSON body describing the error:
{
"success": false,
"error": "invalid_api_key",
"message": "The provided API key is invalid or has expired."
}
Code samples
curl "https://siteshot.shoslhgera.com/api/screenshot?url=https://example.com&full_page=1&format=png&key=YOUR_API_KEY" \
--output screenshot.pngconst response = await fetch(
'https://siteshot.shoslhgera.com/api/screenshot?' + new URLSearchParams({
url: 'https://example.com',
full_page: '1',
format: 'png',
key: 'YOUR_API_KEY'
})
);
const blob = await response.blob();
const imageUrl = URL.createObjectURL(blob);const fs = require('fs');
const axios = require('axios');
const params = {
url: 'https://example.com',
full_page: 1,
format: 'png',
key: 'YOUR_API_KEY'
};
const response = await axios.get('https://siteshot.shoslhgera.com/api/screenshot', {
params,
responseType: 'arraybuffer'
});
fs.writeFileSync('screenshot.png', response.data);<?php
$params = http_build_query([
'url' => 'https://example.com',
'full_page' => 1,
'format' => 'png',
'key' => 'YOUR_API_KEY',
]);
$image = file_get_contents('https://siteshot.shoslhgera.com/api/screenshot?' . $params);
file_put_contents('screenshot.png', $image);import requests
params = {
'url': 'https://example.com',
'full_page': 1,
'format': 'png',
'key': 'YOUR_API_KEY'
}
response = requests.get('https://siteshot.shoslhgera.com/api/screenshot', params=params)
with open('screenshot.png', 'wb') as f:
f.write(response.content)Frequently Asked Questions
What is a Screenshot API?
It is an HTTP endpoint that renders a webpage in a real browser and returns an image (or PDF) of it, so you don't need to run your own browser infrastructure.
Do I need an API key for every request?
Yes. The free online tool on the homepage works without a key for occasional use, but the API requires a personal key so requests can be tied to your account and plan.
Can I capture pages that require login?
Yes, use the headers parameter to forward an Authorization header or session cookie so the target page renders as if you were logged in.
What image formats are supported?
PNG, JPEG and PDF are all supported via the format parameter, so you can choose the best fit for image quality, file size, or document sharing.
How long are screenshots stored?
Screenshots are generated on demand and returned directly in the response. Check your plan details for any additional storage or retention options.
What happens if a page takes a long time to load?
Use the delay parameter to wait for JavaScript-rendered content, and be aware very slow pages may time out — most sites finish well within a few seconds.
Still need help? Contact support or check the pricing page for plan limits.