Sand AISand AI MAGI-2MAGI-2 hiện đã có trên SandBase: video 1080p với âm thanh gốcDùng thử ngay

Exa Question Answering

Tài liệu API
https://api.sandbase.ai/v1/api/exa/answer

Returns direct answers and cited web sources for a given query. Supports custom retrieval modes, optional full page text, and structured schema definitions.

Giá
$0.0075USD / lượt gọi
Phương thức
POST
Phản hồi
JSON
Tham số
1 bắt buộc · 3 tùy chọn

Phòng thử nghiệm

Đầu vào
The question to answer.
Retrieval mode used to gather sources before answering.
Include the full page text of each citation.
JSON Schema for a structured answer output.
Đầu raVí dụ
Phản hồioutputs · 2.2 KB · 34 dòng
{
  "answer": "In 2025, the top three global electric vehicle manufacturers by sales were BYD, Geely, and Tesla [1]. While specific reporting metrics vary between total new energy vehicles and battery-only electric vehicles, BYD led the global market [2][1][3]. Data indicates BYD secured the top position, followed by Geely in second and Tesla in third, based on total sales volume rankings for the year [1].",
  "citations": [
    {
      "favicon": "https://taitonmai.co.jp/favicon.ico?603d046c9a6fdfbb",
      "id": "https://taitonmai.co.jp/en/column/global-ev-sales-ranking-2025",
      "image": "https://taitonmai.co.jp/images/column/covers/global-ev-sales-ranking-2025.jpg",
      "publishedDate": "2026-04-08T13:20:48.000Z",
      "title": "Global EV Sales Ranking 2025 — Country, Manufacturer, and Model Data Compiled | Taitonmai",
      "url": "https://taitonmai.co.jp/en/column/global-ev-sales-ranking-2025"
    },
    {
      "favicon": "https://cdn.statcdn.com/static/favicon.svg",
      "id": "https://www.statista.com/statistics/541390/global-sales-of-plug-in-electric-vehicle-manufacturers/",
      "image": "https://cdn.statcdn.com/Statistic/540000/541390-blank-355.png",
      "title": "Global EV market share by manufacturer 2025| Statista",
      "url": "https://www.statista.com/statistics/541390/global-sales-of-plug-in-electric-vehicle-manufacturers/"
    },
    {
      "author": "Fred Lambert",
      "favicon": "https://electrek.co/wp-content/uploads/sites/3/2017/03/electrek.png?w=32",
      "id": "https://electrek.co/2026/01/02/byd-crushes-tesla-all-electric-sales-for-2025-secures-global-bev-crown/",
      "image": "https://secure.gravatar.com/avatar/86a7024c9fb5ccc0b3e36a5f98768c0d73b4c154f71a3386f139b087292a081f?s=30&d=identicon&r=g",
      "publishedDate": "2026-01-02T19:36:13.000Z",
      "title": "BYD officially crushes Tesla in all-electric sales for 2025, secures global BEV crown | Electrek",
      "url": "https://electrek.co/2026/01/02/byd-crushes-tesla-all-electric-sales-for-2025-secures-global-bev-crown/"
    },
    "… 5 more items in the full response"
  ],
  "costDollars": {
    "total": 0.005
  },
  "requestId": "ad3fc3052c9b828fae5b165f8430fe0d"
}

Ví dụ

Chọn một ví dụ để nạp đầu vào và kết quả của nó vào playground.

README API

Exa Question Answering API

Ask a question and get a short answer grounded in live web search, with the sources Exa used as citations (title, URL, publish date). Optionally return a structured answer that follows your JSON Schema.

Use cases

  • Answer factual questions in an agent with cited sources.
  • Extract structured facts with outputSchema.

Follow the Python guide to Exa searches and cited answers to keep request parameters separate. If you need domain-restricted source discovery rather than an independently generated answer, open the Exa Search request reference.

Request

curl -X POST "https://api.sandbase.ai/v1/api/exa/answer" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "OpenAI"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
querystringYesThe question to answer.
outputSchemaobjectNoJSON Schema for a structured answer output.
textbooleanNoInclude the full page text of each citation.
typestringNoRetrieval mode used to gather sources before answering.

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "answer": "OpenAI is an American artificial intelligence public benefit corporation based i…",
  "citations": [
    {
      "author": "Unauthorized hacks",
      "id": "https://en.wikipedia.org/wiki/OpenAI",
      "publishedDate": "2026-10-27T00:00:00.000Z",
      "title": "OpenAI",
      "url": "https://en.wikipedia.org/wiki/OpenAI"
    }
  ],
  "requestId": "f07f69f06d8753ed462b91b73130a835"
}

Response fields

FieldMeaning
answerThe answer text, or an object when outputSchema is set.
citations[]Sources: title, url, publishedDate, author, and text when requested.

Notes

  • Set text: true to include each citation's page text, for example to verify the answer.

Pricing

$0.0075 per successful call. Failed calls, including lookups whose target does not exist, are not charged. It is included in the daily free quota of each organization.

Khám phá thêm

APIs liên quan

Tất cả APIs
APIGiáPhản hồi
Exa$0.0075 mỗi lần gọiJSON
Exa$0.0045 mỗi lần gọiJSON
Exa$0.0105 mỗi lần gọiJSON

Hướng dẫn:Exa alternatives: compare Tavily and Firecrawl searchExa vs Tavily vs Firecrawl for AI agents

Câu hỏi

FAQ

Làm thế nào để dùng API Exa Question Answering?

Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/exa/answer với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.

API Exa Question Answering có giá bao nhiêu?

$0.0075 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.

API Exa Question Answering chấp nhận những tham số nào?

Bắt buộc: query (string). Tùy chọn: type (một trong số auto, fast, instant, deep-lite, deep, deep-reasoning), text (boolean) và outputSchema (object). Bảng Parameters và Playground trên trang này liệt kê mọi trường.

API Exa Question Answering trả về gì?

Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.

Tôi có cần tài khoản nhà phát triển hoặc API key của Exa không?

Không. Exa Question Answering chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của Exa.

Trích dẫn trong Exa Answer có chứng minh câu trả lời là đúng về mặt तथ्य không?

Không. Một trích dẫn xác định nguồn web được dùng cho câu trả lời; nó không phải là chứng chỉ độ chính xác thực tế. Hãy mở nguồn, kiểm tra ngày và ngữ cảnh của nó, rồi xác nhận rằng nó hỗ trợ cho khẳng định cụ thể. README hiện tại mô tả answer và citations là các trường phản hồi, nhưng ví dụ rút gọn của nó không đảm bảo mọi nguồn hoặc trường đều có mặt ở mọi lần chạy.

Tôi có thể truyền các bộ lọc domain của Search vào yêu cầu Answer này không?

Tham chiếu Answer hiện tại của SandBase liệt kê query, type, text và outputSchema. Nó không liệt kê includeDomains hay tham số contents của Search. Hai endpoint tạo các yêu cầu riêng biệt, nên một Search trước đó không tự động ràng buộc Answer này. Dùng text: true để yêu cầu văn bản trang cho trích dẫn khi cần, và xác minh các nguồn mà nó thực sự trả về.