---
title: "k-nearest-neighbour search over a vector index"
method: POST
path: "/api/vector-search"
---

# k-nearest-neighbour search over a vector index

`POST /api/vector-search`

Supply either `query_vector` or `query_text`; supplying text requires an embedding provider to be configured.

## Request body

- object
  - `query_text` string
  - `query_vector` number[]
  - `label` string
  - `property_key` string
  - `k` integer — Number of neighbours to return.

## Response `200`

The nearest neighbours, closest first

- object

## Changes

- **2026-08-18** `9b1635d24ee5` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/samyama-ai/apis/samyama-graph-database-api/changes/api/vector-search/post.md)

---

[API](https://skmtc.dev/samyama-ai/apis/samyama-graph-database-api.md) · [All operations](https://skmtc.dev/samyama-ai/apis/samyama-graph-database-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/samyama-ai/samyama-graph-database-api/revisions/7f3d37bbc2cd/schema)
