用途:tavily-2 是一个基于 Tavily Search API 的 AI 优化网页搜索技能,面向大语言模型和 AI 应用,用于综合网络调研、时事查询、领域定向搜索等场景。
主要能力:可生成 AI 答案摘要;返回为 LLM 优化的结构化结果(标题、URL、内容、相关度评分);支持 basic 快速模式与 advanced 综合模式;支持 topic 选择 general 或 news(news 覆盖最近 7 天新闻源);支持 include-domains/exclude-domains 域名过滤;支持图片搜索与原始 HTML 内容提取;可输出 JSON 便于解析。
使用方式:需 Python 3.6+ 并安装 pip install tavily-python,配置 Tavily API 密钥(形如 tvly- 开头),可通过 Clawdbot 配置或在环境变量中设置 TAVILY_API_KEY。常用命令示例:scripts/tavily_search.py "What is quantum computing?";scripts/tavily_search.py "Python best practices" --max-results 10;scripts/tavily_search.py "Climate change solutions" --depth advanced;scripts/tavily_search.py "AI developments 2026" --topic news;scripts/tavily_search.py "Python tutorials" --include-domains python.org docs.python.org realpython.com;scripts/tavily_search.py "Eiffel Tower architecture" --images;scripts/tavily_search.py "Python async/await" --raw-content --max-results 5;scripts/tavily_search.py "Python tutorials" --json > results.json。若脚本无法运行,可执行 chmod +x scripts/tavily_search.py。
适用场景:研究与事实查找、时事与最新进展、学术或官方文档等定向来源检索、视觉参考收集、需要原始 HTML 的深度分析,以及与其他命令行工具串联使用。
限制:使用需有效 API 密钥并消耗额度,advanced 模式与原始内容提取可能更慢、更耗额度;官方资料未提供具体收费与价格细节,暂未提供;需注意速率限制与凭据配置。