> For the complete documentation index, see [llms.txt](https://agpt.co/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://agpt.co/docs/integrations/block-integrations/search-3.md).

# Firecrawl Search

Blocks for searching the web and extracting content using Firecrawl.

## Firecrawl Search

### What it is

Firecrawl searches the web for the given query.

### How it works

This block uses Firecrawl's search API to find web pages matching your query and optionally extract their content. It performs a web search and can return results with full page content in your chosen format.

Configure the number of results to return, output formats (markdown, HTML, raw HTML), and caching behavior. The wait\_for parameter allows time for JavaScript-heavy pages to fully render before extraction.

### Inputs

| Input     | Description                                                                                             | Type                                                                                                                        | Required |
| --------- | ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -------- |
| query     | The query to search for                                                                                 | str                                                                                                                         | Yes      |
| limit     | The number of pages to crawl                                                                            | int                                                                                                                         | No       |
| max\_age  | The maximum age of the page in milliseconds - default is 1 hour                                         | int                                                                                                                         | No       |
| wait\_for | Specify a delay in milliseconds before fetching the content, allowing the page sufficient time to load. | int                                                                                                                         | No       |
| formats   | Returns the content of the search if specified                                                          | List\["markdown" \| "html" \| "rawHtml" \| "links" \| "screenshot" \| "screenshot\@fullPage" \| "json" \| "changeTracking"] | No       |

### Outputs

| Output | Description                        | Type            |
| ------ | ---------------------------------- | --------------- |
| error  | Error message if the search failed | str             |
| data   | The result of the search           | Dict\[str, Any] |
| site   | The site of the search             | Dict\[str, Any] |

### Possible use case

**Research Automation**: Search for topics and automatically extract content from relevant pages for analysis.

**Lead Generation**: Find companies or contacts matching specific criteria across the web.

**Content Aggregation**: Gather articles, reviews, or information on specific topics from multiple sources.

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://agpt.co/docs/integrations/block-integrations/search-3.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
