---
title: "Search for nearest neighbors"
method: POST
path: "/api/v1/vector/search"
---

# Search for nearest neighbors

`POST /api/v1/vector/search`

Find the `k` nearest vectors to a given query vector. Optionally filter
results by metadata attributes using a filter expression.

The `nprobe` parameter controls how many posting lists are searched.
Higher values improve recall at the cost of latency.

The `includeFields` parameter controls which attributes are returned
for each result. When omitted, all attributes are returned.

Supports both binary protobuf (`application/protobuf`) and ProtoJSON
(`application/protobuf+json`) request bodies.

## Response `200`

Search results ranked by similarity.

## Other responses

- `400` — Invalid input (empty vector, k is 0, malformed filter).
- `500` — Internal server error.

---

[API](https://skmtc.dev/opendata-oss/apis/opendata-vector-api.md) · [All operations](https://skmtc.dev/opendata-oss/apis/opendata-vector-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/opendata-oss/opendata-vector-api/revisions/9bc355f4c4f6/schema)
