Skip to main content
WEB_CRAWL follows a site’s links breadth first from a start address and reads each page the way WEB_SCRAPE does. You get every page’s Markdown, metadata and images in one result.

Request

Parameters

The crawl follows a link when it stays on the site (with or without www.), matches the path patterns, names a web page rather than a file (PDFs, images, archives and other files are skipped), and is allowed by the site’s robots.txt for every crawler.

Response

For example:

Credits

When you submit, the task holds 1 credit per page of maxPages (25 credits in the example above). When it completes, it is charged 1 credit for each page in pages, and the rest of the hold is released. Pages in failed are not charged. A crawl that returns 3 of 25 pages costs 3 credits. See Credits and limits for how holds work.

Limits and errors

  • When the start page cannot be read, the task fails with PAGE_UNAVAILABLE. Any other page that cannot be read goes to failed and the crawl continues.
  • Invalid options return 422 VALIDATION_ERROR naming the field.
  • WEB_CRAWL ignores markdown, rawResponse and searchQueries. It rejects html and analysis with 422 and citationAnalysis with 400; see unsupported flags.
  • Other request errors are listed in Errors.