tavily-dynamic-search

Das Web durchsuchen, Ergebnisse filtern und Inhalte extrahieren, sodass rohe Suchdaten niemals in Ihren Kontextbereich gelangen. Nur Ihre kuratierte print()-Ausgabe wird zurückgegeben.

npx skills add https://github.com/tavily-ai/skills --skill tavily-dynamic-search

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:

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:

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

Then print only bounded evidence:

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:

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:

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

OptionPurpose
--max-resultsBound the search result count; default 5, maximum 20
--depthChoose ultra-fast, fast, basic, or advanced
--time-rangeRestrict results to day, week, month, or year
--include-domainsRestrict results to a comma-separated list of trusted domains
--exclude-domainsExclude a comma-separated list of domains
--include-raw-contentInclude full content as markdown or text
-o, --outputSave the complete response to a file

Use jq only for short filters when Python is unavailable:

tvly search "query" --json | jq '[.results[] | {title, url, score, content}]'

Mehr Skills von tavily-ai

research
tavily-ai
Umfassende Recherche zu jedem Thema mit automatischer Quellensammlung, Analyse und Zitaten. Führt mehrquellige Web-Recherche mit expliziten Zitaten durch, ideal für Vergleiche, aktuelle Ereignisse, Marktanalysen und detaillierte Berichte. Bietet drei Modelloptionen: Mini für gezielte Ein-Themen-Recherche (~30s), Pro für umfassende Multi-Perspektiven-Analyse (~60-120s) und Auto für API-gesteuerte Komplexitätserkennung. Authentifiziert sich über OAuth durch den Tavily MCP-Server mit automatischem browserbasiertem Login auf...
search
tavily-ai
Web-Suche mit LLM-optimierten Ergebnissen, Relevanzbewertung und flexiblen Filtern. Unterstützt vier Suchtiefenmodi (ultraschnell, schnell, einfach, erweitert) mit konfigurierbaren Latenz- und Relevanzabwägungen. Enthält Domain-Filterung, Zeitbereichseinschränkungen, Datumsbereiche, Länder-Boosting und Rohinhalts-Extraktion. Gibt Ergebnisse mit Titel, URL, Inhaltsausschnitt und Relevanzbewertung zurück; optionale Bild-Ergebnisse und Favicons. Automatische OAuth-Authentifizierung über Tavily MCP-Server oder API-Key-Konfiguration;...
tavily-best-practices
tavily-ai
Websuch-API für LLMs mit Echtzeit-Datenzugriff, Inhalts-Extraktion, Site-Crawling und KI-gestützter Recherche. Fünf Kernmethoden: search() für Webergebnisse, extract() für URL-Inhalte, crawl() für siteweite Extraktion, map() für URL-Erkennung und research() für durchgängige KI-Synthese. Unterstützt Python- und JavaScript-SDKs mit asynchronen Clients für parallele Abfragen und konfigurierbare Suchtiefe (ultra-fast/fast/basic/advanced). Die Crawl-Methode akzeptiert semantische Anweisungen, um die Extraktion auf... zu fokussieren.
tavily-cli
tavily-ai
Websuche, Inhalts-Extraktion, Site-Crawling und tiefgehende Recherche über Tavily CLI. Fünf Befehlsmodi für Suche, Extraktion, URL-Erkennung, Bulk-Crawling und Multi-Quellen-Recherche mit Zitaten. Alle Befehle unterstützen JSON-Ausgabe und Dateispeicherung für strukturierte, agentische Workflows. Ein Eskalationsmuster führt Sie von der einfachen Suche über Extraktion, Mapping, Crawling bis hin zur umfassenden Recherche, je nach Bedarf. Erfordert die Installation von tavily-cli und API-Key-Authentifizierung über tvly login.
tavily-crawl
tavily-ai
Mehrseitiger Website-Crawler mit semantischer Filterung und Markdown-Export. Durchsuchen Sie gesamte Site-Abschnitte mit Tiefen- und Breitensteuerung; filtern Sie nach Pfad-Regex, Domain oder natürlichen Sprachinstruktionen, um Ergebnisse zu fokussieren. Speichern Sie jede Seite als lokale Markdown-Dateien über --output-dir oder geben Sie strukturiertes JSON für agentische Verarbeitung zurück. Verwenden Sie semantische Instruktionen mit Chunk-Extraktion, um Kontextaufblähung bei der Übergabe von Ergebnissen an LLMs zu vermeiden; verwenden Sie Ganzseiten-Extraktion für Offline-Dokumentationsdownloads. Unterstützt...
tavily-extract
tavily-ai
Extrahiere sauberes Markdown oder Text aus bis zu 20 URLs, mit Unterstützung für JavaScript-Rendering und abfragefokussierte Chunking. Verarbeitet JavaScript-gerenderte Seiten mit konfigurierbarer Extraktionstiefe (einfach für einfache Seiten, erweitert für dynamische SPAs und Tabellen). Unterstützt abfragefokussierte Extraktion, um nur relevante Inhaltsabschnitte statt ganzer Seiten zurückzugeben. Gibt standardmäßig LLM-optimiertes Markdown zurück, mit Optionen für Klartextformat und strukturierte JSON-Ausgabe. Verarbeitet bis zu 20 URLs in einem einzigen Aufruf;...
tavily-research
tavily-ai
Umfassende KI-gestützte Recherche mit Multi-Quellen-Synthese und Zitaten. Erstellt strukturierte Berichte auf Basis von Webquellen, Dauer 30-120 Sekunden je nach Modellauswahl (mini für gezielte Abfragen, pro für komplexe Vergleiche). Unterstützt mehrere Ausgabeformate: Markdown-Berichte, JSON mit benutzerdefinierten Schemas und konfigurierbare Zitierstile (nummeriert, MLA, APA, Chicago). Beinhaltet asynchronen Workflow für länger laufende Recherchen über --no-wait, Status- und Poll-Befehle, plus Echtzeit...
tavily-search
tavily-ai
Websuche mit LLM-optimierten Ergebnissen, Inhaltsausschnitten und Relevanzbewertungen. Unterstützt vier Suchtiefen (ultraschnell, schnell, basisch, erweitert) mit konfigurierbaren Ergebnisanzahlen bis zu 20, plus Domain-Filterung und Zeitbereichseinschränkungen. Gibt strukturierte JSON-Ausgabe mit Inhaltsausschnitten, Relevanzbewertungen und Metadaten zurück, optimiert für LLM-Nutzung. Enthält spezialisierte Suchmodi für Nachrichten- und Finanzthemen, mit optionalen KI-generierten Antworten und vollständiger Seitenextraktion. Integriert sich in...