TheDocumentation Index
Fetch the complete documentation index at: https://docs.crewai.com/llms.txt
Use this file to discover all available pages before exploring further.
ExaSearchTool lets CrewAI agents search the web using Exa, 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:Example Usage
Here’s how to use theExaSearchTool within a CrewAI agent:
Configuration Options
TheExaSearchTool 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 toTrue. Pass a dict like{"max_characters": 4000}to configure, orFalseto disable.content(bool, optional): Whether to include full page content in results. Defaults toFalse.api_key(str, optional): Your Exa API key. Falls back to theEXA_API_KEYenvironment variable if not provided.base_url(str, optional): Custom API server URL. Falls back to theEXA_BASE_URLenvironment variable if not provided.
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 recommendhighlights — it returns the most relevant excerpts from each result and uses far fewer tokens than full page content:
type="deep":
Using Exa via MCP
You can also connect your agent to Exa’s hosted MCP server. Pass your API key with thex-api-key header:
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
EXASearchTool is a deprecated alias for ExaSearchTool. Existing imports continue to work but will emit a deprecation warning; please migrate to ExaSearchTool.