BazaarLinkBazaarLink
เข้าสู่ระบบ
เอกสารAPI ข้อมูลอ้างอิงSDK ข้อมูลอ้างอิงการใช้งาน AgentAI ทักษะ
บัญชี

ดูงานวิจัย Tavily

ดึงงานวิจัยแบบอะซิงโครนัสด้วย request_id การตอบกลับ 202 หมายถึง pending หรือ in_progress ส่วน 200 จะส่งรายงาน completed พร้อม sources หรือสถานะ failed แนะนำให้ใช้ Bearer และมี api_key ใน body แบบไม่บังคับสำหรับไคลเอ็นต์ที่รองรับ แต่ไคลเอ็นต์ GET ควรใช้เฮดเดอร์เป็นหลัก ตั้ง include_usage=true เพื่อรวมการใช้ credits ของ research

GET/v1/research/:requestId

การอนุญาต

Authorizationจำเป็น
string · header

API key เป็น bearer token ใน header Authorization

พารามิเตอร์เส้นทาง

request_idจำเป็น
string

ตัวระบุงานวิจัยที่ไม่ซ้ำซึ่งส่งคืนเมื่อสร้างงาน

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

พารามิเตอร์คิวรี

include_usage
boolean

ระบุว่าจะรวมการใช้ credits ในการตอบกลับ completed หรือ failed หรือไม่ ค่าเริ่มต้นคือ 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
  }
}
Support
Support
Hi! How can we help you?
Send a message and we'll get back to you soon.