Index of every page on this site: llms.txt
All skills
tavily-ai avatar

/tavily-best-practices

@778122e official
by Tavily AItavily-ai/skills488 stars
42
Run it yourself

Build production-ready Tavily integrations with best practices baked in. Reference documentation for developers using coding assistants (Claude Code, Cursor, etc.) to implement web search, content extraction, crawling, and research in agentic workflows, RAG systems, or autonomous agents.

Use this Skill: https://skilld.dev/gh/tavily-ai/skills/tavily-best-practices

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈78 tokens for metadata: the name and description. ≈1k when used: this file. ≈17k more on demand in 6 files.

Description uses 3.9% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈312 characters, or 3.9%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

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 entire site crawl()
URL discovery from site map()

For out-of-the-box research:

Need Method
End-to-end research with AI synthesis research()

Quick Reference

search() - Web Search

response = client.search(
    query="quantum computing breakthroughs",  # Keep under 400 chars
    max_results=10,
    search_depth="advanced"
)
print(response)

Key parameters: query, max_results, search_depth (ultra-fast/fast/basic/advanced), include_domains, exclude_domains, time_range

See references/search.md for complete search reference.

extract() - URL Content Extraction

# Simple one-step extraction
response = client.extract(
    urls=["https://docs.example.com"],
    extract_depth="advanced"
)
print(response)

Key parameters: urls (max 20), extract_depth, query, chunks_per_source (1-5)

See references/extract.md for complete extract reference.

crawl() - Site-Wide Extraction

response = client.crawl(
    url="https://docs.example.com",
    instructions="Find API documentation pages",  # Semantic focus
    extract_depth="advanced"
)
print(response)

Key parameters: url, max_depth, max_breadth, limit, instructions, chunks_per_source, select_paths, exclude_paths

See references/crawl.md for complete crawl reference.

map() - URL Discovery

response = client.map(
    url="https://docs.example.com"
)
print(response)

research() - AI-Powered Research

import time

# For comprehensive multi-topic research
result = client.research(
    input="Analyze competitive landscape for X in SMB market",
    model="pro"  # or "mini" for focused queries, "auto" when unsure
)
request_id = result["request_id"]

# Poll until completed
response = client.get_research(request_id)
while response["status"] not in ["completed", "failed"]:
    time.sleep(10)
    response = client.get_research(request_id)

print(response["content"])  # The research report

Key parameters: input, model ("mini"/"pro"/"auto"), stream, output_schema, citation_format

See references/research.md for complete research reference.

Detailed Guides

For complete parameters, response fields, patterns, and examples:

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning1mo5 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The skill provides documentation and implementation examples for the Tavily API, enabling AI agents to perform web searches and content extraction. No malicious behaviors, obfuscation, or security risks were identified.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: MEDIUM · 1 issue

  • Runlayer7mo

    1/7 files flagged

  • ZeroLeaks6mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 778122e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last week.

Steadyupdated 7 months ago
  • tavily
  • search-api
  • web-search
  • rag
  • agents
  • content-extraction
  • crawling
  • research
  • llm

README badge

README badge for tavily-ai/skills/tavily-best-practices

Provides production-grade reference documentation for integrating Tavily's search API into AI agents and RAG systems, covering web search, content extraction, site crawling, and AI-powered research workflows. Includes SDK initialization patterns, method selection guidance, and detailed parameter reference for Python and JavaScript clients.

Generated from the current SKILL.md.

Does Tavily work with both Python and JavaScript?
Yes. Install tavily-python for Python or @tavily/core for JavaScript/Node.js. Both SDKs support the same core methods: search, extract, crawl, map, and research.
What's the difference between search(), extract(), crawl(), and research()?
search() returns web search results; extract() pulls content from specific URLs; crawl() extracts content across an entire site with semantic filtering; research() performs end-to-end multi-topic research with AI synthesis.
Can I use Tavily for RAG systems?
Yes. The skill references SDK patterns for Hybrid RAG, and extract()/crawl() are designed to fetch and chunk content for retrieval workflows.
Does this skill cover async/parallel queries?
Yes. The AsyncTavilyClient is documented for parallel queries, and detailed async patterns are covered in the references/sdk.md guide.
What integrations are supported?
The skill includes integrations for LangChain, LlamaIndex, CrewAI, and Vercel AI SDK, documented in references/integrations.md.

Generated from the current SKILL.md. These answers refresh after source changes.