API · Web
POST /web/crawl
Crawl a site from a URL: up to 10 pages as Markdown in about 25 s, with a cursor.
| Request | POST /v1/web/crawl |
| Operation id | web.crawl.get |
| Cost | 5 credits, refunded if the call fails |
| Auth | API key: Authorization: Bearer <key> or x-api-key. |
Crawl a site from a URL: up to 10 pages as Markdown in about 25 s, with a cursor.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
url | string | yes | A public http(s) URL. |
limit | integer | no | |
max_depth | integer | no | |
include_paths | string[] | no | |
exclude_paths | string[] | no | |
allow_backward_links | boolean | no | |
allow_external_links | boolean | no | |
formats | string[] | no | Any of markdown, html, rawHtml, links, text, images (default ["markdown"]). |
only_main_content | boolean | no | |
cursor | string | no | A partial answer’s next_cursor, to continue the same crawl. |
Responses
| Status | Meaning | Schema |
|---|---|---|
200 | The pages crawled. | |
400 | Invalid input. Nothing was charged. | Error |
401 | Missing or invalid API key. | Error |
402 | Not enough credits, a spend cap was reached, or payment is required. | Error |
403 | The target is private, or the account is suspended. | Error |
404 | That host does not resolve or the page does not exist. | Error |
429 | Too many requests. Wait for Retry-After seconds. | Error |
503 | Web is temporarily unavailable. Retryable; nothing was charged. | Error |
Errors use one shape everywhere; see Errors for every code and what to do.