---
title: "Look up cited passages"
method: POST
path: "/api/v1/retrieve"
tags: ["retrieve"]
---

# Look up cited passages

`POST /api/v1/retrieve`

## Request

- Base URL: `https://koskamo.com`
- URL: `https://koskamo.com/api/v1/retrieve`
- Auth: one of:
  - none
  - HTTP bearer

Ranked passage retrieval over public datasets. No auth required; send a ksk_live_ bearer key to also search private datasets you own. Rate limit: 30 requests per minute per IP.

## Request body

- object
  - `query` string, required: The question or search string
  - `dataset` string: Optional dataset id or slug; defaults to all public datasets
  - `top_k` integer

## Response `200`

Candidate passages; inspect assessment and guidance before answering

- object
  - `query` string, required
  - `passages` object[], required
    - `text` string, required
    - `score` number, required: Ranking score within the retrieval engine; not a confidence probability
    - `datasetId` string, required
    - `datasetSlug` string, required
    - `datasetName` string, required
    - `datasetVersion` integer, required: Collection version at retrieval time; use documentVersion for an exact document citation
    - `documentId` string, required
    - `documentTitle` string, required
    - `documentVersion` integer, required: Document content version; increments when an approved revision replaces the document
    - `sourceUrl` string, required
    - `chunkId` string, required: Chunk uuid for database-backed datasets; dataset:document:ordinal for the bundled catalog
    - `ordinal` integer, required: Chunk position inside the source document
    - `version` integer, required: Alias of datasetVersion kept for existing citers
    - `createdAt` string, date-time, required: Document creation timestamp
  - `assessment` 'candidates' | 'no_matches', required: Candidate availability only; does not assess whether the question is answered
  - `guidance` string, required: Evidence checking and abstention instructions for the consuming agent

## Other responses

- `400`: Invalid JSON body or missing query
- `429`: Rate limited (30 requests per minute per IP); honors retryAfter

---

[API](https://skmtc.dev/koskamo/apis/koskamo-agent-api.md) · [All operations](https://skmtc.dev/koskamo/apis/koskamo-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/koskamo/apis/koskamo-agent-api/revisions/c7761a377e7b?raw)
