querystring必填
The question to answer.
https://api.sandbase.ai/v1/api/exa/answerReturns direct answers and cited web sources for a given query. Supports custom retrieval modes, optional full page text, and structured schema definitions.
{
"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。
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.
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.
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.
| Name | Type | Required | Description |
|---|---|---|---|
query | string | Yes | The question to answer. |
outputSchema | object | No | JSON Schema for a structured answer output. |
text | boolean | No | Include the full page text of each citation. |
type | string | No | Retrieval mode used to gather sources before answering. |
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"
}
| Field | Meaning |
|---|---|
answer | The answer text, or an object when outputSchema is set. |
citations[] | Sources: title, url, publishedDate, author, and text when requested. |
text: true to include each citation's page text, for example to verify the answer.$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.
開始建置
具備統一驗證與用量追蹤的平台 API 端點。
curl -X POST "https://api.sandbase.ai/v1/api/exa/answer" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "Which manufacturers had the top three global EV sales in 2025?"
}'請將您的 SandBase API 金鑰設定在伺服器環境中。請求使用 Bearer 驗證。
export SANDBASE_API_KEY="YOUR_API_KEY"請將金鑰保留在伺服器端,不要在瀏覽器程式碼中公開。
querystring必填The question to answer.
typestringRetrieval mode used to gather sources before answering.
可能值:auto, fast, instant, deep-lite, deep, deep-reasoning
textbooleanInclude the full page text of each citation.
outputSchemaobjectJSON Schema for a structured answer output.
這是此 API 的已儲存範例回應;檢視時不會發出即時請求。
{
"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"
}探索更多
| 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
問題
使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/exa/answer。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。
每次 $0.0075,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。
必要:query (string)。 選填:type(auto, fast, instant, deep-lite, deep, deep-reasoning 之一), text (boolean) 和 outputSchema (object)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。
在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。
不需要。Exa Question Answering 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 Exa API 存取權。
不能。引用只是在回答中使用的網頁來源標示;它不是事實正確性的證書。請打開來源、檢查日期與上下文,並確認它是否支持該具體主張。現行 README 將 answer 與 citations 描述為回應欄位,但其精簡範例不保證每次執行都會有每個來源或欄位。
目前 SandBase Answer 參考文件列出 query、type、text 與 outputSchema,沒有列出 includeDomains 或 Search 的 contents 參數。這兩個端點是分開請求,因此先前的 Search 不會自動限制這個 Answer。需要引用頁面文字時,請使用 text: true 來請求,並確認它實際回傳的來源。