Web Screenshot API
JPEG / PNG / WebP
Up to 4K
SSRF-safe

Any URL.Pixel-perfect screenshot.

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.

3 formats · JPEG, PNG, WebP3840×2160 · max viewport10–100 · quality dialSSRF · safe by default

Why Web Screenshot API

Captures that don't need babysitting.

Puppeteer + Sharp
Headless Chromium captures the page, Sharp converts and optimizes. Production-tested pipeline, not a toy.
JPEG, PNG, WebP
Pick the format that fits — lossless PNG for fidelity, WebP for size, JPEG for compatibility.
Any Viewport
Simulate any viewport from 100×100 to 3840×2160. Mobile, tablet, desktop, ultra-wide — all just query params.
Server-Side Crop
Pass `crop=1200x630` and you get a social-card-ready image without resizing on the client.
SSRF-Safe
Private networks, localhost, link-local, and cloud metadata endpoints blocked at the DNS resolution layer.
Pure GET
All capture happens via a single GET — easy to cache, easy to integrate with CDNs, easy to share for debugging.

/api/v1/web-screenshot

Endpoints, at a glance.

One capture route, two ops routes. Every route is GET for cache-friendliness.
GET/web-screenshot

Capture screenshot

Returns binary image data (Content-Type set to the chosen format). Pass url, width, height, format, quality, crop.

PRIMARY
GET/health

Service health

Status, version, uptime. Root / redirects here.

GET/metrics

Prometheus metrics

Capture counts, render durations, blocked URL counters, format distribution.

ParameterTypeRequiredDescription
urlstringyesTarget URL with http/https protocol. HTTPS required in production.
widthnumbernoViewport width 100–3840 (default 1280).
heightnumbernoViewport height 100–2160 (default 800).
formatstringno"jpeg" | "png" | "webp" (default "jpeg").
qualitynumbernoQuality 10–100 for JPEG/WebP (default 100, ignored for PNG).
cropstringnoOutput dimensions as "WIDTHxHEIGHT". Must be <= viewport.
api_keystringyesAPI key via query string. Alternatively pass as x-api-key header.

Requests & responses.

Success returns binary image bytes with the correct MIME type. Errors return JSON.

High-resolution PNG
1920×1080 lossless PNG of any URL.
GET https://datpaq.com/api/v1/web-screenshot?api_key=YOUR_API_KEY\
  &url=https://example.com\
  &width=1920&height=1080\
  &format=png
Social card crop
1200×630 JPEG cropped from a 1200×800 capture.
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
Health
https://datpaq.com/api/v1/web-screenshot/health
Metrics
https://datpaq.com/api/v1/web-screenshot/metrics

Error reference

Predictable errors, always structured.

Captures never expose private networks or metadata endpoints. Validation happens at the DNS layer before the browser launches.

400Missing URL
Required url parameter not provided. Must include http:// or https:// protocol.
400Invalid Parameters
Width, height, quality, or format outside accepted ranges. Check the parameters table above.
400Invalid Crop
Crop must match "WIDTHxHEIGHT" and be ≤ viewport. Out-of-range or malformed crop is rejected.
400Blocked Destination
Target URL resolves to a private network, localhost, link-local, or cloud metadata service. SSRF protection.
400HTTPS Required
In production, only HTTPS URLs are accepted. Use HTTPS or test in a development environment.
429Rate Limited
More than 10 captures per 15 minutes. Browser automation is resource-intensive; back off and retry.
500Capture Failed
Page failed to load or render. CorrelationId in the response helps with debugging.
Example error response
{
  "error": "A valid URL with protocol (http/https) is required.",
  "correlationId": "abc123-def456"
}

FAQ

API questions developers ask first.

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.

Is there a free tier?

Yes. Datpaq APIs include a free tier for building, testing, and small production workloads before you move to a paid plan.

What format do requests and responses use?

Datpaq APIs use REST over HTTPS and return JSON by default. Endpoint docs show the supported methods, query parameters, request bodies, and response fields.

Where can I see limits and errors?

Each API documents rate limits, validation rules, and error responses in the landing page and API docs so integrations can retry and fail cleanly.

Snapshot the web, in one call.

Hand the API a URL, get a clean image back. Pixel-perfect viewport simulation, safe-by-default SSRF protection, three formats.