Page Screenshot API
developer/v1/domain/screenshotCaptures a 1280×720 viewport screenshot of a public web page using sandboxed Chromium on the EdgeDNS VPS. Returns a JPEG as base64 with a preview and download in both EdgeDNS playgrounds.
What It Does
Creates a fresh browser and context, loads the URL with JavaScript enabled, waits for DOMContentLoaded plus 500 milliseconds, and captures the 1280×720 viewport as a quality-70 JPEG. The screenshot is limited to 1 MiB and returned inline as base64; this is not a full-page image or a permanent image-hosting URL. Each response identifies the request environment and shared VPS browser runtime. Private destinations, custom scripts, credentials, service workers, downloads and WebSockets are blocked; TLS verification stays enabled. One browser job runs at a time; busy responses return 429 with Retry-After and are uncharged. No capture is served from cache.
Why It's Useful
See what a public deployment displays and retain a visual snapshot for reviews or incident investigations. The playground previews the image and downloads it without requiring manual base64 decoding.
Use Cases
Visual Deployment Check
Capture the public deployment after a release.
See obvious rendering failures alongside other EdgeDNS diagnostics.
Incident Evidence
Record the page shown from the VPS while investigating an outage.
Retain a timestamped visual observation from a known vantage point.
Review Downloads
Preview a public page in the playground and download its screenshot.
Share a JPEG without decoding the API response manually.
Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
url | query | string | Required | Public HTTP(S) URL on port 80 or 443. Bare domains use HTTPS. Credentials and fragments are not accepted.Example: https://example.com/ |
Response Fields
| Field | Type | Description |
|---|---|---|
screenshot.mime_type | string | Always image/jpeg. |
screenshot.base64 | string | Base64-encoded JPEG, decoded image at most 1048576 bytes. |
screenshot.width | number | Viewport width: 1280 pixels. |
screenshot.height | number | Viewport height: 720 pixels. |
screenshot.byte_length | number | Decoded JPEG size in bytes. |
title | string | Observed document title. |
final_url | string | URL observed after navigation and redirects. |
status | number | Observed HTTP status; inspect it to distinguish an origin error page from the expected page. |
measurement | object | VPS source, request environment, shared runtime, exact release and observation time. |
Code Examples
Replace YOUR_API_KEY with your API key. This endpoint requires the developer plan or higher; see plans and usage limits.
curl --request GET 'https://api.edgedns.dev/v1/domain/screenshot?url=https%3A%2F%2Fexample.com%2F' \
--header "Authorization: Bearer YOUR_API_KEY"const response = await fetch(
"https://api.edgedns.dev/v1/domain/screenshot?url=https%3A%2F%2Fexample.com%2F",
{
"method": "GET",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
);
if (!response.ok) {
throw new Error(`EdgeDNS returned HTTP ${response.status}`);
}
const data = await response.json();
console.log(data);import requests
response = requests.request(
'GET',
"https://api.edgedns.dev/v1/domain/screenshot?url=https%3A%2F%2Fexample.com%2F",
headers={'Authorization': 'Bearer YOUR_API_KEY'},
timeout=60,
)
response.raise_for_status()
data = response.json()
print(data)Read the full Page Screenshot guide
Learn the concepts, choose a practical workflow, and interpret the observations from Page Screenshot before acting on them. Run supported checks via MCP or through REST.
Read the guide →Related Endpoints
External References
Learn more about the standards and protocols behind this endpoint.
Try This Endpoint
Test the Page Screenshot endpoint live in the playground.