Screenshot API Documentation
Capture pixel-perfect screenshots of any website with a simple REST API call. Get started in under 5 minutes with our free tier.
Quick Start
The fastest way to capture a screenshot:
GET https://benit.uk/api/screenshot?url=https://example.com
This returns a PNG image of the website. No API key required for testing (rate limited).
Authentication
Include your API key in the X-API-Key header:
curl -H "X-API-Key: your-api-key" \
"https://benit.uk/api/screenshot?url=https://example.com"
Get your free API key by signing up.
Endpoints
Capture Screenshot
GET /api/screenshot
Captures a screenshot of the specified URL.
| Parameter | Type | Default | Description |
|---|---|---|---|
url | string | required | The URL to capture |
format | string | png | Output format: png, jpeg, webp |
viewport | string | desktop | Viewport: mobile, tablet, desktop, hd, 4k |
width | number | 1920 | Custom width in pixels |
height | number | 1080 | Custom height in pixels |
fullPage | boolean | false | Capture full page height |
delay | number | 0 | Delay in ms before capture |
waitForSelector | string | - | CSS selector to wait for |
Examples
Mobile Screenshot
curl "https://benit.uk/api/screenshot?url=https://example.com&viewport=mobile" \
-o mobile-screenshot.png
Full Page Capture
curl "https://benit.uk/api/screenshot?url=https://example.com&fullPage=true" \
-o fullpage.png
Custom Viewport
curl "https://benit.uk/api/screenshot?url=https://example.com&width=1200&height=800" \
-o custom.png
Wait for Dynamic Content
curl "https://benit.uk/api/screenshot?url=https://example.com&waitForSelector=.loaded-content" \
-o loaded.png
Rate Limits
| Tier | Screenshots/Month | Requests/Minute |
|---|---|---|
| Free | 50 | 5 |
| Hobby ($29) | 1,000 | 30 |
| Pro ($79) | 5,000 | 100 |
| Enterprise ($249) | 25,000 | 500 |
Error Handling
The API returns standard HTTP status codes:
| Code | Meaning |
|---|---|
| 200 | Success - screenshot returned |
| 400 | Bad Request - invalid URL or parameters |
| 429 | Rate Limited - too many requests |
| 500 | Server Error - please retry |
SDK & Libraries
Official SDKs coming soon. For now, use any HTTP client:
JavaScript (Fetch)
const response = await fetch(
'https://benit.uk/api/screenshot?url=https://example.com',
{ headers: { 'X-API-Key': 'your-api-key' } }
);
const blob = await response.blob();
// Use blob as image
Python (Requests)
import requests
response = requests.get(
'https://benit.uk/api/screenshot',
params={'url': 'https://example.com'},
headers={'X-API-Key': 'your-api-key'}
)
with open('screenshot.png', 'wb') as f:
f.write(response.content)
Use Cases
Website Monitoring
Automate visual checks of your websites. Capture scheduled screenshots to detect layout issues.
Social Media Previews
Generate Open Graph images and social sharing thumbnails for your content.
Documentation
Automatically capture screenshots for documentation, tutorials, and changelogs.
Testing
Integrate visual regression testing into your CI/CD pipeline.
Ready to Start?
Get your free API key and capture your first screenshot in minutes.
Get Free API Key