What is Exa?
Exa is the search engine built for AI. It finds information from across the web and delivers both links and the actual content from pages, making it easy to use with AI models. Exa uses neural search technology to understand the meaning of queries, not just keywords. The API works with both semantic search and traditional keyword methods.Get Started
First, you’ll need API keys from both OpenAI and Exa:- Get your Exa API key from the Exa Dashboard
- Get your OpenAI API key from the OpenAI Dashboard
Complete Example
- Set up the OpenAI Response API with Exa as a tool
- Make a request to OpenAI
- Handle the search function call
- Send the search results back to OpenAI
- Get the final response
How Tool Calling Works
Let’s break down how the Exa web search tool works with OpenAI’s Response API:-
Tool Definition: First, we define our Exa search as a tool that OpenAI can use:
- Initial Request: When you send a message to OpenAI, the API looks at your message and decides if it needs to search the web. If it does, instead of giving a direct answer, it will return a “function call” in its output.
-
Function Call: If OpenAI decides to search, it returns something like:
-
Search Execution: Your code then:
- Takes this search query
- Calls Exa’s API to perform the actual web search
- Gets real web results back
- Final Response: You send these web results back to OpenAI, and it gives you a final answer using the fresh information from the web.
Direct Research with Responses API
In addition to using Exa as a search tool, you can also access Exa’s powerful research capabilities directly through the OpenAI Responses API format. This provides a familiar interface for running complex research tasks.How It Works
Simply point the OpenAI client to Exa’s API and use our research models:Available Models
exa-research
- Adapts compute to task difficulty. Best for most use cases.exa-research-pro
- Maximum quality with highest reasoning capability. Best for complex, multi-step research.
Research vs Web Search Tool
Choose the right approach for your use case:Feature | Web Search Tool (Function Calling) | Direct Research |
---|---|---|
Use Case | Augment LLM conversations with web data | Get comprehensive research reports |
Control | Full control over search queries and integration | Automated multi-step research |
Response Time | Fast (seconds) | Longer (45-180 seconds) |
Best For | Interactive chatbots, real-time Q&A | In-depth analysis, research reports |
For detailed information about research capabilities, structured outputs, and
pricing, see the Exa Research documentation.