Context

Search context documents

Hybrid semantic + full-text search over the organization's active context documents, reranked for relevance. Returns the best passage from each matching document, with its slug, title, kind, and a relevance score. Use the slug to fetch the full markdown when a passage is insufficient.

get/api/v1/context/search

Request

  • Base URL
    https://app.khotan.com
  • URL
    https://app.khotan.com/api/v1/context/search
  • Auth
    • HTTP bearer
    • or API key in header x-api-key

Query parameters

qstring required

Natural-language search query. Retrieval is hybrid: semantic vector similarity over document passages combined with weighted full-text search, then reranked.

kinteger

Maximum number of snippets to return (1-50; default 10).

kind'instructions' | 'knowledge' | 'record'

"instructions" = procedures to follow (SOPs, runbooks); "knowledge" = reference material (specs, policies); "record" = accounts of events (meeting notes, transcripts, interviews).

Response

Ranked snippets, most relevant first.

Changes

No recorded changes to this operation across all 1 revision of this API.