---
title: "Search the knowledge base for relevant snippets of text. The search can include filters to use only a subset of the knowledge base."
method: POST
path: "/search"
tags: ["Microsoft.KernelMemory.ServiceAssembly"]
---

# Search the knowledge base for relevant snippets of text. The search can include filters to use only a subset of the knowledge base.

`POST /search`

Search the knowledge base for relevant snippets of text.

## Request body

- SearchQuery
  - `index` string, nullable
  - `query` string, nullable
  - `filters` object[], nullable
  - `minRelevance` number, double
  - `limit` integer
  - `args` object, nullable

## Response `200`

OK

- SearchResult
  - `query` string, nullable
  - `noResult` boolean
  - `results` Citation[], nullable
    - `link` string, nullable
    - `index` string, nullable
    - `documentId` string, nullable
    - `fileId` string, nullable
    - `sourceContentType` string, nullable
    - `sourceName` string, nullable
    - `sourceUrl` string, nullable
    - `partitions` Partition[], nullable
      - `text` string, nullable
      - `relevance` number, float
      - `partitionNumber` integer
      - `sectionNumber` integer
      - `lastUpdate` string, date-time
      - `tags` object, nullable

## Other responses

- `401` — Unauthorized
- `403` — Forbidden

## Changes

> 5 revisions in range; 1 could not be searched.

- **2024-12-17** `f1234181a074` — 1 info
  - api operation id `SearchDocumentSnippets` was added
- **2024-10-19** `10e0db8acfa5` — 1 info
  - api operation id `SearchDocumentSnippets` removed and replaced with ``

[Change history](https://skmtc.dev/azure/apis/microsoft-kernelmemory-serviceassembly/changes/search/post.md)

---

[API](https://skmtc.dev/azure/apis/microsoft-kernelmemory-serviceassembly.md) · [All operations](https://skmtc.dev/azure/apis/microsoft-kernelmemory-serviceassembly/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/microsoft-kernelmemory-serviceassembly/revisions/0c988a89a508/schema)
