
What Is Tavily?
Tavily.com offers a fast, persistent search engine that you can call via API. Think of it as search-augmented retrieval, supplying fresh information your LLM can consume to improve accuracy and relevance.Tavily’s free tier includes 1,000 API calls per month—perfect for experimentation and small projects.
Sign Up and Obtain Your API Key
- Go to Tavily.com and create your account.
- Navigate to the dashboard to view your plan and API usage.

Setting Your API Key
Export your key as an environment variable before running any code.| Operating System | Command |
|---|---|
| macOS/Linux | export TAVILY_API_KEY="Your Tavily API Key" |
| Windows PowerShell | $env:TAVILY_API_KEY="Your Tavily API Key" |
Never commit your
TAVILY_API_KEY to public repositories. Treat it like a password!Install the LangChain Community Tool
Make sure you have the required package:Using TavilySearchResults in Python
Below is a sample script that queries Tavily and prints out the results:
Response Structure
Tavily returns a list of dictionaries with the following fields:| Field | Description |
|---|---|
url | The source link for the search result |
content | A short snippet or summary from the linked page |
Next Steps
- Combine multiple snippets into a single context string for your LLM.
- Explore additional LangChain Community tools for advanced workflows.
- Experiment with different queries to see how real-time search data improves your applications.