WorkflowsMay 8, 2026·3 min read

Tavily Search — Search API Built for AI Agents

Tavily Search returns LLM-ready answers from the web — not link lists. One call gets snippets, citations, optional generated answer. Free tier 1K/mo.

Agent ready

This asset can be read and installed directly by agents

TokRepo exposes a universal CLI command, install contract, metadata JSON, adapter-aware plan, and raw content links so agents can judge fit, risk, and next actions.

Stage only · 5/100Stage only
Agent surface
Any MCP/CLI agent
Kind
Mcp Config
Install
Stage only
Trust
Trust: New
Entrypoint
Asset
Universal CLI install command
npx tokrepo install b2f4accc-45ba-44f3-9a1e-aea8c3096e0d
Intro

Tavily Search is the search API designed for AI agents and RAG. Unlike Google Custom Search or Bing API, Tavily returns curated content snippets ready to feed an LLM — not a list of URLs to scrape. Optional include_answer gives a generated synthesis. Best for: AI agents that need fresh facts, citations, real-time info. Works with: Tavily REST API, Python / TypeScript SDK, MCP server. Setup time: 2 minutes.


Hello world

from tavily import TavilyClient

client = TavilyClient(api_key=os.environ["TAVILY_API_KEY"])

response = client.search(
    query="What is the latest version of Python?",
    search_depth="advanced",
    include_answer=True,
    include_raw_content=False,
    max_results=5,
)

print(response["answer"])
# "As of October 2024, the latest stable version of Python is 3.13.0..."

for r in response["results"]:
    print(f"{r['title']}{r['url']}")
    print(r["content"][:200])

Search depth

Mode Use Cost
basic Quick fact lookups 1 credit
advanced Multi-source research, RAG 2 credits

Advanced mode crawls more sources and runs a rerank pass — better for answer quality, slightly higher latency and cost.

Filter by domain

# Whitelist
response = client.search(
    query="Latest LangChain release notes",
    include_domains=["python.langchain.com", "github.com"],
)

# Blacklist
response = client.search(
    query="Best vector databases",
    exclude_domains=["medium.com"],  # avoid SEO blogspam
)

As MCP

{
  "mcpServers": {
    "tavily": {
      "command": "npx",
      "args": ["-y", "tavily-mcp"],
      "env": { "TAVILY_API_KEY": "tvly-..." }
    }
  }
}

Now Claude Code / Cursor can call tavily_search, tavily_extract, tavily_crawl directly.


FAQ

Q: Is Tavily free? A: Yes — free tier 1,000 API credits/month, no credit card needed. Paid plans add higher quotas and team features. Pricing on tavily.com.

Q: How is Tavily different from Google search via SerpAPI? A: SerpAPI returns Google's HTML organic results — you scrape and clean. Tavily already runs the cleaning, ranking, and (optionally) synthesis. Tavily is purpose-built for LLM consumption; SerpAPI is purpose-built for SERP scraping.

Q: Can I use Tavily with LangChain? A: Yes — langchain_community.tools.tavily_search.TavilySearchResults is a built-in LangChain tool. Same for LlamaIndex, CrewAI, Pydantic AI.


Quick Use

  1. Sign up at tavily.com → copy API key
  2. pip install tavily-python (or npm install @tavily/core)
  3. client.search(query=..., include_answer=True) returns LLM-ready snippets

Intro

Tavily Search is the search API designed for AI agents and RAG. Unlike Google Custom Search or Bing API, Tavily returns curated content snippets ready to feed an LLM — not a list of URLs to scrape. Optional include_answer gives a generated synthesis. Best for: AI agents that need fresh facts, citations, real-time info. Works with: Tavily REST API, Python / TypeScript SDK, MCP server. Setup time: 2 minutes.


Hello world

from tavily import TavilyClient

client = TavilyClient(api_key=os.environ["TAVILY_API_KEY"])

response = client.search(
    query="What is the latest version of Python?",
    search_depth="advanced",
    include_answer=True,
    include_raw_content=False,
    max_results=5,
)

print(response["answer"])
# "As of October 2024, the latest stable version of Python is 3.13.0..."

for r in response["results"]:
    print(f"{r['title']}{r['url']}")
    print(r["content"][:200])

Search depth

Mode Use Cost
basic Quick fact lookups 1 credit
advanced Multi-source research, RAG 2 credits

Advanced mode crawls more sources and runs a rerank pass — better for answer quality, slightly higher latency and cost.

Filter by domain

# Whitelist
response = client.search(
    query="Latest LangChain release notes",
    include_domains=["python.langchain.com", "github.com"],
)

# Blacklist
response = client.search(
    query="Best vector databases",
    exclude_domains=["medium.com"],  # avoid SEO blogspam
)

As MCP

{
  "mcpServers": {
    "tavily": {
      "command": "npx",
      "args": ["-y", "tavily-mcp"],
      "env": { "TAVILY_API_KEY": "tvly-..." }
    }
  }
}

Now Claude Code / Cursor can call tavily_search, tavily_extract, tavily_crawl directly.


FAQ

Q: Is Tavily free? A: Yes — free tier 1,000 API credits/month, no credit card needed. Paid plans add higher quotas and team features. Pricing on tavily.com.

Q: How is Tavily different from Google search via SerpAPI? A: SerpAPI returns Google's HTML organic results — you scrape and clean. Tavily already runs the cleaning, ranking, and (optionally) synthesis. Tavily is purpose-built for LLM consumption; SerpAPI is purpose-built for SERP scraping.

Q: Can I use Tavily with LangChain? A: Yes — langchain_community.tools.tavily_search.TavilySearchResults is a built-in LangChain tool. Same for LlamaIndex, CrewAI, Pydantic AI.


Source & Thanks

Built by Tavily. Commercial product with free tier.

tavily-ai/tavily-python — ⭐ Active

🙏

Source & Thanks

Built by Tavily. Commercial product with free tier.

tavily-ai/tavily-python — ⭐ Active

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets