We use cookies

We use cookies to enhance your experience and analyse site usage.

API Documentation

The WebCaptureAPI screenshot API lets you capture pixel-perfect screenshots of any public webpage using headless Chrome. Authenticate with an API key, pass a URL, and receive the image in the response.

Quick Start

  1. 1Sign up at webcaptureapi.com — free tier, no credit card required.
  2. 2Go to Dashboard → API Keys and create a new key.
  3. 3Make your first request using the example below.
cURL
curl -H "x-api-key: sk_your_api_key" \
  "https://api.webcaptureapi.com/api/screenshot?url=https://example.com&format=png&width=1280"

Authentication

All requests must include your API key in the x-api-key HTTP header. API keys are prefixed with sk_.

Header
x-api-key: sk_your_api_key

Keep your API key secret. You can rotate or delete keys at any time from your dashboard.

Endpoint

GEThttps://api.webcaptureapi.com/api/screenshot

Returns the screenshot as a binary image stream. The Content-Type response header will be image/png or image/jpeg depending on the requested format.

Query Parameters

ParameterTypeRequiredDescription
urlstringYesThe full URL of the webpage to capture (must be publicly accessible).
formatstringNoOutput image format. Accepted values: png (default), jpeg.
widthintegerNoViewport width in pixels. Default: 1280.
heightintegerNoViewport height in pixels. Default: 800.
full_pagebooleanNoSet to true to capture the full scrollable page, not just the visible viewport. Default: false.
qualityintegerNoJPEG compression quality (1–100). Only applies when format=jpeg. Default: 90.
delayintegerNoWait time in milliseconds before capturing, useful for JavaScript-heavy pages. Default: 0. Max: 10000.

Code Examples

JavaScript (fetch)

JavaScript
const response = await fetch(
  'https://api.webcaptureapi.com/api/screenshot?' +
  new URLSearchParams({ url: 'https://example.com', format: 'png', width: '1280' }),
  { headers: { 'x-api-key': 'sk_your_api_key' } }
)

if (!response.ok) throw new Error(`API error: ${response.status}`)

const blob = await response.blob()
const imgUrl = URL.createObjectURL(blob)

Python (requests)

Python
import requests

response = requests.get(
    'https://api.webcaptureapi.com/api/screenshot',
    params={'url': 'https://example.com', 'format': 'png', 'width': 1280},
    headers={'x-api-key': 'sk_your_api_key'},
)
response.raise_for_status()

with open('screenshot.png', 'wb') as f:
    f.write(response.content)

Full-page capture (cURL)

cURL
# Full-page screenshot (captures entire scrollable page)
curl -H "x-api-key: sk_your_api_key" \
  "https://api.webcaptureapi.com/api/screenshot?url=https://example.com&full_page=true&format=jpeg&quality=85"

Error Codes

400Bad RequestThe url parameter is missing or malformed.
401UnauthorizedThe x-api-key header is missing or the key is invalid.
403ForbiddenYour API key is valid but your monthly quota has been exhausted.
422UnprocessableThe target URL is unreachable or returned an error.
429Too Many RequestsYou have exceeded the per-minute rate limit for your plan.
500Server ErrorAn internal error occurred. Retry the request after a short delay.

Rate Limits & Quotas

Each plan has a monthly screenshot quota. Exceeding the quota returns a 403 error until the next billing cycle. Quotas reset on the 1st of each month.

Free100 / month10 / minute1 key
Starter2,000 / month30 / minute2 keys
Pro15,000 / month60 / minute5 keys
Business60,000 / month120 / minuteUnlimited keys

Columns: Plan — Monthly quota — Per-minute rate limit — API keys allowed

Ready to start capturing?

Free tier includes 100 screenshots per month — no credit card required.