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

# Search the web with Firecrawl

> Search web, news, image, and developer sources and optionally scrape the results.

`searchWebWithFirecrawl` searches one or more Firecrawl source families. Add `scrapeOptions` when you need page content instead of result metadata alone.

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

## Example

```ts automations/search-product-news.automation.ts theme={null}
import { automation, onSchedule } from "automate.ax"
import { searchWebWithFirecrawl } from "automate.ax/firecrawl"

export default automation("Search product news", () => {
  onSchedule({ schedule: "0 9 * * 1" })

  searchWebWithFirecrawl({
    query: '"Automate.ax" release',
    sources: ["web", "news"],
    tbs: "qdr:w",
    limit: 10,
    scrapeOptions: { formats: ["markdown", "summary"] },
  })
})
```

## Inputs

| Input               | Type                                                             | Required | Default          | Description                                                                                                                                                                         |
| ------------------- | ---------------------------------------------------------------- | -------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `query`             | `string`                                                         | Yes      | —                | Search query, up to 500 characters. Firecrawl supports operators such as quotes, `site:`, `filetype:`, and exclusions prefixed with `-`.                                            |
| `sources`           | `('web' \| 'news' \| 'images' \| { type })[]`                    | No       | `['web']`        | Result families to request. Object entries use the same source names.                                                                                                               |
| `categories`        | `('github' \| 'research' \| 'pdf' \| 'developer' \| { type })[]` | No       | None             | Narrow ordinary web results or add developer results. Object entries use the same category names. `research` filters academic websites; it is not Firecrawl's research-paper index. |
| `limit`             | `number`                                                         | No       | `10`             | Maximum results per source, from 1 through 100.                                                                                                                                     |
| `includeDomains`    | `string[]`                                                       | No       | None             | Restrict results to these hostnames. Cannot be combined with `excludeDomains`.                                                                                                      |
| `excludeDomains`    | `string[]`                                                       | No       | None             | Exclude these hostnames. Cannot be combined with `includeDomains`.                                                                                                                  |
| `tbs`               | `string`                                                         | No       | None             | Firecrawl time filter, such as `qdr:h`, `qdr:d`, `qdr:w`, `qdr:m`, `qdr:y`, or a custom date range.                                                                                 |
| `location`          | `string`                                                         | No       | None             | Geographic search location.                                                                                                                                                         |
| `ignoreInvalidURLs` | `boolean`                                                        | No       | `false`          | Remove results that cannot be passed to other Firecrawl endpoints.                                                                                                                  |
| `highlights`        | `boolean`                                                        | No       | Provider default | Generate query-relevant result highlights.                                                                                                                                          |
| `timeout`           | `number`                                                         | No       | `60000`          | Maximum provider search time in milliseconds.                                                                                                                                       |
| `scrapeOptions`     | `object`                                                         | No       | None             | The same formats, browser actions, content filters, cache, proxy, redaction, and target settings accepted by `scrapeUrlWithFirecrawl`.                                              |
| `enterprise`        | `('default' \| 'anon' \| 'zdr')[]`                               | No       | None             | Enterprise privacy modes enabled for the Firecrawl team.                                                                                                                            |
| `threatProtection`  | `object`                                                         | No       | Account policy   | Enterprise threat-protection overrides.                                                                                                                                             |

## Output

Returns Firecrawl's optional `web`, `news`, `images`, and `developer` arrays. Firecrawl omits buckets it did not return. Web and developer results contain web fields such as `url`, `title`, `description`, `position`, and `category`; news and image results retain their own `snippet`, `date`, `imageUrl`, and dimension fields. When `scrapeOptions` is present, results can also contain the document fields returned by `scrapeUrlWithFirecrawl`.
