skillfed

tavily-best-practices

This skill documents how to build production Tavily integrations for AI agents and LLM applications. It covers web search, URL content extraction, site-wide crawling, URL discovery, and AI-powered research across Python and JavaScript SDKs with async support and framework integrations.

Tavily Best Practices provides reference documentation and code patterns for integrating Tavily's search API into LLM applications, agents, and RAG systems.

AI-generated summary based on this skill's SKILL.md

435 35 MIT updated by tavily-ai

Install

tavily-ai/skills/tavily-best-practices

CLI (skillfed)coming soon
git clone https://github.com/tavily-ai/skills
cp -r skills/skills/tavily-best-practices ~/.claude/skills/tavily-best-practices

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do I use Tavily search API with LLMs?

tavily-best-practices shows how to integrate Tavily's search API into language model applications. Start by installing the Python SDK, authenticate with your API key, then use the TavilyClient to execute searches. Tavily returns structured results including URLs, snippets, and metadata that LLMs can process. The skill covers parameter optimization for relevance, async client patterns for parallel queries, and framework integrations with LangChain and LlamaIndex to embed real-time web data directly into LLM reasoning loops.

How do I extract content from URLs with Tavily?

tavily-best-practices documents Tavily's content extraction capabilities for RAG and research workflows. Use the extract method to pull full-text content from URLs, which returns cleaned HTML, markdown, or raw text. The skill explains how to configure extraction depth, handle rate limits, and chain extraction with search results for seamless content pipelines. This approach powers document retrieval systems where you first search for relevant URLs, then extract their full content for embedding into vector stores or knowledge bases.

What are tavily search depth parameters and how do I optimize them?

tavily-best-practices covers Tavily's search depth settings that control result quality and latency. The basic depth performs quick searches; advanced depth crawls more pages for comprehensive results. The skill explains trade-offs: basic depth is faster and cheaper, while advanced depth finds more obscure or niche content. Learn when to use each mode based on your use case—quick agent responses favor basic, while research-heavy workflows benefit from advanced. Parameter tuning examples show how to balance cost, speed, and result relevance for production deployments.

How do I integrate Tavily with LangChain or other AI frameworks?

tavily-best-practices demonstrates framework-specific integrations for LangChain, LlamaIndex, and other orchestration tools. For LangChain, use the TavilySearchResults tool to add web search to agent toolkits. The skill provides code examples showing how to wrap Tavily clients, configure tool parameters, and chain search results into retrieval-augmented generation pipelines. Learn async patterns for parallel queries, error handling for API limits, and best practices for production-ready autonomous agents that rely on real-time web data.

What does tavily-best-practices cover for site crawling and URL discovery?

tavily-best-practices explains Tavily's site-wide crawling and URL discovery features for comprehensive research. Use domain include/exclude filtering to scope searches to specific sites or block competitors. The map_url discovery method finds all indexable URLs within a domain. The skill shows how to combine crawling with extraction to build knowledge bases from entire websites, implement domain-specific research agents, and optimize crawl depth and breadth for large-scale content collection without exceeding API quotas.

Is tavily-best-practices available for JavaScript and Node.js projects?

Yes, tavily-best-practices covers both Python and JavaScript SDKs. The JavaScript/Node.js package is available on npm and provides the same core functionality: search, extraction, and async client support. The skill documents npm installation, authentication, and usage patterns for JavaScript environments. Learn how to build web search into Next.js applications, serverless functions, and browser-based tools. Async/await patterns and error handling examples ensure your JavaScript integrations are production-ready and performant.

SKILL.md

rendered from the published skill — quoted content, verbatim

Tavily

Tavily is a search API designed for LLMs, enabling AI applications to access real-time web data.

Installation

Python:

pip install tavily-python

JavaScript:

npm install @tavily/core

See references/sdk.md for complete SDK reference.

Client Initialization

from tavily import TavilyClient

# Uses TAVILY_API_KEY env var (recommended)
client = TavilyClient()

#With project tracking (for usage organization)
client = TavilyClient(project_id="your-project-id")

# Async client for parallel queries
from tavily import AsyncTavilyClient
async_client = AsyncTavilyClient()

Choosing the Right Method

For custom agents/workflows:

Need Method
Web search results search()
Content from specific URLs extract()
Content from

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 7 files
skills/tavily-best-practices/SKILL.md
skills/tavily-best-practices/references/crawl.md
skills/tavily-best-practices/references/extract.md
skills/tavily-best-practices/references/integrations.md
skills/tavily-best-practices/references/research.md
skills/tavily-best-practices/references/sdk.md
skills/tavily-best-practices/references/search.md

Related skills

Tags

llm-integration real-time-search web-scraping rag-systems agentic-workflows content-extraction api-reference async-patterns framework-support