---
source_url: "https://docs.crewai.com/en/tools/search-research/exasearchtool"
title: Exa Search Tool - CrewAI
mirrored_at: 2026-08-11T03:01:41.354Z
host: docs.crewai.com
cited_in_42a: true
mirror_canonical: "https://index.42a.ai/docs.crewai.com/en/tools/search-research/exasearchtool"
---

> **Original source:** https://docs.crewai.com/en/tools/search-research/exasearchtool

The `ExaSearchTool` lets CrewAI agents search the web using [Exa](https://exa.ai/), the fastest and most accurate web search API. It returns the most relevant results for any query, with options for token-efficient highlights and full page content.

## Installation

Install the CrewAI tools package:

## Environment Variables

Set your Exa API key as an environment variable:

Get an API key from the [Exa dashboard](https://dashboard.exa.ai/api-keys).

## Example Usage

Here’s how to use the `ExaSearchTool` within a CrewAI agent:

## Configuration Options

The `ExaSearchTool` accepts the following parameters during initialization:

-   `type` (str, optional): The search type to use. Defaults to `"auto"`. Options: `"auto"`, `"instant"`, `"fast"`, `"deep"`.
-   `highlights` (bool or dict, optional): Return token-efficient excerpts most relevant to the query instead of the full page. Defaults to `True`. Pass a dict like `{"max_characters": 4000}` to configure, or `False` to disable.
-   `content` (bool, optional): Whether to include full page content in results. Defaults to `False`.
-   `api_key` (str, optional): Your Exa API key. Falls back to the `EXA_API_KEY` environment variable if not provided.
-   `base_url` (str, optional): Custom API server URL. Falls back to the `EXA_BASE_URL` environment variable if not provided.

When calling the tool (or when an agent invokes it), the following search parameters are available:

-   `search_query` (str): **Required**. The search query string.
-   `start_published_date` (str, optional): Filter results published after this date (ISO 8601 format, e.g. `"2024-01-01"`).
-   `end_published_date` (str, optional): Filter results published before this date (ISO 8601 format).
-   `include_domains` (list\[str\], optional): A list of domains to restrict the search to.

## Advanced Usage

For most agent workflows we recommend `highlights` — it returns the most relevant excerpts from each result and uses far fewer tokens than full page content:

For thorough, multi-step searches, use `type="deep"`:

For more on choosing between highlights and full content, see the [Exa search best practices](https://exa.ai/docs/reference/search-best-practices).

## Using Exa via MCP

You can also connect your agent to Exa’s hosted MCP server. Pass your API key with the `x-api-key` header:

Get your API key from the [Exa dashboard](https://dashboard.exa.ai/api-keys). For more on MCP in CrewAI, see the [MCP overview](https://docs.crewai.com/en/mcp/overview).

## Features

-   **Token-Efficient Highlights**: Get the most relevant excerpts from each result, ~10x fewer tokens than full text
-   **Semantic Search**: Find results based on meaning, not just keywords
-   **Full Content Retrieval**: Get the full text of web pages alongside search results
-   **Date Filtering**: Limit results to specific time periods with published date filters
-   **Domain Filtering**: Restrict searches to specific domains

## Resources

-   [Exa documentation](https://exa.ai/docs)
-   [Exa dashboard — manage API keys and usage](https://dashboard.exa.ai/)