Tavily Python SDK

Integrate Tavily's smart search, extraction, crawling, mapping, and research capabilities directly into your Python applications.

Stars
★ 1.4k
Last updated
1mo ago
FARS reviewed
Nov 07, 2026
License
MIT
Primary language
Python

At a glance

How it runs
Library / SDK
Works with
Platform-specific
Cost
Free tier plus a paid hosted plan
Setup effort
Low · running in minutes
You'll need
PythonpipShell / CLINetwork access
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

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.

  1. Developers who need to integrate real-time web search into AI applications, using search for fresh information.
  2. Teams building RAG applications, using get_search_context to generate fact-based context for better generation accuracy.
  3. Users who need to extract structured content from multiple web pages, using extract to batch-fetch raw text and images.
  4. SEO or content analysts needing to analyze site structure, using map to visualize site hierarchy.
  5. Researchers automating report generation, using research to create reports asynchronously and retrieve results.
  6. 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)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

FARS trust-control audit

Not found in source — apply before daily use
  • 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?

Pros
  • 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.
Limitations
  • 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?

FollowAgents source review · FARS-2.1
Major gaps
50/ 100 5-point scale 2.5 / 5
Trust 12/29
Reliability 6/14
Adaptability 10/18
Convention 11/18
Effectiveness 7/13
Verifiability 4/8
Why each dimension lost points
Trust12 / 29 · 2.1/5

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.

Reliability6 / 14 · 2.1/5

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.

Adaptability10 / 18 · 2.8/5

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.

Convention11 / 18 · 3.1/5

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.

Effectiveness7 / 13 · 2.7/5

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.

Verifiability4 / 8 · 2.5/5

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.

Risks and how to mitigate them
  • 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.
Evidence confidence: Low Reviewed Nov 07, 2026 Reviewed revision 46505f119e6a
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/tavily-python.svg)](https://followagents.com/en/agents/tavily-python)
<a href="https://followagents.com/en/agents/tavily-python"><img src="https://followagents.com/badge/tavily-python.svg" alt="FARS review"></a>

FAQ

Which methods are available in keyless mode?
Keyless mode supports only search and extract; other methods raise an error requiring an API key.
How do I get an API key and what is the pricing?
Sign up at tavily.com to obtain an API key. The free tier includes 1,000 credits per month; additional credits require payment, with details in the documentation.
Is the crawl feature available to all users?
Crawl is currently invite-only; visit crawl.tavily.com for more information.
Does it support asynchronous calls?
Yes, the SDK provides an AsyncTavilyClient for async operations.
Can I use it through a proxy or gateway?
Yes, the SDK supports passing a custom requests.Session or httpx.AsyncClient, but you must set api_base_url to point to the gateway.
Was this page helpful?
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts