POST/api/crawl3 credits

Full page crawl: HTML, screenshot, metadata, links, network resources, console logs, and performance metrics.

Request body

FieldTypeDescription
urlstringRequired. The URL to process.
optionsobjectOptional configuration (see below).

Options

OptionTypeDescription
fullPagebooleanFull-page screenshot. Default: true.
widthnumberViewport width. Default: 1440.
heightnumberViewport height. Default: 900.
waitForSelectorstringWait for a CSS selector.
waitUntilstring"networkidle0", "networkidle2", "load", "domcontentloaded". Default: "networkidle0".

Example request

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"}'

Example response

{
"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
}

Error codes

StatusMeaning
400Missing or invalid URL / bad options
401Missing or invalid API key
403Insufficient credits
405Wrong HTTP method (use POST)
429Rate limit exceeded (60/min)
500Server error