v2

latestOpenAPI 3.1.02026-08-0858116535.1 KB

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.

Example request

{
  "query": "What is the latest valuation of SpaceX?",
  "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
    }
  }
}