Skip to main content

Build

Tavily Dynamic Search

Tavily AIOfficialCertified

Programmatic Tavily search with context isolation. Use when web search or extraction will return large results that need filtering, deduplication, or multi-step triage before they enter the model context. Use tavily-search for ordinary lookups and tavily-research for end-to-end cited synthesis.

  • New
  • v1.0.1
  • Reviewed Jul 21
  • No reviews yet

Capabilities

  • Before running

    Search and extract support capped keyless access

  • Large result: save first, then filter

    Use the CLI's file output so raw page content does not pass through…

  • Targeted extraction

  • Multiple queries

    For multi-angle research, run a small set of focused searches…

Getting started

Full instructions

Example command

Large result: save first, then filter

python3 -c '

Instructions: SKILL.mdv1.0.1

Tavily Dynamic Search

Keep large raw web payloads on disk and return only the evidence needed for the
task. This is useful when using --include-raw-content, combining several
queries, or extracting multiple long pages. Do not use this workflow for a
simple lookup that a normal tvly search --json can answer directly.

Before running

Search and extract support capped keyless access. Run them directly when tvly
is available. If tvly is missing, follow the
tavily-cli setup. Do not look for an API key or
authenticate before the first request. If the keyless cap is reached in an
interactive session, run tvly login to open browser OAuth, then retry the
blocked request once. In an unattended environment, report the cap and
authentication options instead of starting an interactive flow.

Workflow

  1. Search broadly without raw content and inspect titles, URLs, scores, and
    snippets.
  2. Fetch full content only for the best sources.
  3. When raw output could be large, save it with -o and filter the file before
    printing anything to the model context.
  4. Preserve source URLs beside every extracted fact.

When the user restricts evidence to official or named domains, validate the
hostname of every selected URL during local filtering. --include-domains
narrows the search but is not proof that every returned result belongs to an
allowed host. If full-page extraction is unavailable, label conclusions as
search-snippet evidence instead of implying that the page body was verified.

Keep the process in one turn when the relevant sources and filters are already
known. Use another turn only when the first search changes what should be
extracted.

Create a unique temporary task directory before saving evidence so concurrent
agents do not overwrite one another. Python's tempfile.mkdtemp() is available
when mktemp is not permitted. Reuse that directory for all raw and filtered
artifacts from the task.

Small result: filter a direct JSON response

For a small search response, a pipe is enough:

bash
tvly search "query" --max-results 5 --json | python3 -c '
import json, sys
data = json.load(sys.stdin)
for result in data.get("results", []):
    score = result.get("score") or 0
    title = result.get("title") or ""
    print(f"[{score:.2f}] {title}")
    print(result.get("url", ""))
    print(result.get("content", "")[:300])
'

Do not discard stderr. Authentication failures, keyless-cap messages, and API
errors are actionable and must remain visible.

Large result: save first, then filter

Use the CLI's file output so raw page content does not pass through the tool
response:

bash
tvly search "query" \
  --include-raw-content markdown \
  --max-results 8 \
  --json \
  -o /tmp/tavily-search-results.json

Then print only bounded evidence:

bash
python3 -c '
import json
from pathlib import Path

data = json.loads(Path("/tmp/tavily-search-results.json").read_text())
for result in data.get("results", []):
    title = result.get("title") or ""
    url = result.get("url") or ""
    print(f"## {title}")
    print(f"URL: {url}")
    print((result.get("raw_content") or result.get("content") or "")[:1200])
    print()
'

Adjust the filtering logic to the question. Prefer relevant paragraphs or
fields over fixed character slices when the target information is known. Aim
for roughly 150-600 tokens per source unless a table or code block genuinely
requires more.

Targeted extraction

When search identifies the right URLs, extract only those pages:

bash
tvly extract "https://example.com/article" \
  --json \
  -o /tmp/tavily-extract-results.json

For topic-focused pages, let Tavily reduce the response before local filtering:

