tavily-search
使用LLM優化結果、內容摘要及相關性分數進行網路搜尋。支援四種搜尋深度(極快、快速、基本、進階),可設定最多20筆結果,並提供網域過濾與時間範圍限制。回傳結構化JSON輸出,包含內容摘要、相關性分數及專為LLM設計的元數據。內建新聞與財經主題的專用搜尋模式,可選用AI生成答案及完整頁面內容提取。整合至...
npx skills add https://github.com/tavily-ai/skills --skill tavily-searchtavily search
Web search returning LLM-optimized results with content snippets and relevance scores.
Before running
Run search directly when tvly is available. Search supports capped keyless
access, so do not look for an API key or authenticate before the first request.
If tvly is missing, follow the tavily-cli setup
before retrying. If the keyless cap is reached in an interactive session, run
tvly login to open browser OAuth, then retry the original search once. In an
unattended environment, report the cap and authentication options instead of
starting an interactive flow. Do not start a second login immediately after
guided setup has completed.
When to use
- You need to find information on any topic
- You don't have a specific URL yet
- First step in the workflow: search → extract → map → crawl → research
Quick start
# Basic search
tvly search "your query" --json
# Advanced search with more results
tvly search "quantum computing" --depth advanced --max-results 10 --json
# Recent news
tvly search "AI news" --time-range week --topic news --json
# Domain-filtered
tvly search "SEC filings" --include-domains sec.gov,reuters.com --json
# Include full page content in results
tvly search "react hooks tutorial" --include-raw-content --max-results 3 --json
Options
| Option | Description |
|---|---|
--depth | ultra-fast, fast, basic (default), advanced |
--max-results | Max results, 0-20 (default: 5) |
--topic | general (default), news, finance |
--time-range | day, week, month, year |
--start-date | Results after date (YYYY-MM-DD) |
--end-date | Results before date (YYYY-MM-DD) |
--include-domains | Comma-separated domains to include |
--exclude-domains | Comma-separated domains to exclude |
--country | Boost results from country |
--include-answer | Include AI answer (basic or advanced) |
--include-raw-content | Include full page content (markdown or text) |
--include-images | Include image results |
--include-image-descriptions | Include AI image descriptions |
--chunks-per-source | Chunks per source (advanced/fast depth only) |
-o, --output | Save the JSON response to a file |
--json | Structured JSON output |
Search depth
| Depth | Speed | Relevance | Best for |
|---|---|---|---|
ultra-fast | Fastest | Lower | Real-time chat, autocomplete |
fast | Fast | Good | Need chunks, latency matters |
basic | Medium | High | General-purpose (default) |
advanced | Slower | Highest | Precision, specific facts |
Tips
- Keep queries under 400 characters — think search query, not prompt.
- Break complex queries into sub-queries for better results.
- Use
--include-raw-contentwhen you need full page text (saves a separate extract call). - Use
--include-domainsto focus on trusted sources. - Use
--time-rangefor recent information. - Verify identity-sensitive facts at the exact primary source. For releases, versions, ownership, or similarly named projects, confirm the official repository or domain instead of trusting a generated answer or package-name match alone.
- Read from stdin:
echo "query" | tvly search - --json
See also
- tavily-extract — extract content from specific URLs
- tavily-research — comprehensive multi-source research