ScreenshotAPI
Blog Site Dashboard

API Reference

The ScreenshotAPI provides a simple, powerful REST endpoint to capture pixel-perfect screenshots of any public or authenticated webpage. We handle headless browser orchestration, waiting, and rendering.

Authentication

Authenticate your API requests by providing your API key in the X-API-Key HTTP header. You can manage your API keys in your dashboard.

Keep your keys secure — do not embed them in client-side applications.

Capture Screenshot

Creates a new screenshot capture. The API is synchronous; the HTTP request will remain open while the screenshot is rendered, and will return the raw binary file directly in the response.

Request Parameters

url string Required
The absolute HTTP or HTTPS URL of the website to capture.
format string
The output format of the screenshot. Options: png, jpeg, webp, pdf. Defaults to png.
full_page boolean
Set to true to capture the entire height of the page. Defaults to false.
width integer
The browser viewport width in pixels. Defaults to 1440.
height integer
The browser viewport height in pixels. Defaults to 1024.
wait_for string
A CSS selector to wait for before taking the screenshot. Useful for client-side rendered apps.
delay integer
Time in milliseconds to wait after page load before capturing. Max: 10000ms. Defaults to 0.

Response

A successful request returns the literal binary data of the file (e.g., image/png or application/pdf). You should stream this directly to a file on your disk or to your cloud storage.

The response headers will include X-Capture-Id which corresponds to the record stored in your dashboard history.

cURL
Python
Node.js
curl -X POST https://www.screenshotapi.se/v1/capture \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: sk_live_...' \
  -d '{
    "url": "https://example.com",
    "format": "png",
    "full_page": true,
    "width": 1440,
    "height": 1024
  }' \
  --output example.png
200 OK image/png
/* Binary image data is returned directly */
/* Response headers include: */
Content-Type: image/png
X-Capture-Id: 1042