Skip to main content
Use POST /v1/crawl to recursively crawl an entire website and extract content from every page. The crawl runs asynchronously — the endpoint returns a job_id immediately and processes pages in the background via CROWD (Firecrawl). Poll GET /v1/crawl/{job_id} to check progress and retrieve results as they accumulate. If you need to stop a crawl early, send DELETE /v1/crawl/{job_id}.
Before crawling, use POST /v1/map to discover the URL structure of the site. Map is much faster and lets you filter include_paths or exclude_paths to a relevant subset before committing to a full crawl.

Start a Crawl

Authentication: Authorization: Bearer sk-<key>

Request Parameters

string
required
Root URL to begin crawling from. The crawler follows links discovered on each page, staying within the same domain.
integer
default:"10"
Maximum number of pages to crawl. Accepted range: 1–100.
integer
Maximum link depth from the root URL. Accepted range: 1–10. Omit to crawl without a depth limit (up to limit pages).
string[]
default:"[\"markdown\"]"
Output formats to extract per page. Any combination of "markdown", "html", "links", "screenshot".
boolean
default:"true"
Strip navigation, headers, footers, and boilerplate from each page, returning only main content.
string[]
URL path patterns to skip during the crawl. Supports glob syntax (e.g. ["/blog/*", "/tag/*"]). Pages matching any pattern are not fetched.
string[]
Only crawl URLs matching at least one of these path patterns. Pages that do not match are skipped. Useful for restricting crawls to a specific section (e.g. ["/docs/*"]).

Response


Poll for Results

Poll this endpoint until status is completed, failed, or cancelled. Results accumulate progressively — data may already contain finished pages while status is still scraping.

Response

string
Current crawl status. One of:
  • scraping — crawl is in progress
  • completed — all pages processed successfully
  • failed — crawl encountered a fatal error
  • cancelled — crawl was stopped by a DELETE request
integer
Total number of pages queued for crawling.
integer
Number of pages that have finished processing so far.
integer
Number of CROWD credits consumed by this crawl job.
array
Array of page result objects. Each object contains the extracted content for one crawled page.

Cancel a Crawl

Cancels a running crawl job. Any pages already processed are still available via GET /v1/crawl/{job_id} with status: "cancelled". Returns 200 on success.

Code Example


Errors

Crawl jobs are ephemeral. Results are not stored indefinitely — retrieve them promptly after the status reaches completed. Polling a job_id for a purged job returns crawl_job_not_found (404).