Loading...
Loading...
直接在终端中获取带引用的AI合成任意主题研究内容。支持用于流水线的结构化JSON输出。当你需要基于网络数据的全面研究但不想编写代码时使用。
npx skill4agent add tavily-ai/skills research~/.claude/settings.json{
"env": {
"TAVILY_API_KEY": "tvly-your-api-key-here"
}
}提示:研究过程可能需要30-120秒。按Ctrl+B可在后台运行。
./scripts/research.sh '<json>' [output_file]# Basic research
./scripts/research.sh '{"input": "quantum computing trends"}'
# With pro model for comprehensive analysis
./scripts/research.sh '{"input": "AI agents comparison", "model": "pro"}'
# Save to file
./scripts/research.sh '{"input": "market analysis for EVs", "model": "pro"}' ./ev-report.md
# With custom citation format
./scripts/research.sh '{"input": "climate change impacts", "model": "mini", "citation_format": "apa"}'
# With structured output schema
./scripts/research.sh '{"input": "fintech startups 2025", "model": "pro", "output_schema": {"properties": {"summary": {"type": "string"}, "companies": {"type": "array", "items": {"type": "string"}}}, "required": ["summary"]}}'curl --request POST \
--url https://api.tavily.com/research \
--header "Authorization: Bearer $TAVILY_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"input": "Latest developments in quantum computing",
"model": "mini",
"stream": false,
"citation_format": "numbered"
}'注意:为了管理令牌,流式传输已禁用。调用会等待研究完成后返回整洁的JSON。
curl --request POST \
--url https://api.tavily.com/research \
--header "Authorization: Bearer $TAVILY_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"input": "Electric vehicle market analysis",
"model": "pro",
"stream": false,
"citation_format": "numbered",
"output_schema": {
"properties": {
"market_overview": {
"type": "string",
"description": "2-3 sentence overview of the market"
},
"key_players": {
"type": "array",
"description": "Major companies in this market",
"items": {
"type": "object",
"properties": {
"name": {"type": "string", "description": "Company name"},
"market_share": {"type": "string", "description": "Approximate market share"}
},
"required": ["name"]
}
}
},
"required": ["market_overview", "key_players"]
}
}'POST https://api.tavily.com/research| 请求头 | 值 |
|---|---|
| |
| |
| 字段 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| 字符串 | 必填 | 研究主题或问题 |
| 字符串 | | 模型: |
| 布尔值 | | 为了管理令牌,流式传输已禁用 |
| 对象 | null | 用于结构化输出的JSON模式 |
| 字符串 | | 引用格式: |
stream: false{
"content": "# Research Results\n\n...",
"sources": [{"url": "https://...", "title": "Source Title"}],
"response_time": 45.2
}| 模型 | 使用场景 | 速度 |
|---|---|---|
| 单一主题、针对性研究 | ~30秒 |
| 全面多角度分析 | ~60-120秒 |
| API根据复杂度自动选择 | 视情况而定 |
typedescription{
"properties": {
"summary": {
"type": "string",
"description": "2-3 sentence executive summary"
},
"key_points": {
"type": "array",
"description": "Main takeaways",
"items": {"type": "string"}
}
},
"required": ["summary", "key_points"]
}curl --request POST \
--url https://api.tavily.com/research \
--header "Authorization: Bearer $TAVILY_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"input": "Fintech startup landscape 2025",
"model": "pro",
"stream": false,
"citation_format": "numbered",
"output_schema": {
"properties": {
"market_overview": {"type": "string", "description": "Executive summary of fintech market"},
"top_startups": {
"type": "array",
"description": "Notable fintech startups",
"items": {
"type": "object",
"properties": {
"name": {"type": "string", "description": "Startup name"},
"focus": {"type": "string", "description": "Primary business focus"},
"funding": {"type": "string", "description": "Total funding raised"}
},
"required": ["name", "focus"]
}
},
"trends": {"type": "array", "description": "Key market trends", "items": {"type": "string"}}
},
"required": ["market_overview", "top_startups"]
}
}'curl --request POST \
--url https://api.tavily.com/research \
--header "Authorization: Bearer $TAVILY_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"input": "LangGraph vs CrewAI for multi-agent systems",
"model": "pro",
"stream": false,
"citation_format": "mla"
}'curl --request POST \
--url https://api.tavily.com/research \
--header "Authorization: Bearer $TAVILY_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"input": "What is retrieval augmented generation?",
"model": "mini",
"stream": false
}'