tavily-ai/tavily-python
The Tavily Python SDK allows for easy interaction with the Tavily API, offering the full range of our search, extract, crawl, map, and research functionalities directly from your Python programs. Easily integrate smart search, content extraction, and research capabilities into your applications, harnessing Tavily's powerful features.
What it solves
Tavily Python SDK provides a streamlined way for developers to integrate real-time web search, content extraction, and automated research capabilities into their Python applications. It specifically targets the needs of AI agents and RAG (Retrieval-Augmented Generation) systems that require accurate, fact-based context from the live web to reduce hallucinations and improve answer quality.
How it works
The SDK acts as a wrapper for the Tavily API, allowing users to perform several types of operations:
- Search: Executes web queries to find information, including a specialized
get_search_contextmethod for RAG applications and aqna_searchfor direct answers. - Extract: Pulls raw content and images from a list of specific URLs (up to 20 at once).
- Crawl: Traverses a website starting from a base URL to find pages matching specific instructions.
- Map: Visualizes and discovers the structure of a website based on a base URL and instructions.
- Research: Generates comprehensive research reports with automatic source gathering and analysis, supporting both standard and streaming output.
Who it’s for
Developers building AI agents, LLM-powered applications, and RAG pipelines who need a reliable way to fetch high-quality, cleaned web data for their models.
Highlights
- RAG-Optimized: Dedicated methods for generating context strings and concise Q&A answers specifically for LLMs.
- Flexible Authentication: Supports a keyless mode for quick testing, API keys for full access, and custom HTTP sessions for enterprise proxy gateways.
- Comprehensive Web Intelligence: Combines search, extraction, crawling, and site mapping into a single interface.
- Enterprise Ready: Includes session and user tracking identifiers (
project_id,session_id,human_id) for request attribution.
Related
- Dispatch
- Project
- Project
- Project
- Project