Skip to main content
API reference sections

Schema

SearchResponse

What POST /v1/search answers.

One round trip, not three. A search surface wants the page, the scope picker's list and the recent queries on the same keystroke; the two extras are optional and off by default, so a caller that only wants hits pays for hits.

Type object

Shape

FieldTypeDescription
pagerequiredSearchPage
facetsSearchFacets or null
recent_queriesarray of RecentQuery or null
Example
{
  "page": {
    "hits": [
      {
        "workspace": "string",
        "workspace_name": "string",
        "document": "string",
        "node": "string",
        "document_kind": "",
        "mime": "string",
        "kind": "string",
        "field": "string",
        "title": "string",
        "breadcrumb": "string",
        "breadcrumb_spans": [
          {
            "start": 0,
            "end": 0
          }
        ],
        "snippet": "string",
        "spans": [
          {
            "start": 0,
            "end": 0
          }
        ],
        "lifecycle": "live",
        "trashed_at": 0,
        "trashed_by": "string",
        "score": 0,
        "observed_modified_at_ms": 0,
        "workspace_last_used_at_ms": 0
      }
    ],
    "next_offset": 0,
    "updating_workspaces": [
      "string"
    ],
    "request_seq": 0,
    "corrected_query": "string"
  },
  "facets": {
    "workspaces": [
      {
        "workspace": "string",
        "workspace_name": "string"
      }
    ]
  },
  "recent_queries": [
    {
      "text": "string",
      "used_at_ms": 0
    }
  ]
}

The contract has no example values, so example bodies are generated from each schema: every field is shown with a placeholder of its type.

Used by

Generated from contract version 1. Last updated .

Privacy choices

Choose which optional tools Koru may use on this site. Your choice is saved in a cookie in this browser for 12 months. Privacy policy

Privacy choices

Keep you signed in, protect forms and remember your language and this choice.

Always on

PostHog and Google Analytics 4 measure page views and actions such as downloads, using cookies or local storage.

PostHog records how pages are used, with form inputs masked and private pages excluded. Needs Analytics.

Ahrefs Web Analytics measures visits and where they come from, and Google Ads measures whether our ads led to a visit or download.