Tavily Search
by @matthew77
Web search using Tavily's LLM-optimized API. Returns relevant results with content snippets, scores, and metadata.
clawhub install liang-tavily-searchπ About This Skill
name: tavily-search description: Web search using Tavily's LLM-optimized API. Returns relevant results with content snippets, scores, and metadata. homepage: https://tavily.com metadata: {"openclaw":{"emoji":"π","requires":{"bins":["node"],"env":["TAVILY_API_KEY"]},"primaryEnv":"TAVILY_API_KEY"}}
Tavily Search
Search the web and get relevant results optimized for LLM consumption.
Authentication
Get your API key at https://tavily.com and add to your OpenClaw config:
{
"skills": {
"entries": {
"tavily-search": {
"enabled": true,
"apiKey": "tvly-YOUR_API_KEY_HERE"
}
}
}
}
Or set the environment variable:
export TAVILY_API_KEY="tvly-YOUR_API_KEY_HERE"
Quick Start
Using the Script
node {baseDir}/scripts/search.mjs "query"
node {baseDir}/scripts/search.mjs "query" -n 10
node {baseDir}/scripts/search.mjs "query" --deep
node {baseDir}/scripts/search.mjs "query" --topic news
Examples
# Basic search
node {baseDir}/scripts/search.mjs "python async patterns"With more results
node {baseDir}/scripts/search.mjs "React hooks tutorial" -n 10Advanced search
node {baseDir}/scripts/search.mjs "machine learning" --deepNews search
node {baseDir}/scripts/search.mjs "AI news" --topic newsDomain-filtered search
node {baseDir}/scripts/search.mjs "Python docs" --include-domains docs.python.org
Options
| Option | Description | Default |
|--------|-------------|---------|
| -n | Number of results (1-20) | 10 |
| --depth | Search depth: ultra-fast, fast, basic, advanced | basic |
| --topic | Topic: general or news | general |
| --time-range | Time range: day, week, month, year | - |
| --include-domains | Comma-separated domains to include | - |
| --exclude-domains | Comma-separated domains to exclude | - |
| --raw-content | Include full page content | false |
| --json | Output raw JSON | false |
Search Depth
| Depth | Latency | Relevance | Use Case |
|-------|---------|-----------|----------|
| ultra-fast | Lowest | Lower | Real-time chat, autocomplete |
| fast | Low | Good | Need chunks but latency matters |
| basic | Medium | High | General-purpose, balanced |
| advanced | Higher | Highest | Precision matters, research |
Tips
--include-domains to focus on trusted sources--time-range for recent informationscore (0-1) to get highest relevance resultsπ‘ Examples
# Basic search
node {baseDir}/scripts/search.mjs "python async patterns"With more results
node {baseDir}/scripts/search.mjs "React hooks tutorial" -n 10Advanced search
node {baseDir}/scripts/search.mjs "machine learning" --deepNews search
node {baseDir}/scripts/search.mjs "AI news" --topic newsDomain-filtered search
node {baseDir}/scripts/search.mjs "Python docs" --include-domains docs.python.org
βοΈ Configuration
| Option | Description | Default |
|--------|-------------|---------|
| -n | Number of results (1-20) | 10 |
| --depth | Search depth: ultra-fast, fast, basic, advanced | basic |
| --topic | Topic: general or news | general |
| --time-range | Time range: day, week, month, year | - |
| --include-domains | Comma-separated domains to include | - |
| --exclude-domains | Comma-separated domains to exclude | - |
| --raw-content | Include full page content | false |
| --json | Output raw JSON | false |
π Tips & Best Practices
--include-domains to focus on trusted sources--time-range for recent informationscore (0-1) to get highest relevance results