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

# Scrape URL with Firecrawl

> Extract one page as Markdown, HTML, structured data, screenshots, and other Firecrawl formats.

`scrapeUrlWithFirecrawl` loads one URL through Firecrawl and returns the requested LLM-ready content and page metadata.

Inputs accept literal values or compatible signals. An optional second argument `{ account }` selects the Firecrawl binding.

## Example

```ts automations/scrape-release-notes.automation.ts theme={null}
import { automation, onHttpRequest } from "automate.ax"
import { scrapeUrlWithFirecrawl } from "automate.ax/firecrawl"

export default automation("Scrape release notes", () => {
  onHttpRequest({ scope: "automation" })

  scrapeUrlWithFirecrawl({
    url: "https://example.com/releases",
    formats: ["markdown", "links", "summary"],
    onlyMainContent: true,
  })
})
```

## Inputs

| Input                                                                  | Type                                           | Required | Default           | Description                                                                                                                                                                                                                                                                                                             |
| ---------------------------------------------------------------------- | ---------------------------------------------- | -------- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `url`                                                                  | `string`                                       | Yes      | —                 | Complete page or public document URL.                                                                                                                                                                                                                                                                                   |
| `formats`                                                              | `(string \| object)[]`                         | No       | `['markdown']`    | Content formats such as `markdown`, `html`, `rawHtml`, `links`, `images`, `summary`, `screenshot`, `json`, `changeTracking`, `attributes`, `branding`, `product`, `menu`, `audio`, or `video`. Configurable format objects accept screenshot, JSON Schema, change-tracking, attribute, question, and highlight options. |
| `onlyMainContent`                                                      | `boolean`                                      | No       | `true`            | Remove page chrome such as navigation, headers, and footers.                                                                                                                                                                                                                                                            |
| `includeTags` / `excludeTags`                                          | `string[]`                                     | No       | None              | Include or exclude selected HTML tags, classes, or IDs.                                                                                                                                                                                                                                                                 |
| `headers`                                                              | `Record<string, string>`                       | No       | None              | Headers sent to the target page, such as a cookie or user agent.                                                                                                                                                                                                                                                        |
| `actions`                                                              | `object[]`                                     | No       | None              | Wait, click, write, press, scroll, execute JavaScript, take screenshots, scrape intermediate state, or create PDFs before extraction.                                                                                                                                                                                   |
| `waitFor`                                                              | `number`                                       | No       | `0`               | Additional milliseconds to wait for dynamic content.                                                                                                                                                                                                                                                                    |
| `timeout`                                                              | `number`                                       | No       | `60000`           | Provider scrape timeout from 1,000 through 300,000 milliseconds.                                                                                                                                                                                                                                                        |
| `mobile`                                                               | `boolean`                                      | No       | `false`           | Emulate a mobile device.                                                                                                                                                                                                                                                                                                |
| `location`                                                             | `{ country?: string; languages?: string[] }`   | No       | US                | Proxy location and preferred languages.                                                                                                                                                                                                                                                                                 |
| `proxy`                                                                | `'basic' \| 'stealth' \| 'enhanced' \| 'auto'` | No       | `auto`            | Proxy tier. Enhanced or automatic retries can consume extra credits.                                                                                                                                                                                                                                                    |
| `maxAge` / `minAge`                                                    | `number`                                       | No       | Provider defaults | Control use of Firecrawl's indexed cache in milliseconds.                                                                                                                                                                                                                                                               |
| `storeInCache` / `lockdown`                                            | `boolean`                                      | No       | Provider defaults | Allow cache storage, or require cache-only retrieval.                                                                                                                                                                                                                                                                   |
| `removeBase64Images` / `blockAds` / `skipTlsVerification` / `fastMode` | `boolean`                                      | No       | Provider defaults | Provider-native scrape behavior.                                                                                                                                                                                                                                                                                        |
| `parsers`                                                              | `(string \| FirecrawlPdfParser)[]`             | No       | PDF parser        | File parser configuration, including PDF OCR mode and page limits.                                                                                                                                                                                                                                                      |
| `profile`                                                              | `{ name: string; saveChanges?: boolean }`      | No       | None              | Persistent browser profile shared by name.                                                                                                                                                                                                                                                                              |
| `redactPII`                                                            | `boolean \| FirecrawlRedactionOptions`         | No       | `false`           | Redact selected personal-information categories.                                                                                                                                                                                                                                                                        |
| `threatProtection`                                                     | `object`                                       | No       | Account policy    | Enterprise threat-protection overrides.                                                                                                                                                                                                                                                                                 |
| `auditMetadata`                                                        | `{ username: string }`                         | No       | None              | User identity attached to Firecrawl audit logs.                                                                                                                                                                                                                                                                         |

Headers can contain credentials. Send them only to URLs you trust.

## Output

The action returns Firecrawl's document shape. Optional results include `markdown`, `html`, `rawHtml`, `summary`, `highlights`, `json`, `links`, `images`, `screenshot`, `audio`, `video`, `attributes`, browser `actions`, `changeTracking`, `branding`, `product`, and `menu`. Page details remain under `metadata`, including `sourceURL`, `url`, `title`, `description`, `language`, `statusCode`, `scrapeId`, `contentType`, `cacheState`, `creditsUsed`, and `error` when Firecrawl supplies them.

Use a JSON format object with `prompt` or `schema` when you need structured extraction. The returned `json` value is JSON and should be narrowed to your expected shape in automation code.
