Tavily AI search API integration via curl. Use this skill to perform live web search and RAG-style retrieval.
/plugin marketplace add vm0-ai/api0/plugin install api0@api0This skill inherits all available tools. When active, it can use any tool Claude has access to.
Use Tavily's search API via direct curl calls to perform live web search, ideal for powering retrieval-augmented generation (RAG) for LLMs and agents.
Official documentation:
https://docs.tavily.com/
Use this skill when you need:
TAVILY_API_KEYSet it in your local shell or runtime environment, for example:
export TAVILY_API_KEY="tvly-xxxxxxxxxxxxxxxx"
Important: When using
$VARin a command that pipes to another command, wrap the command containing$VARinbash -c '...'. Due to a Claude Code bug, environment variables are silently cleared when pipes are used directly.bash -c 'curl -s "https://api.example.com" -H "Authorization: Bearer $API_KEY"' | jq .
TAVILY_API_KEY
All examples below assume you have TAVILY_API_KEY set.
The base endpoint for the Tavily search API is a POST request to:
https://api.tavily.com/searchwith a JSON body.
bash -c 'curl -s -X POST "https://api.tavily.com/search" --header "Content-Type: application/json" --header "Authorization: Bearer ${TAVILY_API_KEY}" -d '"'"'{
"query": "2025 AI Trending",
"search_depth": "basic",
"max_results": 5
}'"'"' | jq .'
Key parameters:
query: Search query or natural language questionsearch_depth:
"basic" – faster, good for most use cases"advanced" – deeper search and higher recallmax_results: Maximum number of results to return (e.g. 3 / 5 / 10)bash -c 'curl -s -X POST "https://api.tavily.com/search" --header "Content-Type: application/json" --header "Authorization: Bearer ${TAVILY_API_KEY}" -d '"'"'{
"query": "serverless SaaS pricing best practices",
"search_depth": "advanced",
"max_results": 8,
"include_answer": true,
"include_domains": ["docs.aws.amazon.com", "cloud.google.com"],
"exclude_domains": ["reddit.com", "twitter.com"],
"include_raw_content": false
}'"'"' | jq .'
Common advanced parameters:
include_answer: When true, Tavily returns a summarized answer fieldinclude_domains: Whitelist of domains to includeexclude_domains: Blacklist of domains to excludeinclude_raw_content: Whether to include raw page content (HTML / raw text). Default is false.Tavily returns a JSON object similar to:
{
"answer": "简要总结……",
"results": [
{
"title": "Article title",
"url": "https://example.com/article",
"content": "Snippet or extracted content…",
"score": 0.89
}
]
}
In agents or automation flows you typically:
answer as a concise, ready-to-use summaryresults to extract title + url as references / citationsTo integrate Tavily in n8n with the HTTP Request node:
POSThttps://api.tavily.com/searchContent-Type: application/jsonAuthorization: Bearer {{ $env.TAVILY_API_KEY }}{
"query": "n8n self-hosted best practices",
"search_depth": "basic",
"max_results": 5
}
This lets you pipe Tavily search results into downstream nodes such as LLMs, Notion, Slack notifications, etc.
advanced only when necessary: it consumes more resources and is best for deep research / high-value questions.query; anonymize or mask when possible.