POST/api/crawl

Submit 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

ParameterType
urlreqstring
limitnumber
depthnumber
source"all" | "sitemaps" | "links"
formatsstring[]
renderboolean
webhookUrlstring
jsonOptionsobject
options.includeExternalLinksboolean
options.includeSubdomainsboolean
options.includePatternsstring[]
options.excludePatternsstring[]

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