Screenshots
API Reference
Complete request and response schema for the Screenshot API.
The Screenshot API is coming soon. This is a preview of the planned schema.
POST /screenshot
Capture a screenshot of a web page.
Endpoint
POST https://api.pagepry.com/v1/screenshotHeaders
| Header | Required | Description |
|---|---|---|
x-api-key | Yes | Your PagePry API key |
Content-Type | Yes | Must be application/json |
Request body
| Parameter | Type | Default | Description |
|---|---|---|---|
url | string | required | The URL to capture. Must be a valid URL. |
waitFor | string | "auto" | Page readiness strategy: "auto", "networkidle", "domcontentloaded". |
timeoutMs | number | 30000 | Maximum wait time in ms (1,000–120,000). |
viewport | object | {width: 1280, height: 720} | Browser viewport dimensions. |
viewport.width | number | 1280 | Viewport width in pixels (320–3840). |
viewport.height | number | 720 | Viewport height in pixels (240–2160). |
fullPage | boolean | false | Capture the full scrollable page. |
format | string | "png" | Output format: "png", "jpeg", "webp". |
quality | number | — | Image quality 1–100 (JPEG and WebP only). |
proxy | string | "none" | Proxy type: "none", "datacenter", "residential". |
Success response (200)
{
"success": true,
"imageUrl": "https://cdn.pagepry.com/screenshots/abc123.png",
"metadata": {
"statusCode": 200,
"url": "https://example.com",
"resolvedUrl": "https://example.com/",
"format": "png",
"width": 1280,
"height": 720,
"loadTimeMs": 1200
}
}| Field | Type | Description |
|---|---|---|
success | boolean | Always true for successful responses. |
imageUrl | string | URL to download the screenshot image. |
metadata.statusCode | number | HTTP status code of the target page. |
metadata.url | string | The original requested URL. |
metadata.resolvedUrl | string | The final URL after any redirects. |
metadata.format | string | Image format of the screenshot. |
metadata.width | number | Width of the screenshot in pixels. |
metadata.height | number | Height of the screenshot in pixels. |
metadata.loadTimeMs | number | Time in milliseconds to load and render the page. |
Error response
{
"success": false,
"error": "Human-readable error message"
}See Errors for the full list of error codes.

