---
title: "Search a transcript"
method: POST
path: "/transcripts/{dir}/{id}/search"
tags: ["search"]
---

# Search a transcript

`POST /transcripts/{dir}/{id}/search`

## Request

- The document declares no server URL.
- Auth: none declared

Search a transcript using grep or LLM-based search.

Returns cached results if the same search was run before.

## Path parameters

- `dir` string, required: Transcripts directory (base64url-encoded)
- `id` string, required: Transcript ID

## Request body

- union
  - GrepSearchRequest: Request body for grep transcript searches.
    - `events` union
      - 'all'
      - union[]
        - union
          - 'model' | 'tool' | 'compaction' | 'branch' | 'approval' | 'sentinel' | 'sandbox' | 'info' | 'store' | 'logger' | 'error' | 'span_begin' | 'span_end'
          - string
    - `ignore_case` boolean, required
    - `messages` union
      - 'all'
      - string[]
    - `query` string, required
    - `regex` boolean, required
    - `type` 'grep', required
    - `word_boundary` boolean, required
  - LlmSearchRequest: Request body for LLM transcript searches.
    - `events` union
      - 'all'
      - union[]
        - union
          - 'model' | 'tool' | 'compaction' | 'branch' | 'approval' | 'sentinel' | 'sandbox' | 'info' | 'store' | 'logger' | 'error' | 'span_begin' | 'span_end'
          - string
    - `messages` union
      - 'all'
      - string[]
    - `model` string, nullable
    - `query` string, required
    - `type` 'llm', required

## Response `200`

Successful Response

- SearchResponse: Response from running a transcript search.
  - `id` string, required
  - `result` Result, required: Scan result.
    - `answer` string, nullable
    - `explanation` string, nullable
    - `label` string, nullable
    - `metadata` object, nullable
    - `references` Reference[], required
      - `cite` string, nullable
      - `id` string, required
      - `type` 'message' | 'event', required
    - `type` string, nullable
    - `uuid` string, nullable
    - `value` unknown, required

## Changes

- **2026-10-11** `19fb81eae5d5`: 2 info
  - added the new `sentinel` enum value to the request property `oneOf[subschema #1: GrepSearchRequest]/events/anyOf[subschema #2]/items/anyOf[subschema #1]/`
  - added the new `sentinel` enum value to the request property `oneOf[subschema #2: LlmSearchRequest]/events/anyOf[subschema #2]/items/anyOf[subschema #1]/`
- **2026-05-07** `b7ae0c8ffd19`: 2 breaking, 6 warning, 2 info
  - removed the required property `references` from the response with the `200` status
  - removed the required property `value` from the response with the `200` status
  - removed the optional property `answer` from the response with the `200` status
  - removed the optional property `explanation` from the response with the `200` status
  - …6 more
- **2026-04-28** `ab8930860e92`: 1 breaking, 10 info
  - the response's body type changed from no type to `object` for status `200`
  - removed response discriminator for the response status `200`
  - removed `#/components/schemas/GrepSavedSearch, #/components/schemas/LlmSavedSearch` from the response body `oneOf` list for the response status `200`
  - added the optional property `answer` to the response with the `200` status
  - …7 more
- **2026-04-21** `abeda3477bc8`: 1 info
  - endpoint added
- **2026-03-17** `d2a0b9f760ff`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/meridianlabs-ai/apis/inspect-scout-viewer-api/changes/transcripts/:dir/:id/search/post.md)

---

[API](https://skmtc.dev/meridianlabs-ai/apis/inspect-scout-viewer-api.md) - [All operations](https://skmtc.dev/meridianlabs-ai/apis/inspect-scout-viewer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/meridianlabs-ai/apis/inspect-scout-viewer-api/revisions/b799e9a81653?raw)
