Skip to main content

Page Screenshot API

developer
GET/v1/domain/screenshot

Captures 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

Frontend Engineer

Visual Deployment Check

Capture the public deployment after a release.

See obvious rendering failures alongside other EdgeDNS diagnostics.

SRE

Incident Evidence

Record the page shown from the VPS while investigating an outage.

Retain a timestamped visual observation from a known vantage point.

Product Manager

Review Downloads

Preview a public page in the playground and download its screenshot.

Share a JPEG without decoding the API response manually.

Parameters

NameLocationTypeRequiredDescription
urlquerystringRequiredPublic HTTP(S) URL on port 80 or 443. Bare domains use HTTPS. Credentials and fragments are not accepted.Example: https://example.com/

Response Fields

FieldTypeDescription
screenshot.mime_typestringAlways image/jpeg.
screenshot.base64stringBase64-encoded JPEG, decoded image at most 1048576 bytes.
screenshot.widthnumberViewport width: 1280 pixels.
screenshot.heightnumberViewport height: 720 pixels.
screenshot.byte_lengthnumberDecoded JPEG size in bytes.
titlestringObserved document title.
final_urlstringURL observed after navigation and redirects.
statusnumberObserved HTTP status; inspect it to distinguish an origin error page from the expected page.
measurementobjectVPS 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
curl --request GET 'https://api.edgedns.dev/v1/domain/screenshot?url=https%3A%2F%2Fexample.com%2F' \
  --header "Authorization: Bearer YOUR_API_KEY"
JavaScript
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);
Python
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.

    Page Screenshot API Reference | EdgeDNS