search
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.
- License 许可
- MIT
- 最近更新
- 2026-08-23
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- search
- description
- 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.
02 资源文件 5
- 参考文档_meta.json268 B
- 许可证LICENSE1.0 KB
- 脚本scripts/search.sh2.0 KB
- 参考文档SOURCE.md359 B
- 参考文档TRUST.auto.yaml2.2 KB
03 SKILL.md 正文
Search Skill
Search the web and get relevant results optimized for LLM consumption.
Prerequisites
Tavily API Key Required - Get your key at https://tavily.com
Add to ~/.claude/settings.json:
{
"env": {
"TAVILY_API_KEY": "tvly-your-api-key-here"
}
}
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", "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"}'
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"],
"chunks_per_source": 3
}'
API Reference
Endpoint
POST https://api.tavily.com/search
Headers
| Header | Value |
|---|---|
Authorization |
Bearer <TAVILY_API_KEY> |
Content-Type |
application/json |
Request Body
| Field | Type | Default | Description |
|---|---|---|---|
query |
string | Required | Search query (keep under 400 chars) |
max_results |
integer | 5 | Maximum results (0-20) |
search_depth |
string | "basic" |
ultra-fast, fast, basic, advanced |
topic |
string | "general" |
general, news, finance |
chunks_per_source |
integer | 3 | Chunks per source (advanced/fast only) |
time_range |
string | null | day, week, month, year |
include_domains |
array | [] | Domains to include (max 300) |
exclude_domains |
array | [] | Domains to exclude (max 150) |
include_answer |
boolean | false | Include AI-generated answer |
include_raw_content |
boolean | false | Include full page content |
include_images |
boolean | false | Include image results |
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
| Depth | Latency | Relevance | Content Type |
|---|---|---|---|
ultra-fast |
Lowest | Lower | NLP summary |
fast |
Low | Good | Chunks |
basic |
Medium | High | NLP summary |
advanced |
Higher | Highest | Chunks |
When to use each:
ultra-fast: Real-time chat, autocompletefast: Need chunks but latency mattersbasic: General-purpose, balancedadvanced: Precision matters (default recommendation)
Examples
News Search
curl --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
}'
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
}'
Finance Search
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
}'
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_domainsto focus on trusted sources - Use
time_rangefor recent information - Filter by
score(0-1) to get highest relevance results
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
git-summary
Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.
agent-constitution
Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.