---
title: "Search implementation traces"
method: GET
path: "/api/v1/traces/search"
tags: ["Implementation traces"]
---

# Search implementation traces

`GET /api/v1/traces/search`

## Request

- Base URL: `https://app.khotan.com`
- URL: `https://app.khotan.com/api/v1/traces/search`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

Hybrid semantic + full-text search over the organization's implementation traces, reranked for relevance. Returns the best passage from each matching conversation, with its thread id, title, project, tool, branch, actor, start day, and a relevance score. Requires the developer role.

## Query parameters

- `q` string, required: Natural-language search query. Retrieval is hybrid: semantic vector similarity over trace passages combined with full-text search, then reranked.
- `k` integer: Maximum number of results to return (1-50; default 10).

## Response `200`

Ranked passages, most relevant first.

- object
  - `results` object[], required
    - `threadId` string, required: The trace thread. Open it on the dashboard at /data/implementation/{threadId}.
    - `title` string, required: The thread's first request, cut to 200 characters.
    - `projectName` string, required
    - `tool` string, nullable, required: The coding tool: cursor, claude, codex, or devin.
    - `branch` string, nullable, required
    - `actor` string, nullable, required: Who ran the session: the member's email, else the device label.
    - `startedDay` string, nullable, required: The day the thread started, as YYYY-MM-DD.
    - `chunkIndex` integer, required: Position of the passage within the thread.
    - `content` string, required: The matching passage: user requests and assistant replies.
    - `score` number, required: Relevance score; higher is more relevant. The reranker's score from 0 to 1, or the Reciprocal Rank Fusion score when reranking is unavailable.

## Other responses

- `400`: The request was malformed or failed validation.
- `401`: Authentication is missing or invalid.
- `403`: The caller is not permitted to perform this action.
- `429`: Too many requests; retry after the indicated delay.

---

[API](https://skmtc.dev/khotan/apis/khotan-api.md) - [All operations](https://skmtc.dev/khotan/apis/khotan-api/llms.txt) - [OpenAPI document](https://skmtc.dev/khotan/apis/khotan-api/revisions/90b512a53e42?raw)
