Sand AISand AI MAGI-2MAGI-2 现已上线 SandBase:支持原生音频的 1080p 视频立即试用

Exa Question Answering

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.

价格
$0.0075美元 / 次调用
方法
POST
响应
JSON
参数
1 个必填 · 3 个可选

Playground

输入
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.
输出示例
响应outputs · 2.2 KB · 34 行
{
  "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"
}

示例

选择一个示例,将其输入和结果加载到 playground 中。

API README

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.

探索更多

相关 APIs

全部 APIs
API价格响应
Exa$0.0075 每次调用JSON
Exa$0.0045 每次调用JSON
Exa$0.0105 每次调用JSON

指南:Exa alternatives: compare Tavily and Firecrawl searchExa vs Tavily vs Firecrawl for AI agents

问题

常见问题

如何使用 Exa Question Answering API?

向 https://api.sandbase.ai/v1/api/exa/answer 发送 POST 请求,在 Authorization 请求头中使用您的 SandBase API key(Bearer),并将参数作为 JSON 请求体传入。您也可以直接在本页的 Playground 中试用,无需编写代码。

Exa Question Answering API 的价格是多少?

每次调用 $0.0075,从您的 SandBase 余额中扣费。您只需为实际调用付费;无需订阅。

Exa Question Answering API 接受哪些参数?

必填:query (string)。 可选:type(auto, fast, instant, deep-lite, deep, deep-reasoning 之一), text (boolean) 和 outputSchema (object)。 Parameters 表和本页的 Playground 列出了每个字段。

Exa Question Answering API 返回什么?

在同一个 HTTP 请求中返回的 JSON 响应(同步)。 本页的 README 包含一个示例响应。

我需要 Exa 开发者账户或 API key 吗?

不需要。Exa Question Answering 通过 SandBase 运行,因此一个 SandBase API key 即可覆盖此端点以及目录中的其他所有 API 和模型。您无需单独申请 Exa API 访问权限。

Exa Answer 的引文能证明答案在事实上是正确的吗?

不能。引文只是标识用于回答的网页来源;它不是事实正确性证明。请打开来源,检查其日期和上下文,并确认它支持具体说法。当前 README 将 answer 和 citations 描述为响应字段,但其精简示例并不保证每次运行都包含所有来源或字段。

我可以把 Search 的域名筛选条件传给这个 Answer 请求吗?

当前 SandBase Answer 参考文档列出了 query、type、text 和 outputSchema。它没有列出 includeDomains 或 Search 的 contents 参数。两个端点是分别请求的,因此之前的 Search 不会自动限制这个 Answer。需要引用页面文本时可用 text: true 请求,并核对它实际返回的来源。