tavily
Original:🇺🇸 English
Translated
Tavily AI search API integration via curl. Use this skill to perform live web search and RAG-style retrieval.
2installs
Sourcevm0-ai/vm0-skills
Added on
NPX Install
npx skill4agent add vm0-ai/vm0-skills tavilyTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Tavily Search API
Use Tavily's search API via direct calls to perform live web search, ideal for powering retrieval-augmented generation (RAG) for LLMs and agents.
curlOfficial documentation:https://docs.tavily.com/
When to Use
Use this skill when you need:
- Fresh, up-to-date information (news, trends, ongoing events)
- Search results with sources/links to ground LLM or agent answers
- Research / desk research inside automation workflows
- A reliable retrieval layer for RAG, combined with skills like Notion or Firecrawl
Prerequisites
- Sign up for Tavily and create an API key
- Store your Tavily API key in the environment variable
TAVILY_API_KEY
Set it in your local shell or runtime environment, for example:
bash
export TAVILY_API_KEY="tvly-xxxxxxxxxxxxxxxx"Important: When usingin a command that pipes to another command, wrap the command containing$VARin$VAR. Due to a Claude Code bug, environment variables are silently cleared when pipes are used directly.bash -c '...'bashbash -c 'curl -s "https://api.example.com" -H "Authorization: Bearer $API_KEY"' | jq '.results[] | {title, url}'
How to Use
All examples below assume you have set in your environment.
The base endpoint for the Tavily search API is a request to:
TAVILY_API_KEYPOSThttps://api.tavily.com/search
with a JSON body.
1. Basic Search
Write to :
/tmp/tavily_request.jsonjson
{
"query": "2025 AI Trending",
"search_depth": "basic",
"max_results": 5
}Then run:
bash
bash -c 'curl -s -X POST "https://api.tavily.com/search" --header "Content-Type: application/json" --header "Authorization: Bearer ${TAVILY_API_KEY}" -d @/tmp/tavily_request.json'Key parameters:
- : Search query or natural language question
query - :
search_depth- – faster, good for most use cases
"basic" - – deeper search and higher recall
"advanced"
- : Maximum number of results to return (e.g. 3 / 5 / 10)
max_results
2. Advanced Search
Write to :
/tmp/tavily_request.jsonjson
{
"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
}Then run:
bash
bash -c 'curl -s -X POST "https://api.tavily.com/search" --header "Content-Type: application/json" --header "Authorization: Bearer ${TAVILY_API_KEY}" -d @/tmp/tavily_request.json'Common advanced parameters:
- : When
include_answer, Tavily returns a summarizedtruefieldanswer - : Whitelist of domains to include
include_domains - : Blacklist of domains to exclude
exclude_domains - : Whether to include raw page content (HTML / raw text). Default is
include_raw_content.false
3. Typical Response Structure (Example)
Tavily returns a JSON object similar to:
json
{
"answer": "Brief summary...",
"results": [
{
"title": "Article title",
"url": "https://example.com/article",
"content": "Snippet or extracted content...",
"score": 0.89
}
]
}In agents or automation flows you typically:
- Use as a concise, ready-to-use summary
answer - Iterate over to extract
results+titleas references / citationsurl
4. Using Tavily in n8n (HTTP Request Node)
To integrate Tavily in n8n with the HTTP Request node:
- Method:
POST - URL:
https://api.tavily.com/search - Headers:
- :
Content-Typeapplication/json - :
AuthorizationBearer {{ $env.TAVILY_API_KEY }}
- Body: JSON, for example:
json
{
"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.
Guidelines
- Use only when necessary: it consumes more resources and is best for deep research / high-value questions.
advanced - Mind quotas and cost: Tavily typically offers free tiers plus paid usage; in automation flows, add guards (filters, rate limits).
- Post-process results with an LLM: use Tavily for retrieval, then let your LLM summarize, extract tables, or generate reports.
- Handle sensitive data carefully: avoid sending raw secrets or PII directly in ; anonymize or mask when possible.
query