langchain-tavily
An integration package connecting Tavily and LangChain
What it is and what it does
langchain-tavily is a LangChain integration that wraps Tavily's web search and content extraction APIs. It provides two main tools: TavilySearch for querying the web with customizable parameters (search depth, time range, domain filtering, result format), and TavilyExtract for extracting structured content from URLs. Both tools are designed to work seamlessly with LangChain agents, allowing language models to dynamically invoke web searches and extract page data as part of agentic workflows.
The package depends on langchain-core, langchain, aiohttp, and requests. It requires a Tavily API key (obtained by creating an account at tavily.com) and supports Python 3.10 through 3.13. The tools accept numerous optional parameters at instantiation (max_results, topic, include_answer, search_depth, time_range, domain filters) and some parameters can be overridden at invocation time, though response-size parameters like include_answer and include_raw_content are fixed at instantiation to prevent context window issues.
Use it for:
- Build an AI research assistant that searches the web for current information and synthesizes answers to user queries.
- Create an agent that filters search results by domain, date range, or geography to find domain-specific or time-sensitive information.
- Extract and parse content from multiple URLs in bulk to feed structured data into downstream LLM processing.
- Augment a chatbot with real-time web search capability so it can answer questions about recent events or breaking news.
- Implement a fact-checking workflow where an agent searches for corroborating sources and extracts their content.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Integrates Tavily's web search and content extraction APIs into LangChain applications, enabling agents and tools to perform web searches and extract page content programmatically.
Yes. The package is actively maintained, has low install friction, carries a permissive MIT license, and integrates cleanly into LangChain workflows. It fills a genuine need for agents that require web search and content extraction. The main gotcha is the requirement for a Tavily API key and account setup, but that is external to the package itself.
Install
langchain-tavily on PyPI
pip
pip install langchain-tavilyuv
uv add langchain-tavilypoetry
poetry add langchain-tavilyInstalling langchain-tavily
Before you install
Low friction install with four runtime dependencies (langchain-core, langchain, aiohttp, requests). Active maintenance with recent commits; last release was 120 days ago and the repository is not archived.
License in practice
MIT license permits commercial and private use with minimal restrictions—include a copy of the license and copyright notice in distributions.
Quickstart
pip install langchain-tavily
import os
from langchain_tavily import TavilySearch
os.environ["TAVILY_API_KEY"] = "your-api-key"
tool = TavilySearch(max_results=5, topic="general")
result = tool.invoke({"query": "What happened at the last wimbledon"})
Requires a Tavily API key obtained by creating an account at https://app.tavily.com/sign-in and setting the TAVILY_API_KEY environment variable.
Verify before relying
- Whether Tavily API key provisioning or rate limits impose practical constraints on typical usage patterns.
- Performance characteristics of search depth options ('basic', 'advanced', 'fast', 'ultra-fast') and their impact on latency.
- Whether the package handles concurrent requests reliably given its aiohttp dependency.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — langchain-core, langchain, aiohttp, requests |
| Maintenance | actively maintained — 120 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 793,778/month — #5,040 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: langchain_tavily-0.2.18-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
tavily-pythonPython SDK for the Tavily API, providing web…
permissive · top 5,000 on PyPI
tavily-cliTavily CLI provides command-line and…
permissive · top 15,000 on PyPI
langchain-azure-aiIntegrates Microsoft Foundry (Azure AI)…
permissive · top 5,000 on PyPI
zenpyreZenpyre provides utility functions and helpers…
permissive · top 15,000 on PyPI
langchain-cliCommand-line interface for building, testing,…
permissive · top 15,000 on PyPI
langchain-cohereConnects LangChain applications to Cohere's…
permissive · top 5,000 on PyPI
langchain-openaiProvides LangChain integrations for OpenAI's…
permissive · top 1,000 on PyPI
composio-langchainBridges Composio's 1000+ app integrations into…
permissive · top 15,000 on PyPI
Crawl4AICrawl4AI is an async web crawler and scraper…
permissive · top 5,000 on PyPI