POST endpoint
https://data.decodo.com/v1/crawl
Input parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | ✅ | The URL to start crawling from. |
limit | integer | Maximum number of pages to scrape. Accepts 1 to 10000. | |
max_depth | integer | Maximum number of link hops from the starting URL. Pages at this depth are scraped, but their links aren’t followed. | |
sitemap | string | Possible values: include, only, skip.
only, the starting URL itself is crawled only if the sitemap lists it. Default value is include. | |
select_paths | string or array | Regular expression, or a list of them. Only URLs whose path matches at least one pattern are crawled. The starting URL is crawled even if it doesn’t match. Paths are matched without a trailing slash, so use /?$ rather than /$ to match the end of a path. Example: ["^/blog"] | |
exclude_paths | string or array | Regular expression, or a list of them. URLs whose path matches any pattern are skipped. Example: ["^/case-studies"] | |
domain_filter | string | Which domains the crawler follows links to. Possible values: domain, subdomain, all.
domain. | |
output | string | Format of each page’s content. Possible values: markdown, html. Default value is markdown. | |
max_duration | integer | Maximum crawl time in seconds. When it’s reached, the crawl stops with status truncated, and the pages collected so far stay available. | |
follow_redirects | boolean | When true, redirects are followed. When false, a page that redirects fails. Default value is true. | |
JS_retry | boolean | When set to true, a page that needs JavaScript is retried once with JavaScript rendering. See Billing for how retried pages are charged. | |
geo | string | Country the pages are requested from. Accepts a full country name in any case (Germany, germany) or an uppercase 2-letter country code (DE). A lowercase code or an unrecognized country is ignored without an error, and pages are scraped from a random location. | |
locale | string | Language and region sent to websites in the Accept-Language header. Example: en-US, de-DE | |
callback_url | string | An http(s) URL that receives a POST request when the crawl finishes. See Webhooks. | |
passthrough | string | Any text you want returned unchanged in the webhook payload, for example to confirm the webhook came from Decodo. |
Output
Starting a crawl returns202 Accepted with its crawl_id and links to its status and results. Use them to check status, fetch results, or cancel.
400 with an error message, for example {"error": "limit must be between 1 and 10000"}.