> ## Documentation Index
> Fetch the complete documentation index at: https://docs.phidata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Exa

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

## Prerequisites

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

```shell theme={null}
pip install -U exa-client
```

```shell theme={null}
export EXA_API_KEY=***
```

## Example

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

```python cookbook/tools/exa_tools.py theme={null}
from phi.agent import Agent
from phi.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)
```

## Toolkit Params

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

## Toolkit Functions

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

## Information

* View on [Github](https://github.com/agno-agi/phidata/blob/main/phi/tools/exa.py)
