
Tavily Search
- 3.7k installs
- 5 repo stars
- Updated February 7, 2026
- veithly/tavily-search
A shell-script CLI wrapper that queries the Tavily AI search API to return real-time web results optimized for AI agent consumption.
About
Tavily Search is a shell-script wrapper around the Tavily AI search API, designed to give AI agents access to current web information. Developers invoke it with a single CLI command, passing a query string and optionally requesting JSON-formatted output. It requires a TAVILY_API_KEY environment variable to authenticate requests. The primary workflow is embedding the script call inside agent pipelines or coding assistants that need live facts, news, or verification data not present in a model's training set. It returns results optimized for AI context consumption rather than human-facing HTML. Single shell script invocation: ./scripts/search "query" with optional --format json flag Requires TAVILY_API_KEY exported as an environment variable before use Returns search results described as optimized for AI context rather than raw HTML Supports two scripts: scripts/search for plain output and JSON output mode
- Single shell script invocation: ./scripts/search "query" with optional --format json flag
- Requires TAVILY_API_KEY exported as an environment variable before use
- Returns search results described as optimized for AI context rather than raw HTML
- Supports two scripts: scripts/search for plain output and JSON output mode
- Intended for real-time data retrieval: current news, facts, and live web information
Tavily Search by the numbers
- 3,703 all-time installs (skills.sh)
- +3 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #118 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Aug 4, 2026 (Skillselion catalog sync)
tavily-search capabilities & compatibility
Dependent on Tavily API pricing tier; free tier available at tavily.com
- Capabilities
- web search · real time information retrieval · json output formatting · ai optimized result delivery
- Works with
- openai
- Use cases
- web search · research
- Runs
- Runs locally
- Pricing
- Bring your own API key
What tavily-search says it does
Tavily AI search API - Optimized search for AI agents. Use when searching the web for current information, news, facts, or any task requiring real-time data.
./scripts/search "Claude AI latest features" # Returns: Search results optimized for AI context
export TAVILY_API_KEY="your-api-key"
npx skills add https://github.com/veithly/tavily-search --skill tavily-searchAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 3.7k |
|---|---|
| repo stars | ★ 5 |
| Security audit | 2 / 3 scanners passed |
| Last updated | February 7, 2026 |
| Repository | veithly/tavily-search ↗ |
What it does
Run web searches against the Tavily API from a shell script to feed real-time information into AI agent workflows.
Who is it for?
AI agent pipelines and coding assistants that need live web search results injected during task execution.
Skip if: Use cases requiring browser automation, full-page scraping, or structured data extraction beyond search result snippets.
When should I use this skill?
An agent or script needs current news, facts, or any information not available in the model's training data.
What you get
Agents can retrieve up-to-date web search results in plain text or JSON format directly from a shell command, enabling real-time grounding in workflows.
- Shell script wrapper for Tavily API
- Plain text and JSON search result output
By the numbers
- max_results: 5 per Tavily API request
- include_answer: true for synthesized answers
- Requires TAVILY_API_KEY environment variable
Files
Tavily Search
Web search optimized for AI agents using Tavily API.
Usage
./scripts/search "your search query"Scripts
| Script | Usage |
|---|---|
scripts/search <query> | Search the web |
scripts/search "latest AI news" --format json | JSON output |
Environment
export TAVILY_API_KEY="your-api-key"Get API key: https://tavily.com/
Example
./scripts/search "Claude AI latest features"
# Returns: Search results optimized for AI context#!/bin/bash
# Tavily Web Search
QUERY="${1:-}"
if [ -z "$QUERY" ]; then
echo "Usage: search <query>"
exit 1
fi
API_KEY="${TAVILY_API_KEY:-}"
if [ -z "$API_KEY" ]; then
echo "Error: TAVILY_API_KEY not set"
exit 1
fi
echo "Searching: $QUERY"
curl -s -X POST "https://api.tavily.com/search" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY" \
-d "{\"query\": \"$QUERY\", \"max_results\": 5, \"include_answer\": true}" | python3 -c "
import sys, json
d = json.load(sys.stdin)
if 'answer' in d and d['answer']:
print('\n📝 Answer:')
print(d['answer'])
print('\n🔗 Sources:')
for r in d.get('results', [])[:5]:
print(f\" - {r.get('title', 'No title')}\")
print(f\" {r.get('url', '')}\")
"
Related skills
How it compares
Use tavily-search for agent-optimized summarized search; use raw curl or SERP APIs when custom ranking logic is required.
FAQ
How do I authenticate with the Tavily API?
Export your API key as an environment variable: export TAVILY_API_KEY="your-api-key". Get a key at https://tavily.com/
How do I get JSON output from the search script?
Pass the --format json flag: ./scripts/search "your query" --format json
What does the search script return?
Search results optimized for AI context, as stated in the docs: "Returns: Search results optimized for AI context".
Is Tavily Search safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.