> ## 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.

# Cancel crawl

> Cancel an active Cloudflare Browser Run crawl.

`cloudflare.cancelCrawl` cancels an active crawl and stops queued URLs.

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

export default automation("Cancel crawl", () => {
  onDashboardRun({ title: "Cancel crawl" })
  const result = cloudflare.cancelCrawl({
    accountId: "cloudflare-account-id",
    jobId: "crawl-job-id",
  })
  sendEmail({ subject: "Crawl cancelled", text: result.message })
})
```

## Inputs

`accountId` and `jobId` are required.

## Output

Returns the cancelled `jobId` and Cloudflare's confirmation message. Cancellation changes provider state and is not replay-safe. URLs already in progress may finish before cancellation takes effect.
