Esta página se muestra en inglés. Una traducción al español está en curso.
WorkflowsMay 8, 2026·3 min de lectura

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.

Listo para agents

Staging seguro para este activo

Este activo primero queda en staging. El prompt copiado pide inspeccionar los archivos staged antes de activar scripts, config MCP o config global.

Stage only · 17/100Política: staging
Superficie agent
Cualquier agent MCP/CLI
Tipo
Mcp Config
Instalación
Stage only
Confianza
Confianza: Community
Entrada
Asset
Comando de staging seguro
npx -y tokrepo@latest install b2f4accc-45ba-44f3-9a1e-aea8c3096e0d --target codex

Primero deja archivos en staging; la activación requiere revisar el README y el plan staged.

Introducción

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

🙏

Fuente y agradecimientos

Built by Tavily. Commercial product with free tier.

tavily-ai/tavily-python — ⭐ Active

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados