Agent skill

Tavily Search API Integration

by andrewyng in andrewyng/context-hub

Guides building Tavily integrations for web search, URL extraction, site crawling and AI-assisted research in Python or JavaScript agent and RAG projects.

MITAuto-check passedAI & LLM Engineering

Install Tavily Search API Integration

skills CLI
$ npx skills add andrewyng/context-hub --skill tavily-best-practices -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install andrewyng/context-hub tavily-best-practices --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/andrewyng/context-hub.git skills-src && mkdir -p .claude/skills && cp -r skills-src/content/tavily/skills/tavily-best-practices .claude/skills/tavily-best-practices && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
tavily-best-practices
GitHub stars
14k
Token cost
~1.1k tokens
SKILL.md length
217 words
Files
7 (incl. references)
Skills in repo
8
Repo updated
First seen
Licence
MIT

At a glance

Guides building Tavily integrations for web search, URL extraction, site crawling and AI-assisted research in Python or JavaScript agent and RAG projects.

  • Adding live web search to an agent or RAG pipeline
  • SKILL.md covers Installation, Client Initialization, Choosing the Right Method and Quick Reference, plus 1 more section
  • Calls pip and npm; needs TAVILY_API_KEY
  • Pulling clean content from a list of known URLs

What it does

Tavily is a search API aimed at LLM applications. The skill covers installing the Python package `tavily-python` or the JavaScript package `@tavily/core`, creating a client that reads the `TAVILY_API_KEY` environment variable, and choosing between its methods: `search()` for web results, `extract()` for content from given URLs, `crawl()` for whole sites, `map()` for URL discovery and `research()` for end-to-end research with AI synthesis.

Each method has a short quick reference with its main parameters, such as search depth, domain filters and time range for search, a URL limit and chunking options for extract, and depth, breadth and path filters for crawl. Longer references in the bundle go deeper on each method, the SDK and integrations, so the agent can write production-ready code for custom agents, RAG pipelines or autonomous workflows.

When your agent uses it

  • Adding live web search to an agent or RAG pipeline
  • Pulling clean content from a list of known URLs
  • Crawling a documentation site to collect pages on a topic
  • Running multi-topic research that returns structured, cited output

Example prompts

  • “Add a Tavily search step to my Python agent that returns the top five results for each question.”
  • “Crawl docs.example.com for API reference pages and save the text to disk.”
  • “Write a function that extracts the content of these three URLs with Tavily.”
  • “Use Tavily research to compare vector databases and return a report with citations.”

Requirements

  • A Tavily API key in `TAVILY_API_KEY`
  • `tavily-python` or `@tavily/core` installed

What it can do on your machine

Read from SKILL.md and the folder at commit 67dcbeb. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pip
    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip and npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • TAVILY_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Tavily Search API Integration loads about 1.1k tokens when it runs, and up to ~18k if it reads all its reference files. Until then it costs about 50 tokens; SKILL.md has 217 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~50
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~18k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from andrewyng/context-hub at commit 67dcbeb, republished under its MIT licence (© andrewyng). 217 words, ~1,110 tokens.

Download SKILL.mdSave it as .claude/skills/tavily-best-practices/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
tavily-best-practices
description
Build production-ready Tavily integrations with best practices for web search, content extraction, crawling, and research in agentic workflows, RAG systems, and autonomous agents
metadata.revision
1
metadata.updated-on
2026-03-11
metadata.source
maintainer
metadata.tags
tavily,search,extract,crawl,research,ai,agents,rag,web-search,web-scraping,best-practices

Tavily

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

Installation

Python:

bash
pip install tavily-python

JavaScript:

bash
npm install @tavily/core

See references/sdk.md for complete SDK reference.

Client Initialization

python
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:

NeedMethod
Web search resultssearch()
Content from specific URLsextract()
Content from entire sitecrawl()
URL discovery from sitemap()

For out-of-the-box research:

