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

# Map website with Firecrawl

> Discover and rank a site's URLs without scraping every page.

`mapWebsiteWithFirecrawl` discovers pages from sitemaps and links without downloading full page content. Use it to inspect a site before choosing URLs to scrape or crawl.

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

## Example

```ts automations/map-documentation.automation.ts theme={null}
import { automation, onHttpRequest } from "automate.ax"
import { mapWebsiteWithFirecrawl } from "automate.ax/firecrawl"

export default automation("Map documentation", () => {
  onHttpRequest({ scope: "automation" })

  mapWebsiteWithFirecrawl({
    url: "https://docs.example.com",
    search: "authentication",
    sitemap: "include",
    limit: 500,
  })
})
```

## Inputs

| Input                   | Type                                         | Required | Default          | Description                                                       |
| ----------------------- | -------------------------------------------- | -------- | ---------------- | ----------------------------------------------------------------- |
| `url`                   | `string`                                     | Yes      | —                | Website root URL.                                                 |
| `search`                | `string`                                     | No       | None             | Rank discovered pages against this text.                          |
| `sitemap`               | `'only' \| 'include' \| 'skip'`              | No       | `include`        | Use only the sitemap, combine it with link discovery, or skip it. |
| `includeSubdomains`     | `boolean`                                    | No       | `true`           | Include pages from subdomains.                                    |
| `ignoreQueryParameters` | `boolean`                                    | No       | `true`           | Exclude URL variants that differ only by query parameters.        |
| `limit`                 | `number`                                     | No       | `5000`           | Maximum discovered links, up to 100,000.                          |
| `location`              | `{ country?: string; languages?: string[] }` | No       | US               | Proxy location and preferred languages.                           |
| `timeout`               | `number`                                     | No       | Provider default | Maximum provider map time in milliseconds.                        |
| `threatProtection`      | `object`                                     | No       | Account policy   | Enterprise threat-protection overrides.                           |
| `auditMetadata`         | `{ username: string }`                       | No       | None             | User identity attached to Firecrawl audit logs.                   |

## Output

Returns `{ id?, links }`. Every link contains `url` and can include Firecrawl's `title` and `description`. Mapping does not return page bodies; pass selected URLs to `scrapeUrlWithFirecrawl` when you need content.
