Tavily Researcher 通过 Tavily 的 LLM 优化 API 实现网页研究,涵盖搜索、提取、站点地图和综合研究四类功能。
用途
该工具面向需要自动化网页调研的场景,帮助用户快速获取搜索结果、抓取指定页面内容、了解网站结构,或生成带引用的 AI 研究报告。
主要能力
工具提供四个脚本,按需求选择:
- tavily_search.sh:标准网页搜索,返回标题、URL、摘要,可选 AI 生成答案。
- tavily_extract.sh:从指定 URL 提取完整内容,单次最多 20 个 URL。
- tavily_sitemap.sh:发现网站上的 URL,不提取内容,比爬取更快,适合先了解站点结构。
- tavily_research.sh:生成带引用的 AI 综合研究报告,耗时约 30-120 秒。
使用方式
需设置 TAVILY_API_KEY 环境变量,可在 https://app.tavily.com 获取免费密钥(每月 1000 积分)。
快速开始示例:
- 搜索:scripts/tavily_search.sh "What is retrieval augmented generation?" --include-answer
- 新闻搜索:scripts/tavily_search.sh "AI regulation updates" --topic news --time-range week
- 提取内容:scripts/tavily_extract.sh https://example.com/article1 https://example.com/article2
- 发现站点 URL:scripts/tavily_sitemap.sh https://docs.example.com --max-depth 2 --limit 100
- AI 研究报告:scripts/tavily_research.sh "Compare LangGraph vs CrewAI for multi-agent systems" --model pro
各脚本关键选项:
- tavily_search.sh:--depth ultra-fast|fast|basic|advanced(速度与相关性权衡);--topic general|news|finance;--include-answer(AI 摘要);--include-raw-content(完整页面内容);--time-range day|week|month|year;--chunks-per-source N(每源分块数 1-5,advanced/fast);--include-domains / --exclude-domains(来源过滤)。
- tavily_extract.sh:--depth basic|advanced(JS 密集页面用 advanced);--query TEXT(按相关性重排分块);--chunks-per-source N(仅返回相关分块 1-5,需配合 --query);--format markdown|text。
- tavily_sitemap.sh:--max-depth N(爬取深度 1-5,建议从 1 开始);--limit N(URL 总数上限,默认 50);--instructions TEXT(聚焦特定类型页面)。
- tavily_research.sh:--model mini|pro|auto(mini 用于聚焦查询,pro 用于综合分析);--citation-format numbered|mla|apa|chicago;--output-schema JSON(结构化 JSON 输出);--output-file PATH(保存结果到文件)。
域名限定搜索示例:
- 仅搜索特定站点:scripts/tavily_search.sh "async python" --include-domains docs.python.org,realpython.com
- 排除不可靠来源:scripts/tavily_search.sh "health advice" --exclude-domains reddit.com,quora.com
适用场景
适合需要快速事实核查、深度搜索、抓取文章全文、了解网站结构或生成带引用研究报告的自动化流程。
限制
使用需 TAVILY_API_KEY;免费额度为每月 1000 积分。tavily_research.sh 耗时约 30-120 秒。积分消耗因任务而异:快速事实核查(--include-answer)约 1 积分,深度搜索(--depth advanced)约 2 积分,提取全文每 5 个 URL 约 1 积分,站点地图约 1 积分,AI 研究报告积分不定。完整参数文档见 references/api_reference.md。