Start Crawl
POST/v1/crawl
Start a new crawl job using SmartCrawler. Choose between AI-powered extraction or cost-effective markdown conversion.
Request Body
Content-Type:application/json
Schema
Parameters
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
url | string | Yes | - | The starting URL for the crawl |
prompt | string | No* | - | Instructions for data extraction (*required when extraction_mode=true) |
extraction_mode | boolean | No | true | When false , enables markdown conversion mode (NO AI/LLM processing, 2 credits per page) |
cache_website | boolean | No | false | Whether to cache the website content |
depth | integer | No | 1 | Maximum crawl depth |
max_pages | integer | No | 10 | Maximum number of pages to crawl |
same_domain_only | boolean | No | true | Whether to crawl only the same domain |
batch_size | integer | No | 1 | Number of pages to process in each batch |
schema | object | No | - | JSON Schema object for structured output |
Example
Markdown Conversion Example (No AI/LLM)
For cost-effective HTML to markdown conversion without AI processing:When
extraction_mode: false
, the prompt
parameter is not required. This mode converts HTML to clean markdown with metadata extraction at only 2 credits per page (80% savings compared to AI mode).Response
- 200 OK: Crawl started successfully. Returns
{ "task_id": "<task_id>" }
. Use thistask_id
to retrieve the crawl result from the Get Crawl Result endpoint. - 422 Unprocessable Entity: Validation error.