How do I authenticate with this API?
Create an API key in your Datpaq dashboard and send it with each request as a bearer token in the Authorization header.
Puppeteer-powered captures with viewport simulation, format control, quality settings, and cropping. Up to 3840×2160 — perfect for OG cards, regression tests, or content archival.
Why Web Screenshot API
/api/v1/web-screenshot
Capture screenshot
Returns binary image data (Content-Type set to the chosen format). Pass url, width, height, format, quality, crop.
Service health
Status, version, uptime. Root / redirects here.
Prometheus metrics
Capture counts, render durations, blocked URL counters, format distribution.
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | yes | Target URL with http/https protocol. HTTPS required in production. |
| width | number | no | Viewport width 100–3840 (default 1280). |
| height | number | no | Viewport height 100–2160 (default 800). |
| format | string | no | "jpeg" | "png" | "webp" (default "jpeg"). |
| quality | number | no | Quality 10–100 for JPEG/WebP (default 100, ignored for PNG). |
| crop | string | no | Output dimensions as "WIDTHxHEIGHT". Must be <= viewport. |
| api_key | string | yes | API key via query string. Alternatively pass as x-api-key header. |
Success returns binary image bytes with the correct MIME type. Errors return JSON.
GET https://datpaq.com/api/v1/web-screenshot?api_key=YOUR_API_KEY\ &url=https://example.com\ &width=1920&height=1080\ &format=png
GET https://datpaq.com/api/v1/web-screenshot?api_key=YOUR_API_KEY\ &url=https://news.ycombinator.com\ &width=1200&height=800\ &crop=1200x630\ &format=jpeg&quality=85
Error reference
Captures never expose private networks or metadata endpoints. Validation happens at the DNS layer before the browser launches.
{
"error": "A valid URL with protocol (http/https) is required.",
"correlationId": "abc123-def456"
}FAQ
Create an API key in your Datpaq dashboard and send it with each request as a bearer token in the Authorization header.
Yes. Datpaq APIs include a free tier for building, testing, and small production workloads before you move to a paid plan.
Datpaq APIs use REST over HTTPS and return JSON by default. Endpoint docs show the supported methods, query parameters, request bodies, and response fields.
Each API documents rate limits, validation rules, and error responses in the landing page and API docs so integrations can retry and fail cleanly.
Hand the API a URL, get a clean image back. Pixel-perfect viewport simulation, safe-by-default SSRF protection, three formats.