Everything you need to integrate CaptureAPI into your application. Get started in under 5 minutes.
Register with your email to get a free API key instantly.
Pass your API key in the header and the target URL as a parameter.
Receive PNG, PDF, or JSON response in under 2 seconds.
Follow these four steps to start capturing screenshots, generating PDFs, and creating OG images:
# 1. Get your free API key
curl -X POST https://captureapi.dev/api/auth/register \
-H "Content-Type: application/json" \
-d '{"email": "dev@example.com"}'
# Response: {"apiKey": "cap_abc123...", "plan": "free"}
# 2. Take your first screenshot
curl "https://captureapi.dev/api/v1/screenshot?url=https://example.com" \
-H "X-API-Key: cap_abc123..." \
-o screenshot.png
# 3. Generate a PDF
curl -X POST "https://captureapi.dev/api/v1/pdf" \
-H "X-API-Key: cap_abc123..." \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}' \
-o page.pdf
# 4. Create an OG image
curl "https://captureapi.dev/api/v1/og?title=Hello+World&theme=dark" \
-H "X-API-Key: cap_abc123..." \
-o og-image.pnghttps://captureapi.dev/api/v1All API endpoints are served over HTTPS. HTTP requests are automatically redirected.
/api/v1/screenshotCapture pixel-perfect screenshots of any web page with customizable viewport, format, and timing options.
/api/v1/pdfConvert HTML content or URLs to PDF documents with full control over page layout, margins, and headers.
/api/v1/ogGenerate dynamic Open Graph images for social media with customizable templates, themes, and fonts.
/api/auth/registerLearn how to authenticate your API requests, manage your API keys, and understand rate limits.
Evaluating CaptureAPI against other screenshot and PDF providers? See our comparison of pricing, features, and EU data residency.
API responses vary by endpoint. Screenshot and OG image endpoints return binary image data by default. PDF endpoints return binary PDF data. All endpoints support a ?json=true query parameter to receive a JSON response with a temporary URL instead.
// JSON response mode
GET /api/v1/screenshot?url=https://example.com&json=true
{
"success": true,
"data": {
"url": "https://cdn.captureapi.dev/captures/abc123.png",
"width": 1280,
"height": 720,
"format": "png",
"size": 245678,
"expiresAt": "2026-03-18T12:00:00Z"
},
"meta": {
"requestId": "req_abc123",
"duration": 1250,
"plan": "pro",
"remaining": 1987
}
}All errors return a consistent JSON structure with an error code and human-readable message:
{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Monthly request limit exceeded. Upgrade your plan for more requests.",
"status": 429
}
}| Status | Code | Description |
|---|---|---|
| 400 | INVALID_PARAMS | Missing or invalid request parameters |
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 403 | PLAN_LIMIT | Feature not available on your plan |
| 429 | RATE_LIMIT_EXCEEDED | Monthly or per-second rate limit exceeded |
| 500 | CAPTURE_FAILED | Screenshot or PDF generation failed |
| 504 | TIMEOUT | Page load exceeded the timeout limit |
Rate limit information is included in every response via headers:
X-RateLimit-Limit: 2000
X-RateLimit-Remaining: 1987
X-RateLimit-Reset: 2026-04-01T00:00:00Z