Answer

Performs a search based on the query and generates either a direct answer or a detailed summary with citations, depending on the query type.

post/answer

Request body

querystring required

Natural-language question or instructions for the request.

streamboolean

If true, the response is returned as a server-sent events (SSE) stream.

textboolean

If true, returns full page text with default settings. If false, disables text return.

model'exa' | 'exa-pro' | 'exa-research' | 'exa-fast'

The model used to generate the answer.

systemPromptstring

Additional instructions that guide generated output or agent behavior. Use this for source preferences, novelty constraints, duplication constraints, or other behavior guidance.

userLocationstring nullable

The two-letter ISO country code of the user, e.g. US.

Example request

{
  "query": "What is the latest valuation of SpaceX?",
  "systemPrompt": "Prefer official sources and avoid duplicate results.",
  "userLocation": "US",
  "outputSchema": {
    "type": "object"
  }
}

Response

OK

requestIdstring

Unique identifier for the request.

Example response

{
  "requestId": "b5947044c4b78efa9552a7c89b306d95",
  "citations": [
    {
      "title": "SpaceX valued at $350bn as company agrees to buy shares from ...",
      "url": "https://www.theguardian.com/science/2024/dec/11/spacex-valued-at-350bn-as-company-agrees-to-buy-shares-from-employees",
      "publishedDate": "2023-11-16T01:36:32.547Z",
      "author": "Humza Naveed",
      "id": "https://arxiv.org/abs/2307.06435",
      "image": "https://arxiv.org/pdf/2307.06435.pdf/page_1.png",
      "favicon": "https://arxiv.org/favicon.ico",
      "text": "SpaceX valued at $350bn as company agrees to buy shares from ..."
    }
  ],
  "costDollars": {
    "total": 0.007,
    "search": {
      "neural": 0.007,
      "keyword": 0.0025
    },
    "summary": 0.005,
    "contents": {
      "text": 0.001,
      "highlights": 0.001,
      "summary": 0.001
    }
  }
}

Changes