POST
/api/crawlSubmit a Crawl
Submit a new web crawl job. Returns a jobId immediately — the crawl runs asynchronously. Use the job ID to poll for status or configure a webhook for completion notification.
Request
Example requestapplication/json
{
"url": "https://docs.acme.com",
"limit": 50,
"depth": 3,
"source": "all",
"formats": ["markdown", "html"],
"render": false,
"webhookUrl": "https://yourapp.com/webhooks/crawl"
}Parameters
| Parameter | Type |
|---|---|
urlreq | string |
limit | number |
depth | number |
source | "all" | "sitemaps" | "links" |
formats | string[] |
render | boolean |
webhookUrl | string |
jsonOptions | object |
options.includeExternalLinks | boolean |
options.includeSubdomains | boolean |
options.includePatterns | string[] |
options.excludePatterns | string[] |
Response
Success response201 Created
{
"success": true,
"jobId": "550e8400-e29b-41d4-a716-446655440000",
"cfJobId": "cf_job_abc123"
}400
Bad RequestInvalid parameters or blocked URL (private IP, invalid protocol).
401
UnauthorizedMissing or invalid API key.
402
Payment RequiredInsufficient credits. Upgrade your plan.
502
Bad GatewayCrawl submission to upstream service failed.
Related