Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Trending on skills.sh. Installs from upstream source veithly/tavily-search.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
scripts/search
1#!/bin/bash2# Tavily Web Search34QUERY="${1:-}"5if [ -z "$QUERY" ]; then6echo "Usage: search <query>"7exit 18fi910API_KEY="${TAVILY_API_KEY:-}"11if [ -z "$API_KEY" ]; then12echo "Error: TAVILY_API_KEY not set"13exit 114fi1516echo "Searching: $QUERY"17curl -s -X POST "https://api.tavily.com/search" \18-H "Content-Type: application/json" \19-H "Authorization: Bearer $API_KEY" \20-d "{\"query\": \"$QUERY\", \"max_results\": 5, \"include_answer\": true}" | python3 -c "21import sys, json22d = json.load(sys.stdin)23if 'answer' in d and d['answer']:24print('\n๐ Answer:')25print(d['answer'])26print('\n๐ Sources:')27for r in d.get('results', [])[:5]:28print(f\" - {r.get('title', 'No title')}\")29print(f\" {r.get('url', '')}\")30"31