BazaarLinkBazaarLink
登入
文件API 参考SDK 参考Agent 应用AI Skills
账户

获取 Tavily 研究任务

通过 request_id 查询异步研究任务。202 表示 pending 或 in_progress;200 返回带 sources 的 completed 报告或 failed 状态。优先使用 Bearer 认证;支持的客户端可使用可选 body api_key,但 GET 客户端通常应使用请求头。设置 include_usage=true 可返回研究 credits 使用量。

GET/v1/research/:requestId

验证

Authorization必填
string · header

在 Authorization 标头以 Bearer token 传入 API 密钥。

路径参数

request_id必填
string

创建研究任务时返回的唯一任务标识符。

Example: 123e4567-e89b-12d3-a456-426614174111

查询参数

include_usage
boolean

是否在完成或失败响应中包含 credits 使用量;默认为 false。

Example: true
GET /v1/research/:requestId
curl "https://api.bazaarlink.ai/v1/research/$REQUEST_ID?include_usage=true" \
  -H "Authorization: Bearer $BAZAARLINK_API_KEY"
响应示例

任务已完成或失败。completed 响应包含 request_id、created_at、content(文本或符合 output_schema 的对象)、sources 和 response_time;failed 响应包含 request_id、status、response_time,并可包含 usage。

{
  "request_id": "123e4567-e89b-12d3-a456-426614174111",
  "created_at": "2025-01-15T10:30:00Z",
  "status": "completed",
  "content": "Research Report: Latest Developments in AI",
  "sources": [
    {
      "title": "Latest AI Developments",
      "url": "https://example.com/ai-news",
      "favicon": "https://example.com/favicon.ico"
    }
  ],
  "response_time": 1.23,
  "usage": {
    "credits": 16
  }
}
客服
客服
您好!有什么可以协助?
请留下消息,我们会尽快回复。