# Tavily Search

> Use Tavily Search API for optimized, real-time web search results for RAG. Requires TAVILY_API_KEY. Use when this capability is needed.

- Skill: `tomevault-io/tavily-search-5` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/tavily-search-5`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/tavily-search-5/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/tavily-search-5

---


# Tavily Search Skill

This skill utilizes the Tavily Search API, providing clean, real-time web search results optimized for LLMs and RAG pipelines.

## Setup

1.  **Dependencies:** Requires `tavily-python`.
    ```bash
    pip install tavily-python python-dotenv
    ```

2.  **API Key Configuration:** Requires `TAVILY_API_KEY`.

    ```bash
    # If the script fails due to a missing key, run the following:
    echo "It seems the Tavily API key is not set up."
    read -p "Enter your Tavily API key: " TAVILY_KEY
    echo "TAVILY_API_KEY=$TAVILY_KEY" >> .env
    if [ -f .gitignore ] && ! grep -q ".env" .gitignore; then echo ".env" >> .gitignore; fi
    echo "API key saved to .env."
    ```

## Usage

Use the `scripts/tavily_search.py` script.

### Command

```bash
python3 scripts/tavily_search.py --query "<query>" [--max-results <N>] [--search-depth <basic|advanced>]
```

### Parameters

* `--query` (Required): The search query.
* `--search-depth` (Optional): Default `basic`. Use `advanced` for intensive research (higher quality, slower).
* `--max-results` (Optional): Default 10.

### Example

```bash
python3 scripts/tavily_search.py --query "autonomous research agents comparison" --search-depth advanced
```

## Output

The script outputs JSON containing a synthesized `answer` (if requested by the script) and a list of `results` (URL, title, content snippets).

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/closedloop-technologies) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-12 -->

