askill
search

searchSafety 95Repository

Search the web using Tavily's LLM-optimized search API. Returns relevant results with content snippets, scores, and metadata. Use when you need to find web content on any topic without writing code.

0 stars
1.2k downloads
Updated 2/19/2026

Package Files

Loading files...
SKILL.md

Search Skill

Search the web and get relevant results optimized for LLM consumption.

Authentication

The script uses OAuth via the Tavily MCP server. No manual setup required - on first run, it will:

  1. Check for existing tokens in ~/.mcp-auth/
  2. If none found, automatically open your browser for OAuth authentication

Note: You must have an existing Tavily account. The OAuth flow only supports login — account creation is not available through this flow. Sign up at tavily.com first if you don't have an account.

Quick Start

Using the Script

./scripts/search.sh '<json>'

Examples:

# Basic search
./scripts/search.sh '{"query": "python async patterns"}'

# With options
./scripts/search.sh '{"query": "React hooks tutorial", "max_results": 10}'

# Advanced search with filters
./scripts/search.sh '{"query": "AI news", "time_range": "week", "max_results": 10}'

# Domain-filtered search
./scripts/search.sh '{"query": "machine learning", "include_domains": ["arxiv.org", "github.com"], "search_depth": "advanced"}'

Basic Search

curl --request POST \
  --url https://api.tavily.com/search \
  --header "Authorization: Bearer $TAVILY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
    "query": "latest developments in quantum computing",
    "max_results": 5
  }'

Advanced Search

curl --request POST \
  --url https://api.tavily.com/search \
  --header "Authorization: Bearer $TAVILY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
    "query": "machine learning best practices",
    "max_results": 10,
    "search_depth": "advanced",
    "include_domains": ["arxiv.org", "github.com"]
  }'

API Reference

Endpoint

POST https://api.tavily.com/search

Headers

HeaderValue
AuthorizationBearer <TAVILY_API_KEY>
Content-Typeapplication/json

Request Body

FieldTypeDefaultDescription
querystringRequiredSearch query (keep under 400 chars)
max_resultsinteger10Maximum results (0-20)
search_depthstring"basic"ultra-fast, fast, basic, advanced
topicstring"general"Search topic (general only)
time_rangestringnullday, week, month, year
start_datestringnullReturn results after this date (YYYY-MM-DD)
end_datestringnullReturn results before this date (YYYY-MM-DD)
include_domainsarray[]Domains to include (max 300)
exclude_domainsarray[]Domains to exclude (max 150)
countrystringnullBoost results from a specific country (general topic only)
include_raw_contentbooleanfalseInclude full page content
include_imagesbooleanfalseInclude image results
include_image_descriptionsbooleanfalseInclude descriptions for images
include_faviconbooleanfalseInclude favicon URL for each result

Response Format

{
  "query": "latest developments in quantum computing",
  "results": [
    {
      "title": "Page Title",
      "url": "https://example.com/page",
      "content": "Extracted text snippet...",
      "score": 0.85
    }
  ],
  "response_time": 1.2
}

Search Depth

DepthLatencyRelevanceContent Type
ultra-fastLowestLowerNLP summary
fastLowGoodChunks
basicMediumHighNLP summary
advancedHigherHighestChunks

When to use each:

  • ultra-fast: Real-time chat, autocomplete
  • fast: Need chunks but latency matters
  • basic: General-purpose, balanced
  • advanced: Precision matters (default recommendation)

Examples

Domain-Filtered Search

curl --request POST \
  --url https://api.tavily.com/search \
  --header "Authorization: Bearer $TAVILY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
    "query": "Python async best practices",
    "include_domains": ["docs.python.org", "realpython.com", "github.com"],
    "search_depth": "advanced"
  }'

Search with Full Content

curl --request POST \
  --url https://api.tavily.com/search \
  --header "Authorization: Bearer $TAVILY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
    "query": "React hooks tutorial",
    "max_results": 3,
    "include_raw_content": true
  }'

Tips

  • Keep queries under 400 characters - Think search query, not prompt
  • Break complex queries into sub-queries - Better results than one massive query
  • Use include_domains to focus on trusted sources
  • Use time_range for recent information
  • Filter by score (0-1) to get highest relevance results

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

88/100Analyzed 2/24/2026

High-quality technical reference skill for Tavily's search API. Provides comprehensive documentation including authentication (OAuth), script-based and curl-based usage examples, full API parameter reference with tables, search depth comparison, and practical tips. Well-structured with clear sections, useful metadata, and actionable examples. Slightly docked for missing error handling documentation but overall excellent resource suitable for developers integrating Tavily search.

95
90
90
82
92

Metadata

Licenseunknown
Version-
Updated2/19/2026
Publishertavily-ai

Tags

apigithubllmpromptingsecurity