Get the FREE Ultimate OpenClaw Setup Guide →
a

Tavily Web Search

Verified

@arun-8687

npx machina-cli add skill @arun-8687/tavily-search --openclaw
Files (1)
SKILL.md
1.2 KB

Tavily Search

AI-optimized web search using Tavily API. Designed for AI agents - returns clean, relevant content.

Search

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

Options

  • -n <count>: Number of results (default: 5, max: 20)
  • --deep: Use advanced search for deeper research (slower, more comprehensive)
  • --topic <topic>: Search topic - general (default) or news
  • --days <n>: For news topic, limit to last n days

Extract content from URL

node {baseDir}/scripts/extract.mjs "https://example.com/article"

Notes:

  • Needs TAVILY_API_KEY from https://tavily.com
  • Tavily is optimized for AI - returns clean, relevant snippets
  • Use --deep for complex research questions
  • Use --topic news for current events

Source

git clone https://clawhub.ai/arun-8687/tavily-searchView on GitHub

Overview

Tavily Search provides AI-optimized web search via the Tavily API, returning concise, relevant results designed for AI agents. It speeds up research and decision-making by surfacing clean snippets from the web. Note: requires a Tavily API key (TAVILY_API_KEY).

How This Skill Works

The tool queries the Tavily API through Node.js scripts (search.mjs) using your query and optional flags (-n, --deep, --topic, --days). For deeper research, use --deep; for current events, use --topic news and optionally --days. You can also extract full content from a URL with extract.mjs to fetch richer text beyond snippets.

When to Use It

  • When you need quick, concise web results to inform an AI agent's reasoning.
  • When tackling complex questions and you want deeper, more comprehensive results (--deep).
  • When researching current events using --topic news and optionally --days to limit recency.
  • When you want to limit results to a specific number with -n for faster processing.
  • When you need to fetch full content from a URL using extract.mjs for deeper analysis.

Quick Start

  1. Step 1: Run node {baseDir}/scripts/search.mjs "your query"
  2. Step 2: Tweak results with flags like -n 10, --deep, --topic news, or --days 7
  3. Step 3: (Optional) Run node {baseDir}/scripts/extract.mjs "https://example.com/article" to fetch full content

Best Practices

  • Use --deep for complex research questions to obtain more thorough results.
  • For current-events work, combine --topic news with --days to keep results fresh.
  • Always set the TAVILY_API_KEY in your environment before running searches.
  • Start with a small -n (e.g., 5) to prototype, then raise up to the max 20 if needed.
  • If you need full article text, supplement snippets with extract.mjs on the target URL.

Example Use Cases

  • AI agent searches for 'image generation safety guidelines' with -n 8 and --deep to gather diverse, concise sources.
  • Researcher runs a general inquiry with -n 5 to collect quick snippets on 'privacy by design'.
  • Journalist uses node scripts with --topic news and --days 7 to fetch recent articles for a developing AI policy story.
  • QA bot fetches 'latency benchmarks' with -n 6 to assemble a concise comparison of sources.
  • Data scientist extracts content from https://example.com/article using extract.mjs to feed a deeper text analysis pipeline.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers