skillfed

langchain-tavily

An integration package connecting Tavily and LangChain

langchain-tavily v0.2.18 793.8K downloads/30d#5,040 on PyPI25
Permissive license MIT Active released

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-tavily

uv

uv add langchain-tavily

poetry

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 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

License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13

Tags

web search integration langchaintavily search api wrapperlangchain agent web search toolextract content from urlsai agent research toolweb search for llm agentstavily api python
web-searchagent-toolsllm-integration

More Artificial Intelligence packages

Further reading