Crawl reads a website page by page: it starts at a URL, follows the links it finds, and returns every page it reads in the formats you ask for, Markdown by default. For details, see the Crawl Endpoint API Reference.

Installation

Basic usage

The SDKs’ crawl() starts the crawl, waits for it to finish and returns every page.
Output:
Output (Python)

Scrape options

scrapeOptions sets the formats and page options for every page, like in Scrape. Without it, every page comes back as Markdown.

Start a crawl and check later

A crawl runs in the background. Start it, keep its id, and check on it when you want.
Response
creditsReserved is set aside from your balance when the crawl starts: limit pages at the cost of one page. When the crawl ends, you pay for the pages it read and the rest comes back.

Checking crawl status

Response

Response

Choose which pages to read

cURL
This crawl starts at /3/ and reads three pages, all under /3/library/.

Cancelling a crawl

Response
The pages read before the cancel stay available, and you pay only for them. Cancelling a crawl that already finished changes nothing and answers with its final status, like completed.

Failed and blocked pages

Add ?errors=1 to the status URL to see the pages that failed, and the ones robots.txt doesn’t allow.
Response

Important details

  • Each page costs what a scrape of it costs: 1 credit, 5 with json, question or highlights.
  • A crawl needs enough credits for its reservation. Lower limit if your balance is short.
  • robots.txt is always respected.
  • Results are kept for 24 hours after the crawl ends.