Docs
API Reference
API Reference
Complete reference for the Captr API endpoints and parameters
API Reference
Authentication
All API requests must include your API key in the Authorization header:
X-API-Token: YOUR_API_TOKEN
Or add query parameter token
:
https://api.captr.dev/v1/capture?url=https://example.com&token=YOUR_API_TOKEN
Endpoints
Capture Screenshot
GET /v1/capture
Captures a screenshot of the specified URL.
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
url | string | - | The URL to capture (required) |
format | string | png | Output format: 'png', 'jpeg', 'webp' |
width | number | 1920 | Viewport width in pixels |
height | number | 1080 | Viewport height in pixels |
fullPage | boolean | false | Capture full page height |
quality | number | 80 | JPEG quality (1-100, only for JPEG format) |
Response
Returns a binary image file in the specified format (PNG/JPEG).
Status Codes
Code | Description |
---|---|
200 | Success |
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Invalid or missing API key |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error |
Example Request
curl -X GET "https://api.captr.dev/v1/capture?url=https://example.com&format=jpeg&width=1280&height=720" \
-H "X-API-Token: YOUR_API_TOKEN" \
--output screenshot.jpg
Rate Limits
- Free tier: 100 requests per month
- Pro tier: 60 requests per minute
- Enterprise tier: Custom limits available