
Web Search Tavily
- 1.1k installs
- 133 repo stars
- Updated February 24, 2026
- jwynia/agent-skills
web-search-tavily provides documented workflows for Search the web using Tavily API for high-quality, AI-optimized results with advanced filtering options. Use when you need structured search results, domain filt
About
The web-search-tavily skill search the web using Tavily API for high-quality AI-optimized results with advanced filtering options Use when you need structured search results domain filtering relevance scores or AI-generated answer summaries Requires TAVILY_API_KEY Keywords tavily advanced search filtered search domain filtering relevance scoring Web Search Tavily API Search the web using Tavily's AI-optimized search API Returns high-quality structured results with relevance scores and optional AI-generated summaries Note This skill requires a Tavily API key For basic web search using the agent's built-in capability see web-search When to Use This Skill Use this skill when You need to find current information not in your training data The user asks about recent events news or updates You need to verify facts or find authoritative sources Research requires real-time web data Keywords mentioned search look up find online current latest news Do NOT use this skill when Information is already in your knowledge base and doesn't need verification The user asks about historical facts that don't change You're working with local files
- You need to find current information not in your training data
- The user asks about recent events, news, or updates
- You need to verify facts or find authoritative sources
- Research requires real-time web data
- Keywords mentioned: search, look up, find online, current, latest, news
Web Search Tavily by the numbers
- 1,119 all-time installs (skills.sh)
- +2 installs in the week ending Aug 5, 2026 (Skillselion tracking)
- Ranked #281 of 2,064 Data Science & ML skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Aug 5, 2026 (Skillselion catalog sync)
web-search-tavily capabilities & compatibility
- Capabilities
- you need to find current information not in your · the user asks about recent events, news, or upda · you need to verify facts or find authoritative s · research requires real time web data · keywords mentioned: search, look up, find online
- Use cases
- documentation · planning
What web-search-tavily says it does
# Web Search (Tavily API) Search the web using Tavily's AI-optimized search API.
Returns high-quality, structured results with relevance scores and optional AI-generated summaries.
npx skills add https://github.com/jwynia/agent-skills --skill web-search-tavilyAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1.1k |
|---|---|
| repo stars | ★ 133 |
| Security audit | 2 / 3 scanners passed |
| Last updated | February 24, 2026 |
| Repository | jwynia/agent-skills ↗ |
How do I use web-search-tavily for the task described in its SKILL.md triggers?
Search the web using Tavily API for high-quality, AI-optimized results with advanced filtering options. Use when you need structured search results, domain filtering, relevance scores, or AI-generate.
Who is it for?
Teams invoking web-search-tavily when the user request matches documented triggers and prerequisites.
Skip if: Skip when cached docs are missing, the request is a negative trigger, or another sibling skill owns the workflow.
When should I use this skill?
Search the web using Tavily API for high-quality, AI-optimized results with advanced filtering options. Use when you need structured search results, domain filtering, relevance scores, or AI-generated answer summaries. R
What you get
Step-by-step guidance grounded in web-search-tavily documentation and reference files.
- search result JSON
- optional synthesized answer text
By the numbers
- Supports basic and advanced (--depth advanced) Tavily search modes
- Scopes Deno network access to api.tavily.com only
Files
Web Search (Tavily API)
Search the web using Tavily's AI-optimized search API. Returns high-quality, structured results with relevance scores and optional AI-generated summaries.
Note: This skill requires a Tavily API key. For basic web search using the agent's built-in capability, see web-search.
When to Use This Skill
Use this skill when:
- You need to find current information not in your training data
- The user asks about recent events, news, or updates
- You need to verify facts or find authoritative sources
- Research requires real-time web data
- Keywords mentioned: search, look up, find online, current, latest, news
Do NOT use this skill when:
- Information is already in your knowledge base and doesn't need verification
- The user asks about historical facts that don't change
- You're working with local files or code (use other tools)
- A more specific skill exists for the task (e.g., documentation lookup)
Prerequisites
Before using this skill, ensure:
- TAVILY_API_KEY environment variable is set with a valid API key
- Deno is installed (for running the search script)
- Internet access is available
Get a Tavily API key at: https://tavily.com
Quick Start
Run a simple search:
deno run --allow-env --allow-net=api.tavily.com scripts/search.ts "your search query"Example with AI-generated answer:
deno run --allow-env --allow-net=api.tavily.com scripts/search.ts "React 19 new features" --answerScript Usage
deno run --allow-env --allow-net=api.tavily.com scripts/search.ts [options] "query"Options
| Option | Description | Default |
|---|---|---|
--answer | Include AI-generated answer summary | false |
--depth <level> | Search depth: basic or advanced | basic |
--results <n> | Number of results to return | 5 |
--topic <type> | Topic type: general, news, or finance | general |
--time <range> | Time filter: day, week, month, or year | none |
--include <domains> | Only include these domains (comma-separated) | none |
--exclude <domains> | Exclude these domains (comma-separated) | none |
--raw | Include raw page content in results | false |
--json | Output as JSON (for programmatic use) | false |
--help | Show help message | - |
Search Parameters
Topic Types
- general (default): Broad web search across all content types
- news: Prioritizes news articles and current events
- finance: Focuses on financial information and market data
Search Depth
- basic (default): Fast search, good for most queries
- advanced: Deeper search with more comprehensive results (slower, higher API cost)
Time Range
Filter results by recency:
- day: Last 24 hours
- week: Last 7 days
- month: Last 30 days
- year: Last 365 days
Domain Filtering
Control which sites appear in results:
# Only search documentation sites
scripts/search.ts "React hooks" --include docs.react.dev,developer.mozilla.org
# Exclude social media
scripts/search.ts "AI news" --exclude twitter.com,reddit.comOutput Format
Human-Readable Output (default)
🔍 Search: "React 19 new features"
Found 5 results in 234ms
📝 AI Answer:
────────────────────────────────────────────────────────────
React 19 introduces several new features including...
────────────────────────────────────────────────────────────
1. React 19 Release Notes
https://react.dev/blog/2024/04/25/react-19
React 19 is now available on npm! This release includes...
Score: 0.987
2. What's New in React 19
https://example.com/react-19-features
A comprehensive overview of React 19's new features...
Score: 0.945JSON Output (--json)
{
"query": "React 19 new features",
"results": [
{
"title": "React 19 Release Notes",
"url": "https://react.dev/blog/2024/04/25/react-19",
"content": "React 19 is now available on npm...",
"score": 0.987,
"published_date": "2024-04-25"
}
],
"answer": "React 19 introduces several new features...",
"response_time": 234
}Result Fields
| Field | Type | Description |
|---|---|---|
title | string | Page title |
url | string | Source URL |
content | string | Relevant excerpt from the page |
score | number | Relevance score (0-1, higher is better) |
published_date | string | Publication date (if available) |
raw_content | string | Full page content (only with --raw) |
Examples
Example 1: Current Events Search
Scenario: Find recent news about a technology topic
scripts/search.ts "OpenAI GPT-5 announcement" --topic news --time week --answerExpected output: Recent news articles about GPT-5, with an AI-generated summary
Example 2: Documentation Lookup
Scenario: Find specific technical documentation
scripts/search.ts "Deno deploy edge functions tutorial" --depth advanced --results 10Expected output: Comprehensive results from documentation and tutorial sites
Example 3: Fact Verification
Scenario: Verify a specific claim or statistic
scripts/search.ts "world population 2024" --include un.org,worldbank.org,census.gov --jsonExpected output: JSON results from authoritative sources for programmatic verification
Example 4: Financial Research
Scenario: Research market information
scripts/search.ts "NVIDIA stock analysis 2024" --topic finance --answerExpected output: Financial analysis and market data with AI summary
Common Issues and Solutions
Issue: "TAVILY_API_KEY environment variable is not set"
Symptoms: Script exits immediately with API key error
Solution: 1. Get an API key from https://tavily.com 2. Set the environment variable:
export TAVILY_API_KEY="your-api-key-here"3. Or run with the variable inline:
TAVILY_API_KEY="your-key" deno run --allow-env --allow-net=api.tavily.com scripts/search.ts "query"Issue: "Invalid Tavily API key"
Symptoms: 401 authentication error
Solution: 1. Verify your API key is correct (no extra spaces) 2. Check if your API key has expired 3. Verify your Tavily account is active
Issue: "Tavily API rate limit exceeded"
Symptoms: 429 error response
Solution: 1. Wait a moment and retry 2. Reduce request frequency 3. Consider upgrading your Tavily plan for higher limits
Issue: No results returned
Symptoms: Empty results array
Solution: 1. Try broader search terms 2. Remove domain filters that might be too restrictive 3. Check if the topic exists online 4. Try --depth advanced for harder queries
Limitations
This skill has the following limitations:
- Requires active internet connection
- API rate limits apply based on your Tavily plan
- Results depend on Tavily's index coverage
- Cannot access paywalled or login-required content
- Real-time accuracy depends on Tavily's crawling frequency
- Maximum query length and result count have API limits
Related Skills
- research-workflow: For comprehensive research projects that use multiple searches with planning and synthesis
#!/usr/bin/env -S deno run --allow-env --allow-net=api.tavily.com
/**
* Web Search CLI - Tavily API Integration
*
* A standalone CLI script for searching the web using Tavily's AI-optimized search API.
* Provides high-quality results designed for LLM consumption.
*
* Usage:
* deno run --allow-env --allow-net=api.tavily.com scripts/search.ts "query"
* deno run --allow-env --allow-net=api.tavily.com scripts/search.ts "query" --answer
* deno run --allow-env --allow-net=api.tavily.com scripts/search.ts "query" --depth advanced
* # Or if executable: ./scripts/search.ts "query"
*
* Environment Variables:
* TAVILY_API_KEY - Required. Your Tavily API key from https://tavily.com
*
* Permissions:
* --allow-env: Read TAVILY_API_KEY environment variable
* --allow-net=api.tavily.com: Make API requests to Tavily
*/
// === Constants ===
const VERSION = "1.0.0";
const SCRIPT_NAME = "search";
// === Types ===
export interface TavilyResult {
title: string;
url: string;
content: string;
score?: number;
published_date?: string;
raw_content?: string;
}
export interface TavilyResponse {
results: TavilyResult[];
answer?: string;
query: string;
response_time?: number;
}
export interface SearchOptions {
query: string;
maxResults?: number;
topic?: "general" | "news" | "finance";
includeAnswer?: boolean;
includeRawContent?: boolean;
searchDepth?: "basic" | "advanced";
timeRange?: "day" | "week" | "month" | "year";
days?: number;
includeDomains?: string[];
excludeDomains?: string[];
}
// === Core Logic ===
export async function tavilySearch(options: SearchOptions): Promise<TavilyResponse> {
const apiKey = Deno.env.get("TAVILY_API_KEY");
if (!apiKey) {
throw new Error("TAVILY_API_KEY environment variable is not set");
}
const requestBody: Record<string, unknown> = {
query: options.query,
max_results: options.maxResults ?? 5,
topic: options.topic ?? "general",
include_answer: options.includeAnswer ?? false,
include_raw_content: options.includeRawContent ?? false,
search_depth: options.searchDepth ?? "basic",
};
if (options.timeRange) {
requestBody.time_range = options.timeRange;
}
if (options.topic === "news" && options.days !== undefined) {
requestBody.days = options.days;
}
if (options.includeDomains && options.includeDomains.length > 0) {
requestBody.include_domains = options.includeDomains;
}
if (options.excludeDomains && options.excludeDomains.length > 0) {
requestBody.exclude_domains = options.excludeDomains;
}
const startTime = Date.now();
const response = await fetch("https://api.tavily.com/search", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
api_key: apiKey,
...requestBody,
}),
});
if (!response.ok) {
const errorText = await response.text();
if (response.status === 401) {
throw new Error("Invalid Tavily API key");
} else if (response.status === 429) {
throw new Error("Tavily API rate limit exceeded");
} else if (response.status === 400) {
throw new Error(`Bad request: ${errorText}`);
}
throw new Error(`Tavily API error (${response.status}): ${errorText}`);
}
const data = await response.json();
const endTime = Date.now();
return {
results: data.results?.map((r: TavilyResult) => ({
title: r.title || "",
url: r.url || "",
content: r.content || "",
score: r.score,
published_date: r.published_date,
raw_content: r.raw_content,
})) || [],
answer: data.answer,
query: data.query || options.query,
response_time: endTime - startTime,
};
}
// === Help Text ===
function printHelp(): void {
console.log(`
${SCRIPT_NAME} v${VERSION} - Web search using Tavily API
Usage:
deno run --allow-env --allow-net=api.tavily.com scripts/search.ts [options] "query"
Arguments:
"query" The search query (required)
Options:
--answer Include AI-generated answer summary
--depth <level> Search depth: basic (default) or advanced
--results <n> Number of results (default: 5)
--topic <type> Topic: general (default), news, or finance
--time <range> Time filter: day, week, month, or year
--include <dom> Only include these domains (comma-separated)
--exclude <dom> Exclude these domains (comma-separated)
--raw Include raw page content
--json Output as JSON
-h, --help Show this help
Environment:
TAVILY_API_KEY Required. Get one at https://tavily.com
Examples:
# Basic search
./scripts/search.ts "React hooks tutorial"
# Search with AI answer
./scripts/search.ts "What is TypeScript" --answer
# News search from last week
./scripts/search.ts "AI announcements" --topic news --time week
# Advanced search with domain filter
./scripts/search.ts "Deno deploy" --depth advanced --include deno.com,docs.deno.com
`);
}
// === Main CLI Handler ===
async function main(args: string[]): Promise<void> {
if (args.length === 0 || args.includes("--help") || args.includes("-h")) {
printHelp();
Deno.exit(0);
}
// Parse arguments
const options: SearchOptions = {
query: "",
maxResults: 5,
topic: "general",
includeAnswer: false,
includeRawContent: false,
searchDepth: "basic",
};
let outputJson = false;
for (let i = 0; i < args.length; i++) {
const arg = args[i];
if (arg === "--answer") {
options.includeAnswer = true;
} else if (arg === "--raw") {
options.includeRawContent = true;
} else if (arg === "--json") {
outputJson = true;
} else if (arg === "--depth" && args[i + 1]) {
options.searchDepth = args[++i] as "basic" | "advanced";
} else if (arg === "--results" && args[i + 1]) {
options.maxResults = parseInt(args[++i], 10);
} else if (arg === "--topic" && args[i + 1]) {
options.topic = args[++i] as "general" | "news" | "finance";
} else if (arg === "--time" && args[i + 1]) {
options.timeRange = args[++i] as "day" | "week" | "month" | "year";
} else if (arg === "--include" && args[i + 1]) {
options.includeDomains = args[++i].split(",");
} else if (arg === "--exclude" && args[i + 1]) {
options.excludeDomains = args[++i].split(",");
} else if (!arg.startsWith("--") && !arg.startsWith("-")) {
options.query = arg;
}
}
if (!options.query) {
console.error("Error: No search query provided\n");
printHelp();
Deno.exit(1);
}
try {
const result = await tavilySearch(options);
if (outputJson) {
console.log(JSON.stringify(result, null, 2));
} else {
console.log(`\nSearch: "${result.query}"\n`);
console.log(`Found ${result.results.length} results in ${result.response_time}ms\n`);
if (result.answer) {
console.log("AI Answer:");
console.log("-".repeat(60));
console.log(result.answer);
console.log("-".repeat(60));
console.log();
}
for (const [i, r] of result.results.entries()) {
console.log(`${i + 1}. ${r.title}`);
console.log(` ${r.url}`);
console.log(` ${r.content.slice(0, 200)}${r.content.length > 200 ? "..." : ""}`);
if (r.score) {
console.log(` Score: ${r.score.toFixed(3)}`);
}
console.log();
}
}
} catch (error) {
console.error("Error:", error instanceof Error ? error.message : String(error));
Deno.exit(1);
}
}
// === Entry Point ===
if (import.meta.main) {
main(Deno.args);
}
Related skills
How it compares
Choose web-search-tavily when you want a minimal Deno CLI around Tavily rather than a full MCP server or custom HTTP client.
FAQ
What does web-search-tavily do?
Search the web using Tavily API for high-quality, AI-optimized results with advanced filtering options. Use when you need structured search results, domain filtering, relevance scores, or AI-generated answer summaries. R
When should I use web-search-tavily?
Search the web using Tavily API for high-quality, AI-optimized results with advanced filtering options. Use when you need structured search results, domain filtering, relevance scores, or AI-generated answer summaries. R
What are common prerequisites?
--- name: web-search-tavily description: "Search the web using Tavily API for high-quality, AI-optimized results with advanced filtering options.
Is Web Search Tavily safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.