Skip to main content
Tavily’s Search API is a search engine built specifically for AI agents (LLMs), delivering real-time, accurate, and factual results at speed.
We can use this as a retriever. It will show functionality specific to this integration. After going through, it may be useful to explore relevant use-case pages to learn how to use this vectorstore as part of a larger chain.

Integration details

Setup

If you want to get automated tracing from individual queries, you can also set your LangSmith API key by uncommenting below:

Installation

The integration lives in the langchain-community package. We also need to install the tavily-python package itself.
We also need to set our Tavily API key.

Instantiation

Now we can instantiate our retriever:

Usage

Use within a chain

We can easily combine this retriever in to a chain.

API reference

For detailed documentation of all TavilySearchAPIRetriever features and configurations head to the API reference.