NeedMethod
End-to-end research with AI synthesisresearch()

Quick Reference

python
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
python
# 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
python
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
python
response = client.map(
    url="https://docs.example.com"
)
print(response)
research() - AI-Powered Research
python
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:

© andrewyng, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (references) in content/tavily/skills/tavily-best-practices of andrewyng/context-hub.

  • SKILL.md
  • references/crawl.md
  • references/extract.md
  • references/integrations.md
  • references/research.md
  • references/sdk.md
  • references/search.md

Open the folder on GitHubat commit 67dcbeb

Compare with similar skills

Tavily Search API Integration next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Tavily Search API Integration compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Tavily Search API Integration this skillandrewyng/context-hub14k—~1.1kAutomated safety check: PassMIT
Brave LLM Context APIbrave/brave-search-skills183—~3.3kAutomated safety check: PassMIT
Brightdata SDK JSbrightdata/skills264—~3kAutomated safety check: PassMIT
Anti Detect Browserantibrow/anti-detect-browser-skills17—~9.8kAutomated safety check: WarnMIT
Routerbase API Integrationaiskillstore/marketplace433—~964Automated safety check: PassNone
Langgraph Project Setupsoba-labs/langchain-agent-skills107—~2.4kAutomated safety check: NotesMIT

Similar skills

  • Brave LLM Context API

    brave/brave-search-skills

    Documents Brave's LLM Context API, which returns pre-extracted, ranked web page content for grounding agent and RAG answers, with GET and POST calls and Goggles filters.

    183 GitHub stars~3.3k tokensUpdated 18 days ago
    AI & LLM EngineeringAuto-check passed
  • Brightdata SDK JS

    brightdata/skills

    Web data extraction and discovery using the Bright Data JavaScript/TypeScript SDK (@brightdata/sdk).

    264 GitHub stars~3k tokensUpdated 4 days ago
    Productivity & AutomationAuto-check passed
  • Anti Detect Browser

    antibrow/anti-detect-browser-skills

    Drive Chromium from standard Playwright APIs with a real-device fingerprint applied in the kernel, one persistent isolated profile per identity, and a per-profile proxy whose exit IP sets timezone…

    17 GitHub stars~9.8k tokensUpdated 1 mo ago
    Testing & QAAuto-check: warnings
  • Routerbase API Integration

    aiskillstore/marketplace

    Integrate applications with RouterBase, the OpenAI-compatible model gateway at https://routerbase.com/v1.

    433 GitHub stars~964 tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Langgraph Project Setup

    soba-labs/langchain-agent-skills

    Initialize and configure LangGraph projects with proper structure, langgraph.json configuration, environment variables, and dependency management.

    107 GitHub stars~2.4k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check: notes
  • Discover API

    brightdata/skills

    Use Bright Data's Discover API — intent-ranked, AI-relevance-scored web search at scale (not keyword SERP).

    264 GitHub stars~2.4k tokensUpdated 4 days ago
    Productivity & AutomationAuto-check passed

More from andrewyng/context-hub

