> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Create crawl

> Start an asynchronous Cloudflare Browser Run crawl.

`cloudflare.createCrawl` starts an asynchronous crawl from one URL.

```ts automations/create-cloudflare-crawl.automation.ts theme={null}
import { automation, onDashboardRun, sendEmail } from "automate.ax"
import { cloudflare } from "automate.ax/cloudflare"

export default automation("Crawl documentation", () => {
  onDashboardRun({ title: "Crawl documentation" })
  const crawl = cloudflare.createCrawl({
    accountId: "cloudflare-account-id",
    formats: ["markdown"],
    limit: 100,
    options: { includePatterns: ["https://example.com/docs/**"] },
    url: "https://example.com/docs",
  })
  sendEmail({ subject: "Crawl started", text: crawl.jobId })
})
```

## Inputs

`accountId` and `url` are required. `render` defaults to `true`; set it to `false` for static fetching, which rejects browser-only page controls. Cloudflare defaults `formats` to `html`, `source` to `all`, `depth` to 100,000, `limit` to 10, `contentUse` to `full`, and `crawlPurposes` to all three supported purposes. Optional inputs also set cache age, modified-since timestamp, JSON extraction, include/exclude patterns, external links, and subdomains. `cacheTtl` defaults to 5 seconds. Rendered crawls accept the common Browser Run page controls.

## Output

Returns `{ jobId }`. Creating a crawl starts metered provider work and is not replay-safe. Use `cloudflare.getCrawl` to read progress and paginated records.
