Tavily Python SDK
Integrate Tavily's smart search, extraction, crawling, mapping, and research capabilities directly into your Python applications.
- Source repo
- tavily-ai/tavily-python
- Stars
- ★ 1.4k
- Last updated
- 1mo ago
- FARS reviewed
- Nov 07, 2026
- License
- MIT
- Primary language
- Python
- FA score
- 50/100 · Major gaps
At a glance
- How it runs
- Works with
- Platform-specific
- Cost
- Free tier plus a paid hosted plan
- Setup effort
- Low · running in minutes
- You'll need
- Typical use
- Developers who need to integrate real-time web search into AI applications, using search for fresh information.
- Not a fit if
- Teams that need fully offline use; every feature calls Tavily's cloud API
- Users needing crawl, map, or research; those endpoints require a key and crawl is invite-only
- High-concurrency production; keyless mode is rate-limited and the free tier is 1,000 credits/month
- Maintenance
- Commits in the last 6 monthslast commit 2026-10-06
- Source review
- 50/100 · Major gaps 1 safety controls not found
What does this agent do, and when should you use it?
The Tavily Python SDK is an official library for interacting with the Tavily API, offering the full range of search, extract, crawl, map, and research functionalities. It features a keyless mode for quick trials of search and extract, while full capabilities require an API key. The SDK provides both synchronous and asynchronous clients, supports custom session injection, and enables request tracking. Aimed at developers, it simplifies adding web search and content extraction to applications, particularly for RAG and AI systems needing real-time web data.
The SDK exposes core capabilities through TavilyClient and AsyncTavilyClient: search performs web searches and returns results; get_search_context generates context strings suitable for RAG; qna_search returns direct answers. extract retrieves raw content and images from multiple URLs; crawl traverses a website from a start URL; map discovers site structure; research creates research reports and supports streaming. It also supports injecting a custom requests.Session or httpx.AsyncClient for API gateways, and request tracking via identifiers like project_id and session_id. All methods return standard dictionaries or streaming responses.
- Developers who need to integrate real-time web search into AI applications, using search for fresh information.
- Teams building RAG applications, using get_search_context to generate fact-based context for better generation accuracy.
- Users who need to extract structured content from multiple web pages, using extract to batch-fetch raw text and images.
- SEO or content analysts needing to analyze site structure, using map to visualize site hierarchy.
- Researchers automating report generation, using research to create reports asynchronously and retrieve results.
- Developers in enterprise environments proxying requests through an API gateway, using custom session injection for centralized auth.
How do you install or deploy this agent?
Install via pip: pip install tavily-python. Requires a Python 3.x environment. No API key is needed for trials, but full features require signing up at tavily.com and obtaining an API key.
How do you use this agent?
First, import and instantiate the client: from tavily import TavilyClient; client = TavilyClient(api_key="tvly-YOUR_API_KEY"). Then call methods, e.g., response = client.search("Who is Leo Messi?"). In keyless mode, omit the api_key. For async, use from tavily import AsyncTavilyClient and await calls.
Safety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
FARS trust-control audit
- rollback or recovery path — Back up first, or work on a git branch or snapshot, so its changes can be undone.
What are this agent's strengths and limitations?
- Offers a keyless trial mode, lowering the entry barrier for quick evaluation.
- Covers five major functionalities—search, extract, crawl, map, and research—addressing diverse web data needs.
- Supports both synchronous and asynchronous clients, fitting various application scenarios.
- Custom session injection enables centralized management via API gateways in enterprise environments.
- Core features depend on Tavily's proprietary API, posing a vendor lock-in risk.
- Crawl, map, and research features require an API key, and crawl is currently invite-only.
- Keyless mode has rate limits, unsuitable for high-concurrency production use.
- Free tier allows 1,000 credits per month; additional usage incurs costs, so long-term expenses need evaluation.
How does this agent compare with similar options?
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| Tavily Python SDK This agent | 50 · Major gaps | Library / SDKFreemium | ★ 1.4k | 1mo ago | Python | — |
| wigolo | 71 · Some gaps | CLIFree + model costs | ★ 5.6k | today | TypeScript | Codex · Claude Code · OpenAI API · Claude API |
| Firecrawl Web Research MCP | 67 · Some gaps | MCP serverFreemium | ★ 8k | today | JavaScript | Claude.ai |
| Exa Web Research MCP | 56 · Major gaps | MCP serverFreemium | ★ 5.3k | 1d ago | TypeScript | ChatGPT · Codex · Claude.ai |
How does FollowAgents rate this agent?
Why each dimension lost points
The SDK uses an API key or custom session to access Tavily network APIs for search, extraction, crawling, mapping, research, and feedback. Custom sessions can carry gateway credentials; identifiers are optional, and the README says human_id is hashed server-side. Documentation identifies the identifiers and outbound requests, but does not explain local key storage, data retention, or per-request confirmation. Callers initiate network operations, and no undo or recovery mechanism is described. The dependency file lists package names without version pins or visible security review. LICENSE names Alpha AI Technologies Inc.; README provides a support email and community update path. Publisher identity remains unverified as specified by the supplied metadata.
README shows search, extraction, crawl, map, research, feedback, and sync/async session usage, but the provided material does not fully connect those descriptions to the implementation. Test files show request interceptors and client fixtures, and CI declares Python 3.9–3.11. requirements.txt lists tavily-python itself and openai without version constraints. README gives concrete keyless capability and rate-limit error guidance, and the test interceptor defines response behavior, but the sample cannot establish consistent handling across the SDK's error paths, so scores are reduced.
README targets Python integrators and covers search, RAG, Q&A, extraction, and site discovery. It documents keyless support limited to search/extract, invite-only crawl, an extraction URL limit, custom sessions, and tracking identifiers. Capabilities are invoked through explicit client methods and parameters, which suits direct integration. The sample offers little broader scenario-selection guidance or automatic triggering behavior, so trigger precision is only partly evidenced.
README is organized by capability and includes installation, examples, API documentation, cost, support, and community information. Installation is clear; examples describe known limits such as keyless restrictions, rate limits, and invite-only crawl. Names are reasonably stable across TavilyClient, AsyncTavilyClient, and endpoint methods. The complete LICENSE text agrees with the MIT metadata and merits full marks. The supplied material has no release history or changelog. A support email and community link provide contact paths, but no maintainer team or response commitment is identified.
The client exposes several Tavily search and web-processing APIs to Python and demonstrates directly usable context strings, research results, and structured responses, showing integration value. Most examples print results or demonstrate calls without much guidance on production cost controls, result validation, or recovery. Cost is summarized as a free allowance with a documentation link, so the cost-benefit explanation is limited.
README makes specific, locatable claims about calls, quotas, headers, and feature boundaries. Test materials independently show sync/async interception and client fixtures, while CI identifies a test environment. However, the package implementation is not included in the sample, so primary product claims cannot be cross-checked against code. The documentation states conditions such as keyless limits, invite-only availability, and optional usage data, and does not present the unverified publisher identity as a quality or safety guarantee.
- Not found in source: rollback or recovery pathBack up first, or work on a git branch or snapshot, so its changes can be undone.
- Examples use API keys, gateway tokens, or request content for remote API calls; store credentials securely in the calling environment and assess data-handling requirements before sending sensitive queries.
- This is a static review of a limited file sample that omits SDK implementation source; runtime behavior, test outcomes, and third-party dependency security were not confirmed.
FAQ
Which methods are available in keyless mode?
How do I get an API key and what is the pricing?
Is the crawl feature available to all users?
Does it support asynchronous calls?
Can I use it through a proxy or gateway?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.