bash
tvly extract "https://example.com/docs" \
  --query "authentication API" \
  --chunks-per-source 3 \
  --json \
  -o /tmp/tavily-extract-results.json

Multiple queries

For multi-angle research, run a small set of focused searches, deduplicate by
URL, and rank before extracting. Use subprocess.run(..., capture_output=True, text=True) when orchestrating commands in Python. Check returncode; if a
command fails, surface its stderr and stop or retry deliberately. Never use a
blanket except Exception: continue that hides missing evidence.

Response shapes

tvly search --json returns query, optional answer, results, and
response_time. Each result commonly contains url, title, content,
score, and optional raw_content.

tvly extract --json returns results, failed_results, and
response_time. Each successful result commonly contains url,
raw_content, and optional images.

Treat fields as optional and use .get() while filtering. Inspect
failed_results instead of assuming every requested URL succeeded.

Useful options

Option Purpose
--max-results Bound the search result count; default 5, maximum 20
--depth Choose ultra-fast, fast, basic, or advanced
--time-range Restrict results to day, week, month, or year
--include-domains Restrict results to a comma-separated list of trusted domains
--exclude-domains Exclude a comma-separated list of domains
--include-raw-content Include full content as markdown or text
-o, --output Save the complete response to a file

Use jq only for short filters when Python is unavailable:

bash
tvly search "query" --json | jq '[.results[] | {title, url, score, content}]'
Browse all
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

View source →
tavily-searchUse this skill whenever a task needs the web: searching for information, checking current facts or news, finding sources, reading a URL, finding a page on a site, or collecting many pages from a site. Use it for anything past your training…5 installstavily-researchResearch a topic in depth with Tavily. Use this skill when a question needs many sources gathered and weighed together: analysing a market, policy, technology or trend, comparing options across several criteria, reviewing the literature,…1 installstavily-cliSet up, authenticate, update, troubleshoot, or choose between Tavily CLI web commands. Use when the user asks about the Tavily CLI, installing Tavily skills, first-time setup, authentication, keyless limits, CLI updates, or which Tavily…0 installstavily-crawlCrawl websites and extract content from multiple pages via the Tavily CLI. Use this skill when the user wants to crawl a site, download documentation, extract an entire docs section, bulk-extract pages, save a site as local markdown files,…0 installstavily-entityFill in a company, person, or organization for a CRM from the web, using Tavily, including a CSV of rows the user already has. Identifies the right entity when others share the name, then fills the fields from authoritative sources. Use…0 installstavily-listBuild a deduplicated table of matches for a set, using Tavily. The table is what search returned, not every match that exists. Use when the user wants a list, all of something, or a table with duplicates removed. Confirm the columns and a…0 installs
What does the tavily-dynamic-search skill do?

Programmatic Tavily search with context isolation. Use when web search or extraction will return large results that need filtering, deduplication, or multi-step triage before they enter the model context. Use tavily-search for ordinary lookups and tavily-research for end-to-end cited synthesis. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the tavily-dynamic-search skill?

Run `npx @skills-hub-ai/cli install tavily-dynamic-search` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/tavily-dynamic-search/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does tavily-dynamic-search work with?

tavily-dynamic-search runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the tavily-dynamic-search skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use tavily-dynamic-search after installing it?

In Claude Code, type `/tavily-dynamic-search` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the tavily-dynamic-search skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.

Badge for your README

Show that this skill is on Skills Hub. The badge links back to this page and shows the live install count.

Install on Skills Hub badge preview
Markdown
[![Install on Skills Hub](https://skills-hub.ai/api/badges/skill/tavily-dynamic-search)](https://skills-hub.ai/skills/tavily-dynamic-search)
HTML
<a href="https://skills-hub.ai/skills/tavily-dynamic-search"><img src="https://skills-hub.ai/api/badges/skill/tavily-dynamic-search" alt="Install on Skills Hub"></a>

More options in the badge docs.