ScrapingCrawl
Crawl Endpoint
Crawl
Recursively crawl a website following links within the same domain. Uses BFS (breadth-first search) with configurable depth and path filtering. Returns scraped content for each page.
POST
/v1/crawlRecursively crawl a website and return content for each discovered page.
Request Body
| Parameter | Type | Description |
|---|---|---|
urlrequired | string | Starting URL to crawl from |
limit | number | Max pages to crawl (1-100). Defaults to 10 |
maxDepth | number | Max link depth from start URL (1-10). Defaults to 3 |
includePaths | string[] | Regex patterns — only crawl paths matching at least one pattern |
excludePaths | string[] | Regex patterns — skip paths matching any pattern |
allowSubdomains | boolean | Follow links to subdomains of the base domain. Defaults to false |
ignoreQueryParameters | boolean | Strip query parameters when deduplicating URLs. Defaults to false |
type | "html" | "markdown" | Output content format. Defaults to "markdown" |
onlyMainContent | boolean | Extract only main content (strips nav, ads, footers). Defaults to true |
proxy | { country: string } | Proxy for geo-targeted requests. See supported countries |
Example Request
Example Response
Response Structure
Top-level Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Whether the crawl completed successfully |
data | CrawlPageResult[] | Array of results, one per crawled page |
total | number | Total pages attempted |
completed | number | Successfully scraped pages |
failed | number | Failed pages |
cost | number | Total cost in USD ($0.002 per successfully scraped page; failed pages are not charged) |
error | string | Error message if crawl failed entirely |
timestamp | string | ISO timestamp of the response |
CrawlPageResult Object
Each item in the
data array contains:| Field | Type | Description |
|---|---|---|
url | string | Page URL |
html | string | null | HTML content (when type is "html", null otherwise) |
markdown | string | null | Markdown content (when type is "markdown", null otherwise) |
statusCode | number | null | HTTP status code |
success | boolean | Whether scraping this page succeeded |
error | string | Error message if page failed (optional) |
metadata | object | Page metadata — title, description, etc. (optional) |
depth | number | Link depth from start URL (0 = start page) |
Pricing
Charged per page at
$$0.002/page. Only successfully scraped pages are charged — failed pages incur no cost.Example: crawling 20 pages where 18 succeed costs
18 x $$0.002 = $$0.036.