Take a full-page PNG screenshot. Uploaded to CDN.
Request body
| Field | Type | Description |
|---|
url | string | Required. The URL to process. |
options | object | Optional configuration (see below). |
Options
| Option | Type | Description |
|---|
fullPage | boolean | Capture full scrollable page. Default: true. |
width | number | Viewport width in px. Default: 1440. |
height | number | Viewport height in px. Default: 900. |
omitBackground | boolean | Transparent background. Default: false. |
waitForSelector | string | Wait for a CSS selector before capturing. |
delay | number | Extra delay in ms (max 5000) before capture. |
waitUntil | string | "networkidle0", "networkidle2", "load", "domcontentloaded". Default: "networkidle0". |
curl -X POST https://crawlapi.dev/api/screenshot \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"url":"https://example.com","options":{"fullPage":true,"width":1280}}'
{
"success": true,
"data": {
"url": "https://cdn.crawlapi.dev/screenshots/abc123.png",
"sourceUrl": "https://example.com",
"width": 1280,
"height": 900,
"fullPage": true,
"size": "145.2 KB"
},
"credits_used": 2,
"credits_remaining": 498
}
Error codes
| Status | Meaning |
|---|
400 | Missing or invalid URL / bad options |
401 | Missing or invalid API key |
403 | Insufficient credits |
405 | Wrong HTTP method (use POST) |
429 | Rate limit exceeded (60/min) |
500 | Server error |