Tavily AI 搜索 API 与 OpenClaw 集成,提供 AI 驱动的摘要网络搜索功能,针对检索增强生成(RAG)和问答进行优化。使用...
Tavily Search is a specialized AI search API designed for LLMs and RAG applications. It provides:
Before using, you need to configure your Tavily API key:
export TAVILY_API_KEY=your_api_key_heretools.tavily.apiKeytavily_search)#Search the web with optional depth control and topic filtering.
Parameters:
query (required): Search query stringmax_results (optional, default 5): Number of results (1-10)search_depth (optional): basic or deep (default basic)topic (optional): general or news (default general)days (optional): Time range in days back from current datetavily_search_date_range)#Search with specific start and end dates.
Parameters:
query (required): Search query stringstart_date (required): YYYY-MM-DDend_date (required): YYYY-MM-DDmax_results (optional, default 5)search_depth (optional): basic or deeptavily_answer)#Get a direct AI answer to your question with citations.
Parameters:
query (required): Question to answermax_results (optional, default 5)search_depth (optional): basic or deeptavily_extract)#Extract clean, readable content from one or more URLs.
Parameters:
urls (required): Array of URLs to extractpython
# Search for recent news about OpenClaw
python scripts/tavily_search.py "openclaw github" --days 1 --max_results 5
All search commands return JSON with:
results: Array of search results with title, content, url, scoreanswer: AI-generated answer (for answer mode)response_time: Query response timeScriptPurposetavily_cli.pyMain CLI interface for all Tavily search operationstavily_api.pyPython API client module
FilePurposeapi_docs.mdTavily API documentation reference