All 8 skills in this repo
  • Get API Docs with chub

    andrewyng/context-hub

    Fetches current documentation for third-party APIs and SDKs with the chub CLI before the agent writes code against them, instead of relying on remembered API shapes.

    14k GitHub starsUsed in 1 repo~775 tokens
    Auto-check passed
  • Flutter Bloc and Cubit

    andrewyng/context-hub

    Helps choose between Bloc and Cubit in Flutter and sets defaults for packages, lifecycle, widget binding and tests.

    14k GitHub stars~998 tokensUpdated 4 mo ago
    Auto-check passed
  • Sequences parts-mcp tool calls for finding, pricing and checking availability of electronic components, including BOM processing and datasheet navigation.

    14k GitHub stars~1.8k tokensUpdated 4 mo ago
    Auto-check passed
  • Olakai Monitoring Integration

    andrewyng/context-hub

    Adds Olakai monitoring to an existing LLM application with minimal code changes, then configures custom KPIs so the dashboard tracks business outcomes instead of just token counts.

    14k GitHub stars~4.5k tokensUpdated 4 mo ago
    Auto-check passed
  • Playwright Login Flows

    andrewyng/context-hub

    Collects reusable Playwright patterns for logging in during end-to-end tests: password forms, OAuth redirects, saved browser state and TOTP two-factor codes.

    14k GitHub stars~715 tokensUpdated 4 mo ago
    Auto-check passed
  • Olakai Agent Project Setup

    andrewyng/context-hub

    Builds a new AI agent with Olakai monitoring from the start: CLI login, SDK integration, per-agent KPI configuration and an end-to-end check that data flows.

    14k GitHub stars~5k tokensUpdated 4 mo ago
    Auto-check passed

Questions about Tavily Search API Integration

What does Tavily Search API Integration do?

Guides building Tavily integrations for web search, URL extraction, site crawling and AI-assisted research in Python or JavaScript agent and RAG projects. Tavily is a search API aimed at LLM applications. The skill covers installing the Python package `tavily-python` or the JavaScript package `@tavily/core`, creating a client that reads the `TAVILY_API_KEY` environment variable, and choosing between its methods: `search()` for web results, `extract()` for content from given URLs, `crawl()` for whole sites, `map()` for URL discovery and `research()` for end-to-end research with AI synthesis.

When should I use Tavily Search API Integration?

Tavily Search API Integration fits situations like: adding live web search to an agent or RAG pipeline; pulling clean content from a list of known URLs; crawling a documentation site to collect pages on a topic; running multi-topic research that returns structured, cited output.

How do I install Tavily Search API Integration in Claude Code?

Run `npx skills add andrewyng/context-hub --skill tavily-best-practices -a claude-code`. Or copy the skill folder (content/tavily/skills/tavily-best-practices in andrewyng/context-hub) into .claude/skills/tavily-best-practices in your project. Claude Code loads it when a task matches its description.

How do I install Tavily Search API Integration in Codex?

Run `npx skills add andrewyng/context-hub --skill tavily-best-practices -a codex`. Or copy the skill folder (content/tavily/skills/tavily-best-practices in andrewyng/context-hub) into .agents/skills/tavily-best-practices in your project. Codex loads it when a task matches its description.

Can I use Tavily Search API Integration in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add andrewyng/context-hub --skill tavily-best-practices -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tavily-best-practices, .gemini/skills/tavily-best-practices, .github/skills/tavily-best-practices and .opencode/skills/tavily-best-practices in your project.

What does Tavily Search API Integration need to run?

Going by SKILL.md and its folder, Tavily Search API Integration needs the command-line tools its instructions call (pip and npm) and credentials named TAVILY_API_KEY. Our summary lists: A Tavily API key in `TAVILY_API_KEY`; `tavily-python` or `@tavily/core` installed.

Does Tavily Search API Integration access the network?

SKILL.md contains no URLs. Its commands use pip and npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Tavily Search API Integration safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Tavily Search API Integration use?

Tavily Search API Integration is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Tavily Search API Integration use?

About 1.1k tokens (SKILL.md is roughly 4.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 17k tokens, read only when the agent opens those files.

What are the alternatives to Tavily Search API Integration?

Skills that share tags, products or a category with Tavily Search API Integration: Brave LLM Context API (brave/brave-search-skills, 183 stars), Brightdata SDK JS (brightdata/skills, 264 stars), Anti Detect Browser (antibrow/anti-detect-browser-skills, 17 stars) and Routerbase API Integration (aiskillstore/marketplace, 433 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Tavily Search API Integration?

andrewyng (a GitHub user) maintains it in andrewyng/context-hub, which has 13,973 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on May 31, 2026.

Source: andrewyng/context-hub on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.