POST/api/crawl3 creditsFull page crawl: HTML, screenshot, metadata, links, network resources, console logs, and performance metrics.
| Field | Type | Description |
|---|---|---|
url | string | Required. The URL to process. |
options | object | Optional configuration (see below). |
| 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/crawl \-H "Content-Type: application/json" \-H "x-api-key: YOUR_API_KEY" \-d '{"url":"https://example.com"}'
{"success": true,"data": {"url": "https://example.com","html": "<!doctype html>...","htmlLength": 1256,"screenshot": "https://cdn.crawlapi.dev/screenshots/abc123.png","meta": {"title": "Example Domain","performance": {"domContentLoaded": 120,"loadComplete": 250,"ttfb": 45}},"links": ["https://www.iana.org/domains/example"],"linkCount": 1,"resources": [{"url": "https://example.com/","status": 200,"contentType": "text/html","size": 1256}],"resourceCount": 1,"consoleLogs": []},"credits_used": 3,"credits_remaining": 497}
| 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 |