📸 Screenshot API Documentation

Capture screenshots and generate PDFs of any website with a simple GET request. Works from any language — no SDK needed.

Base URL: https://api.pandan.is

Quick Start

No signup required for the free tier. Just make a GET request:

curl "https://api.pandan.is/v1/screenshot?url=https://example.com" -o screenshot.png

That's it! You'll get a PNG screenshot of the page.

Authentication

The free tier (100 req/month) works without any authentication. For higher limits, register for an API key:

curl -X POST https://api.pandan.is/v1/register \
  -H "Content-Type: application/json" \
  -d '{"email": "you@example.com"}'

Then include your key in requests via header or query parameter:

# Header (recommended)
curl -H "X-API-Key: pk_your_key_here" "https://api.pandan.is/v1/screenshot?url=https://example.com"

# Query parameter
curl "https://api.pandan.is/v1/screenshot?url=https://example.com&api_key=pk_your_key_here"

GET /v1/screenshot

GET /v1/screenshot?url={url}

Captures a screenshot of the given URL and returns it as an image.

ParameterTypeRequiredDescription
urlstringrequiredURL to capture (must include http/https)
widthintegeroptionalViewport width in pixels (default: 1280, max: 3840)
heightintegeroptionalViewport height in pixels (default: 800, max: 3840)
formatstringoptionalpng or jpeg (default: png)
qualityintegeroptionalJPEG quality 1-100 (default: 80)
full_pagebooleanoptionalCapture full scrollable page (default: false)
delayintegeroptionalWait ms before capture, max 10000 (default: 0)

Code Examples

cURL

curl "https://api.pandan.is/v1/screenshot?url=https://github.com&width=1920&height=1080&format=jpeg&quality=90" -o github.jpg

JavaScript (Node.js)

const response = await fetch(
  'https://api.pandan.is/v1/screenshot?url=https://github.com&format=png'
);
const buffer = await response.arrayBuffer();
fs.writeFileSync('screenshot.png', Buffer.from(buffer));

Python

import requests
r = requests.get('https://api.pandan.is/v1/screenshot', params={
    'url': 'https://github.com',
    'width': 1920,
    'format': 'jpeg'
})
with open('screenshot.jpg', 'wb') as f:
    f.write(r.content)

PHP

$img = file_get_contents('https://api.pandan.is/v1/screenshot?url=https://github.com');
file_put_contents('screenshot.png', $img);

GET /v1/pdf

GET /v1/pdf?url={url}

Generates a PDF document of the given URL.

ParameterTypeRequiredDescription
urlstringrequiredURL to render as PDF
page_formatstringoptionalPage format: A4, Letter, Legal, etc. (default: A4)
landscapebooleanoptionalLandscape orientation (default: false)
curl "https://api.pandan.is/v1/pdf?url=https://example.com&page_format=A4" -o page.pdf

POST /v1/register

Register for an API key to get higher rate limits.

curl -X POST https://api.pandan.is/v1/register \
  -H "Content-Type: application/json" \
  -d '{"email": "dev@example.com"}'

# Response:
# {"message":"API key created!","api_key":"pk_abc123...","plan":"free","limits":{...}}

Rate Limits

PlanRequests/monthMax ViewportPrice
Free1001280px$0
Pro5,0003840px (4K)$9/mo
Business50,0003840px (4K)$49/mo

Rate limit headers are included in every response: X-RateLimit-Limit, X-RateLimit-Remaining, X-Plan

Error Handling

// 400 — Bad request (missing/invalid URL)
{"error": "Missing required parameter: url"}

// 401 — Invalid API key
{"error": "Invalid API key"}

// 429 — Rate limit exceeded
{"error": "Monthly rate limit exceeded", "usage": {...}}

// 500 — Capture failed
{"error": "Failed to capture screenshot", "detail": "..."}