---
title: "Vector Query"
method: POST
path: "/v1/table/{name}/query/"
tags: ["Data"]
---

# Vector Query

`POST /v1/table/{name}/query/`

Vector Query

## Path parameters

- `name` string, required

## Request body

- object
  - `vector` unknown, required
  - `vector_column` string — The column to query, it can be inferred from the schema if there is only one vector column.
  - `prefilter` boolean — Whether to prefilter the data. Optional.
  - `k` integer — The number of search results to return. Default is 10.
  - `distance_type` string — The distance metric to use for search. l2, Cosine, Dot and Hamming are supported. Default is l2.
  - `bypass_vector_index` boolean — Whether to bypass vector index. Optional.
  - `filter` string — A filter expression that specifies the rows to query. Optional.
  - `columns` string[] — The columns to return. Optional.
  - `nprobe` integer — The number of probes to use for search. Optional.
  - `refine_factor` integer — The refine factor to use for search. Optional.
  - `fast_search` boolean — Whether to use fast search. Optional.

## Response `200`

top k results if query is successfully executed

- object
  - `results` object[]
    - `id` integer
    - `selected_col_1_to_return` unknown
    - `selected_col_n_to_return` unknown
    - `_distance` unknown

## Other responses

- `400` — Invalid request
- `401` — Unauthorized
- `404` — Not found

---

[API](https://skmtc.net/lancedb/apis/lancedb-cloud-api.md) · [All operations](https://skmtc.net/lancedb/apis/lancedb-cloud-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lancedb/lancedb-cloud-api/revisions/ba6a93e8b48d/schema)
