Visitar URL original
Parameters - Introduction
Skip to main content

POST endpoint

https://data.decodo.com/v1/crawl

Input parameters

ParameterTypeRequiredDescription
urlstring✅The URL to start crawling from.
limitintegerMaximum number of pages to scrape. Accepts 1 to 10000.
max_depthintegerMaximum number of link hops from the starting URL. Pages at this depth are scraped, but their links aren’t followed.
sitemapstringPossible values: include, only, skip.
  • include - collect URLs from both the sitemap and page links.
  • only - crawl only URLs listed in the sitemap.
  • skip - ignore the sitemap and follow page links only.
Sitemap indexes are followed into their child sitemaps. With only, the starting URL itself is crawled only if the sitemap lists it. Default value is include.
select_pathsstring or arrayRegular 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_pathsstring or arrayRegular expression, or a list of them. URLs whose path matches any pattern are skipped. Example: ["^/case-studies"]
domain_filterstringWhich domains the crawler follows links to. Possible values: domain, subdomain, all.
  • domain - only the starting URL’s host.
  • subdomain - the host and its subdomains. Starting from github.com, links to docs.github.com are followed.
  • all - links to any domain.
Default value is domain.
outputstringFormat of each page’s content. Possible values: markdown, html. Default value is markdown.
max_durationintegerMaximum crawl time in seconds. When it’s reached, the crawl stops with status truncated, and the pages collected so far stay available.
follow_redirectsbooleanWhen true, redirects are followed. When false, a page that redirects fails. Default value is true.
JS_retrybooleanWhen set to true, a page that needs JavaScript is retried once with JavaScript rendering. See Billing for how retried pages are charged.
geostringCountry 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.
localestringLanguage and region sent to websites in the Accept-Language header. Example: en-US, de-DE
callback_urlstringAn http(s) URL that receives a POST request when the crawl finishes. See Webhooks.
passthroughstringAny text you want returned unchanged in the webhook payload, for example to confirm the webhook came from Decodo.

Output

Starting a crawl returns 202 Accepted with its crawl_id and links to its status and results. Use them to check status, fetch results, or cancel.
If a parameter is invalid, the request returns 400 with an error message, for example {"error": "limit must be between 1 and 10000"}.