# Crawl

`POST /v1/crawl` finds the pages of a site and reads them. Costs 1 credit per page read. Pass `async: true` to return immediately with a run id; a request that runs longer than the response window also returns `202` with a run id. Poll `GET /v1/runs/{id}` for the result. With no `includePaths`, a start URL that has a path stays under that path.

Product page: [/crawl](/crawl).

## Example

```bash
curl -s -X POST https://webcrawl.app/v1/crawl \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://docs.example.com/guides","maxPages":25,"excludePaths":["/guides/archive"]}'
```

## Request body

- **`url`** (string (required)): Start URL
- **`maxPages`** (integer): Most pages to read (`limit` is accepted as an alias)
- **`includePaths` / `excludePaths`** (string[]): Path scope filters
- **`includeSubdomains`** (boolean): Default `false`
- **`onlyRootDomain`** (boolean): Restrict to the root domain
- **`extractStructured`** (boolean): Also extract structured data from each page (adds credits per page)
- **`async`** (boolean): Return a run id immediately
- **`timeout`** (integer): Milliseconds per page (default 20000)

## Related

- [Map](/docs/map) to discover URLs without reading bodies
- [Scrape](/docs/scrape) for a single page
- [API reference](/docs/api)

## Docs index

- [Overview](https://webcrawl.app/docs)
- [Scrape](https://webcrawl.app/docs/scrape)
- [Crawl](https://webcrawl.app/docs/crawl)
- [Map](https://webcrawl.app/docs/map)
- [Search](https://webcrawl.app/docs/search)
- [Extract](https://webcrawl.app/docs/extract)
- [MCP server](https://webcrawl.app/docs/mcp)
- [MCP setup](https://webcrawl.app/docs/mcp-setup)
- [Self-hosting](https://webcrawl.app/docs/self-hosting)
- [SDKs and CLI](https://webcrawl.app/docs/sdks)
- [API reference](https://webcrawl.app/docs/api)

HTML: https://webcrawl.app/docs/crawl
