Loading...
Loading...
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.
npx skill4agent add tavily-ai/skills search~/.claude/settings.json{
"env": {
"TAVILY_API_KEY": "tvly-your-api-key-here"
}
}./scripts/search.sh '<json>'# 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", "topic": "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"}'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
}'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"],
"chunks_per_source": 3
}'POST https://api.tavily.com/search| Header | Value |
|---|---|
| |
| |
| Field | Type | Default | Description |
|---|---|---|---|
| string | Required | Search query (keep under 400 chars) |
| integer | 5 | Maximum results (0-20) |
| string | | |
| string | | |
| integer | 3 | Chunks per source (advanced/fast only) |
| string | null | |
| array | [] | Domains to include (max 300) |
| array | [] | Domains to exclude (max 150) |
| boolean | false | Include AI-generated answer |
| boolean | false | Include full page content |
| boolean | false | Include image results |
{
"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
}| Depth | Latency | Relevance | Content Type |
|---|---|---|---|
| Lowest | Lower | NLP summary |
| Low | Good | Chunks |
| Medium | High | NLP summary |
| Higher | Highest | Chunks |
ultra-fastfastbasicadvancedcurl --request POST \
--url https://api.tavily.com/search \
--header "Authorization: Bearer $TAVILY_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"query": "AI news today",
"topic": "news",
"time_range": "day",
"max_results": 10
}'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"
}'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
}'curl --request POST \
--url https://api.tavily.com/search \
--header "Authorization: Bearer $TAVILY_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"query": "AAPL earnings Q4 2024",
"topic": "finance",
"max_results": 10
}'include_domainstime_rangescore