---
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

## Changes

- **2024-07-08** `7d63f2f75ebc` — 1 breaking, 1 info
  - the request property `vector` became required
  - added the new optional request property `fast_search`
- **2024-06-28** `e3f83adeda47` — 1 warning, 1 info
  - removed the request property `fast_search`
  - the request property `vector` became optional

[Change history](https://skmtc.dev/lancedb/apis/lancedb-cloud-api/changes/v1/table/:name/query/post.md)

---

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