安全风险
NotebookLM CLI Cookies
通过命令行查询 NotebookLM 中已上传的文档内容。
下载 1,735
通过 Tavily API 实现高效网页搜索,获取带摘要的精准结果。
openclaw skills install @barneyjm/search-2命令、参数、文件名以原文为准
在网页上进行搜索并获取针对大语言模型(LLM)优化的相关结果。
需要 Tavily API 密钥 - 请访问 https://tavily.com 获取您的密钥
将密钥添加到 ~/.claude/settings.json 文件中:
{
"env": {
"TAVILY_API_KEY": "tvly-your-api-key-here"
}
}./scripts/search.sh '<json>'示例:
# 基础搜索
./scripts/search.sh '{"query": "python async patterns"}'
# 搭配选项使用
./scripts/search.sh '{"query": "React hooks tutorial", "max_results": 10}'
# 高级搜索并添加筛选条件
./scripts/search.sh '{"query": "AI news", "topic": "news", "time_range": "week", "max_results": 10}'
# 指定域名范围的搜索
./scripts/search.sh '{"query": "machine learning", "include_domains": ["arxiv.org", "github.com"], "search_depth": "advanced"}'curl --request POST \
--url https://api.tavily.com/search \
--header "Authorization: Bearer $TAVILY_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"query": "latest developments in quantum computing",
"max_results": 5
}'curl --request POST \
--url https://api.tavily.com/search \
--header "Authorization: Bearer $TAVILY_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"query": "machine learning best practices",
"max_results": 10,
"search_depth": "advanced",
"include_domains": ["arxiv.org", "github.com"],
"chunks_per_source": 3
}'POST https://api.tavily.com/search| 请求头 | 值 |
|---|---|
Authorization | Bearer <TAVILY_API_KEY> |
Content-Type | application/json |
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
query | string | 必填 | 搜索关键词(建议不超过 400 个字符) |
max_results | integer | 5 | 最多返回结果数量(0-20) |
search_depth | string | "basic" | 可选值:ultra-fast、fast、basic、advanced |
topic | string | "general" | 可选值:general、news、finance |
chunks_per_source | integer | 3 | 每个来源返回的文本块数量(仅适用于 advanced 或 fast 模式) |
time_range | string | null | 时间范围:day、week、month、year |
include_domains | array | [] | 限定包含的域名列表(最多 300 个) |
exclude_domains | array | [] | 排除的域名列表(最多 150 个) |
include_answer | boolean | false | 是否包含 AI 生成的答案 |
include_raw_content | boolean | false | 是否包含完整页面内容 |
include_images | boolean | false | 是否包含图片结果 |
{
"query": "latest developments in quantum computing",
"results": [
{
"title": "页面标题",
"url": "https://example.com/page",
"content": "提取的文本片段...",
"score": 0.85
}
],
"response_time": 1.2
}| 深度 | 延迟 | 相关性 | 内容类型 |
|---|---|---|---|
ultra-fast | 最低 | 较低 | NLP 摘要 |
fast | 低 | 良好 | 文本块 |
basic | 中等 | 高 | NLP 摘要 |
advanced | 较高 | 最高 | 文本块 |
各深度适用场景:
ultra-fast:实时对话、自动补全fast:需要文本块但对延迟敏感basic:通用用途,平衡性能与质量advanced:精度要求高(默认推荐)curl --request POST \
--url https://api.tavily.com/search \
--header "Authorization: Bearer $TAVILY_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"query": "AI news today",
"topic": "news",
"time_range": "day",
"max_results": 10
}'curl --request POST \
--url https://api.tavily.com/search \
--header "Authorization: Bearer $TAVILY_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"query": "Python async best practices",
"include_domains": ["docs.python.org", "realpython.com", "github.com"],
"search_depth": "advanced"
}'curl --request POST \
--url https://api.tavily.com/search \
--header "Authorization: Bearer $TAVILY_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"query": "React hooks tutorial",
"max_results": 3,
"include_raw_content": true
}'curl --request POST \
--url https://api.tavily.com/search \
--header "Authorization: Bearer $TAVILY_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"query": "AAPL earnings Q4 2024",
"topic": "finance",
"max_results": 10
}'include_domains** 来聚焦可信来源time_range** 获取最新信息score(0-1)筛选**,获取相关性最高的结果已收录 1 个 Skill