PagePry
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/screenshot

Headers

HeaderRequiredDescription
x-api-keyYesYour PagePry API key
Content-TypeYesMust be application/json

Request body

ParameterTypeDefaultDescription
urlstringrequiredThe URL to capture. Must be a valid URL.
waitForstring"auto"Page readiness strategy: "auto", "networkidle", "domcontentloaded".
timeoutMsnumber30000Maximum wait time in ms (1,000–120,000).
viewportobject{width: 1280, height: 720}Browser viewport dimensions.
viewport.widthnumber1280Viewport width in pixels (320–3840).
viewport.heightnumber720Viewport height in pixels (240–2160).
fullPagebooleanfalseCapture the full scrollable page.
formatstring"png"Output format: "png", "jpeg", "webp".
qualitynumberImage quality 1–100 (JPEG and WebP only).
proxystring"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
  }
}
FieldTypeDescription
successbooleanAlways true for successful responses.
imageUrlstringURL to download the screenshot image.
metadata.statusCodenumberHTTP status code of the target page.
metadata.urlstringThe original requested URL.
metadata.resolvedUrlstringThe final URL after any redirects.
metadata.formatstringImage format of the screenshot.
metadata.widthnumberWidth of the screenshot in pixels.
metadata.heightnumberHeight of the screenshot in pixels.
metadata.loadTimeMsnumberTime 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.