> For the complete documentation index, see [llms.txt](https://docs.projectbit.ca/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.projectbit.ca/documentation/tools/exa.md).

# Exa

**ExaTools** enable an Agent to search the web using Exa.

### [​](https://docs.phidata.com/tools/exa#prerequisites)Prerequisites <a href="#prerequisites" id="prerequisites"></a>

The following examples requires the `exa-client` library and an API key which can be obtained from [Exa](https://exa.ai/).

```shell
pip install -U exa-client
```

```shell
export EXA_API_KEY=***
```

### [​](https://docs.phidata.com/tools/exa#example)Example <a href="#example" id="example"></a>

The following agent will run seach exa for AAPL news and print the response.

cookbook/tools/exa\_tools.py

```python
from bitca.agent import Agent
from bitca.tools.exa import ExaTools

agent = Agent(tools=[ExaTools(include_domains=["cnbc.com", "reuters.com", "bloomberg.com"])], show_tool_calls=True)
agent.print_response("Search for AAPL news", markdown=True)
```

### [​](https://docs.phidata.com/tools/exa#toolkit-params)Toolkit Params <a href="#toolkit-params" id="toolkit-params"></a>

| Parameter              | Type   | Default | Description                                                  |
| ---------------------- | ------ | ------- | ------------------------------------------------------------ |
| `api_key`              | `str`  | -       | API key for authentication purposes.                         |
| `search`               | `bool` | `False` | Determines whether to enable search functionality.           |
| `search_with_contents` | `bool` | `True`  | Indicates whether to include contents in the search results. |
| `show_results`         | `bool` | `False` | Controls whether to display search results directly.         |

### [​](https://docs.phidata.com/tools/exa#toolkit-functions)Toolkit Functions <a href="#toolkit-functions" id="toolkit-functions"></a>

| Function                   | Description                                                                |
| -------------------------- | -------------------------------------------------------------------------- |
| `search_exa`               | Searches Exa for a query.                                                  |
| `search_exa_with_contents` | Searches Exa for a query and returns the contents from the search results. |
