Get HTML + screenshot in a single call.
Request body
| Field | Type | Description |
|---|
url | string | Required. The URL to process. |
options | object | Optional configuration (see below). |
Options
| Option | Type | Description |
|---|
fullPage | boolean | Full-page screenshot. Default: true. |
width | number | Viewport width. Default: 1440. |
height | number | Viewport height. Default: 900. |
waitForSelector | string | Wait for a CSS selector. |
waitUntil | string | "networkidle0", "networkidle2", "load", "domcontentloaded". Default: "networkidle0". |
curl -X POST https://crawlapi.dev/api/snapshot \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"url":"https://example.com"}'
{
"success": true,
"data": {
"url": "https://example.com",
"screenshot": {
"url": "https://cdn.crawlapi.dev/screenshots/abc123.png",
"size": "145.2 KB"
},
"html": "<!doctype html>...",
"htmlLength": 1256,
"meta": {
"title": "Example Domain",
"description": null
}
},
"credits_used": 3,
"credits_remaining": 497
}
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 |