用途:该技能提供基于 curl 的 Tavily REST API 接口,用于网页搜索、内容提取、站点映射、爬取以及可选的深度研究,返回带 URL、标题、摘要、来源与引用的结构化结果,适合 LLM 工作流和多步调查。
主要能力:search(POST /search)支持网页搜索、可选答案与内容提取,参数含 query、search_depth(basic/advanced/fast/ultra-fast)、max_results、topic、time_range、include_answer、include_raw_content、include_images、include_domains/exclude_domains 等;extract(POST /extract)从指定 URL 提取内容,支持 query 重排、chunks_per_source、extract_depth、format;map(POST /map)仅做 URL 发现生成站点地图;crawl(POST /crawl)遍历站点并内置提取;research(POST /research 与 GET /research/{request_id})用于多步分析与引用,支持 stream 为 true 时以 SSE 流式返回。
使用方式:需在环境中设置 TAVILY_API_KEY,缺失时应提示用户提供。Base URL 为 https://api.tavily.com,认证头为 Authorization: Bearer $TAVILY_API_KEY,Content-Type: application/json,可选 X-Project-ID。示例:curl -sS -X POST "https://api.tavily.com/search" -H "Content-Type: application/json" -H "Authorization: Bearer $TAVILY_API_KEY" -d '{"query":"<query>","search_depth":"basic","max_results":5,"include_answer":true}'。
适用场景:需要实时网页信息、站点提取、映射或爬取,且无内置工具可用,或需要 Tavily 面向 LLM 的摘要、分块、来源与引用输出时。
限制:需有效 API key;401/403 应检查密钥;超时可降低 max_depth/limit 或改用 basic;响应过大可减少 max_results 或 chunks_per_source。instructions 等参数会增加成本。具体收费与价格资料暂未提供。