---
title: "Cross-module search"
method: POST
path: "/search"
tags: ["Search"]
---

# Cross-module search

`POST /search`

## Request

- Base URL: `https://api.getcoherence.io/v1`
- URL: `https://api.getcoherence.io/v1/search`
- Auth: HTTP bearer

Semantic + keyword search across indexed workspace content. Results are filtered to modules the key's role can view. Degrades to { results: [], total: 0, fallback: true } if the index is unavailable. Requires the `records:read` scope.

## Request body

- object
  - `query` string, required
  - `types` string[]: Restrict to source types, e.g. module_record, collab_doc
  - `limit` integer
  - `minSimilarity` number

## Response `200`

Search results

- object
  - `results` object[]
    - `sourceType` string
    - `sourceId` string
    - `title` string
    - `snippet` string, nullable
    - `metadata` object
    - `score` number
    - `link` string
  - `total` integer
  - `fallback` boolean

## Other responses

- `400`: The request body failed validation.
- `401`: Authentication failed or missing.

---

[API](https://skmtc.dev/getcoherence/apis/coherence-api.md) · [All operations](https://skmtc.dev/getcoherence/apis/coherence-api/llms.txt) · [OpenAPI document](https://skmtc.dev/getcoherence/apis/coherence-api/revisions/622d56f657b1?raw)
