--- id: langchain-tavily version: "0.2.18" license: MIT license_treatment: permissive maintenance: active --- # langchain-tavily — An integration package connecting Tavily and LangChain License: permissive · Maintenance: active · Downloads: 793.8K/mo ## 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 above — 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 pip install langchain-tavily uv add langchain-tavily poetry add langchain-tavily ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 793.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags web search integration langchain, tavily search api wrapper, langchain agent web search tool, extract content from urls, ai agent research tool, web search for llm agents, tavily api python, web-search, agent-tools, llm-integration [View on SkillFed](https://skillfed.io/packages/langchain-tavily) · [View on PyPI](https://pypi.org/project/langchain-tavily/)