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

# Extract Markdown

> Render a URL or HTML document and return its content as Markdown.

`cloudflare.extractMarkdown` renders a page with Cloudflare Browser Run and converts its content to Markdown.

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

export default automation("Extract release notes", () => {
  onDashboardRun({ title: "Extract release notes" })
  const markdown = cloudflare.extractMarkdown({
    accountId: "cloudflare-account-id",
    url: "https://example.com/releases/latest",
  })
  sendEmail({ subject: "Latest release notes", text: markdown })
})
```

## Inputs

Provide `accountId` and exactly one of `url` or `html`. `cacheTtl` defaults to 5 seconds. Set it to `0` to turn off Cloudflare caching. Optional browser controls cover timeouts, request and resource filters, authentication, cookies, scripts, styles, headers, JavaScript, media type, user agent, viewport, navigation, and wait conditions.

## Output

Returns Markdown as a string. Cloudflare may prefix it with a YAML metadata block when the page exposes supported metadata. The action consumes Browser Run duration and cannot be replayed safely.
