> ## Documentation Index
> Fetch the complete documentation index at: https://docs.moorcheh.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Search

> Search the store with a query vector.

## Overview

Search the local store using a numeric query vector. The query length must match the store **dimension**.

<ParamField body="query" type="array" required>
  JSON array of floats (same length as store dimension).
</ParamField>

<ParamField body="top_k" type="number" default="10">
  Maximum results to return. Capped at **100**.
</ParamField>

<ParamField body="threshold" type="number" default="0">
  Minimum score (0–1). Used when `kiosk_mode` is `true`.
</ParamField>

<ParamField body="kiosk_mode" type="boolean" default="false">
  When `true`, filters results below `threshold`.
</ParamField>

<RequestExample>
  ```bash theme={null}
  curl -X POST "http://localhost:8080/search" \
    -H "Content-Type: application/json" \
    -d '{
      "query": [0.01, -0.02, "... match store dimension ..."],
      "top_k": 5
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - OK theme={null}
  {
    "results": [
      {
        "id": "doc-1",
        "score": 0.894123,
        "label": "Close Match",
        "text": "Hello world"
      }
    ]
  }
  ```
</ResponseExample>

## Result fields

| Field   | Description                                   |
| ------- | --------------------------------------------- |
| `id`    | Matched item id                               |
| `score` | Similarity score (0–1), rounded to 6 decimals |
| `label` | Human-readable relevance label                |
| `text`  | Stored text, if any                           |

<Note>
  The CLI and Python SDK can embed plain-text queries locally before calling this endpoint. See [CLI: search](/cli/search) and [Python: search\_text()](/python-client/search).
</Note>

## Related

* [CLI: search](/cli/search)
* [Python: search()](/python-client/search)
