/ Screenshot API
Screenshot API
Capture full-page or viewport screenshots of any website programmatically. Returns PNG or JPEG image bytes.
Endpoint
GEThttps://toolpix.dev/api/screenshot
Authentication
Requires an API key with screenshot permission.
# Header (recommended)
curl -H "x-api-key: tpx_your_key_here" \
"https://toolpix.dev/api/screenshot?url=https://example.com" -o shot.png
# Query parameter
curl "https://toolpix.dev/api/screenshot?url=https://example.com&key=tpx_your_key_here" -o shot.pngGet your API key →Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
url | string | required | Target URL to capture (must include https://) |
width | number | 1280 | Viewport width in pixels (320–3840) |
height | number | 800 | Viewport height in pixels (200–2160) |
format | string | png | Output format: png or jpeg |
fullPage | boolean | false | Capture full scrollable page height |
quality | number | 90 | JPEG quality 1–100 (ignored for PNG) |
key | string | — | API key (alternative to x-api-key header) |
Examples
Basic screenshot (PNG)
curl "https://toolpix.dev/api/screenshot?url=https://example.com&key=YOUR_KEY" -o screenshot.pngFull page, custom viewport
curl "https://toolpix.dev/api/screenshot?url=https://example.com&width=1920&height=1080&fullPage=true&key=YOUR_KEY" -o full.pngJPEG with custom quality
curl "https://toolpix.dev/api/screenshot?url=https://example.com&format=jpeg&quality=80&key=YOUR_KEY" -o shot.jpgNode.js
const res = await fetch(
"https://toolpix.dev/api/screenshot?url=https://example.com",
{ headers: { "x-api-key": "tpx_your_key_here" } }
);
const buffer = await res.arrayBuffer();
fs.writeFileSync("screenshot.png", Buffer.from(buffer));Response
On success, returns raw image bytes with Content-Type: image/png or image/jpeg. On error, returns JSON:
{ "error": "Invalid URL" }Error Codes
400Missing or invalid URL401Missing API key403Invalid key or missing screenshot permission429Monthly request limit exceeded500Screenshot capture failedRate Limits by Plan
| Plan | Screenshots/mo | Price |
|---|---|---|
| Free | — | Free |
| Basic | 100 | $4.99/mo |
| Pro | 1,000 | $9.99/mo |
| Unlimited | 10,000 | $29.99/mo |