Response Format

Encoding

All responses returned from the API are encoded in JSON, unless otherwise noted.

Response Envelope

All responses are returned in a data envelope:

FieldTypeDescription
metaobjectRequest Metadata
dataanyResponse data. Can be any valid JSON value, as documented
errorarrayError Object, if an error occurred

Examples

Successful response object

From the Execute Search endpoint:

{
  "meta": {
    "id": "2a5b8993-d1bf-468b-9766-5afa50727bd4",
    "node": "us-east",
    "ms": 500
  },
  "data": [
    {
      "t": 0,
      "rank": 1,
      "url": "https://kagi.com",
      "title": "Kagi Search",
      "snippet": "Let's fetch!",
    },
    {
      "t": 0,
      "rank": 2,
      "url": "https://browser.kagi.com",
      "title": "Orion Browser by Kagi",
      "snippet": "Incredible performance. Total Protection.",
    }
  ]
}
Error response object

From the Execute Search endpoint:

{
  "meta": {
    "id": "bcbf11d2-1afa-4e72-a0ee-2d9079d1d332",
    "node": "us-east",
    "ms": 0
  },
  "data": null,
  "error": [
    {
      "code": 1,
      "msg": "Missing q parameter",
      "ref": null
    }
  ]
}