Skip to main content
API reference sections

Schema

SearchRequest

The body of POST /v1/search.

A body rather than a query string. The access log records the path and its query, and the store's logs rotate daily for a week - GLOBAL_SEARCH.md is explicit that query text never enters a document, the index, settings, telemetry or the recent-query list, and a URL would put it in the middle of all of them.

Type object

Shape

FieldTypeDescription
textrequiredstring
entity_pickerboolean

Restrict results to document/file titles and live task nodes for an @ picker. This is a query shape over the existing projection, not a stored index.

Default false

workspacesarray of WorkspaceId

Empty means every workspace the index knows. The caller resolves a profile to this; the index has never heard of one.

Default []

excluded_workspacesarray of WorkspaceId

Default []

kindsarray of string

Kind::as_str() values, as documents store them.

Default []

tagsarray of string

Tag names, not TagIds - this is a text-search surface and a person types the word they read. A hit's node must carry every one of them, and a name here matches its own descendants too (fun matches fun/home), so this is node-scoped filtering rather than a term: nothing here is searched for, ranked, or spelled back in [SearchPage::corrected_query] ([ADR-207](../../../docs/decisions/ADR-201-225.md#adr-207-tagfilter--a-tag-in-a-query-is-a-node-scoped-filter-not-a-term-and-it-lives-in-candidates-alone)).

A surface may fill this directly; a person fills it by typing #tag into [Self::text], which the store lifts out before it searches.

Default []

attributesarray of AttrFilter

Typed attribute filters. A hit's node must satisfy every one.

One general filter rather than a field per attribute, because a workspace defines its own attributes and declares their types: a wire naming priority and due explicitly would need a new field for every attribute anybody invents, while key + kinds serves a custom one on the day it exists.

Default []

sortSearchSort

Default "relevance"

lifecycleLifecycleFilter2

Default "live"

page_sizeinteger (uint, >= 0)

Clamped by the store; see [MAX_PAGE_SIZE].

Default 50

offsetinteger (uint, >= 0)

Default 0

request_seqinteger (uint64, >= 0)

Copied to the response, so a surface typing quickly can drop an answer to a keystroke it has already moved past.

Default 0

include_facetsboolean

Also return the workspaces the index knows, for a scope picker.

Default false

recent_queriesinteger (uint, >= 0) or null

Also return this many recent queries. Absent means none.

Default null

Example
{
  "text": "string",
  "entity_picker": false,
  "workspaces": [],
  "excluded_workspaces": [],
  "kinds": [],
  "tags": [],
  "attributes": [],
  "sort": "relevance",
  "lifecycle": "live",
  "page_size": 50,
  "offset": 0,
  "request_seq": 0,
  "include_facets": false,
  "recent_queries": 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.