/ Screenshot API
Docs/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.png
Get your API key →

Parameters

ParameterTypeDefaultDescription
urlstringrequiredTarget URL to capture (must include https://)
widthnumber1280Viewport width in pixels (320–3840)
heightnumber800Viewport height in pixels (200–2160)
formatstringpngOutput format: png or jpeg
fullPagebooleanfalseCapture full scrollable page height
qualitynumber90JPEG quality 1–100 (ignored for PNG)
keystringAPI 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.png

Full page, custom viewport

curl "https://toolpix.dev/api/screenshot?url=https://example.com&width=1920&height=1080&fullPage=true&key=YOUR_KEY" -o full.png

JPEG with custom quality

curl "https://toolpix.dev/api/screenshot?url=https://example.com&format=jpeg&quality=80&key=YOUR_KEY" -o shot.jpg

Node.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 URL
401Missing API key
403Invalid key or missing screenshot permission
429Monthly request limit exceeded
500Screenshot capture failed

Rate Limits by Plan

PlanScreenshots/moPrice
FreeFree
Basic100$4.99/mo
Pro1,000$9.99/mo
Unlimited10,000$29.99/mo

View full pricing →