POST
/
v1
/
table
/
{name}
/
query
curl --request POST \
  --url https://{db}.{region}.api.lancedb.com/v1/table/{name}/query/ \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "vector": [
    0.1,
    0.2,
    0.3
  ],
  "full_text_query": {
    "columns": [
      "name",
      "description"
    ],
    "query": "sneakers"
  },
  "vector_column": "vector",
  "prefilter": true,
  "k": 10,
  "offset": 123,
  "distance_type": "L2",
  "bypass_vector_index": false,
  "filter": "category = '\''shoes'\''",
  "columns": [
    "name",
    "price"
  ],
  "nprobes": 1,
  "refine_factor": null
}'
This response does not have an example.

Authorizations

x-api-key
string
header
required

Path Parameters

name
string
required

name of the table

Body

application/json
vector
number[]

The targeted vector to search for.

full_text_query
object

The full text query to search for.

vector_column
string

The column to query, it can be inferred from the schema if there is only one vector column.

prefilter
boolean
default:
true

Whether to apply the filter before search.

k
integer
default:
10

The number of search results to return.

offset
integer

The number of search results to skip.

distance_type
enum<string>

distance metric to use for search

Available options:
L2,
Cosine,
Dot
bypass_vector_index
boolean
default:
false

Whether to bypass vector index.

filter
string

A SQL filter expression that specifies the rows to query.

columns
string[]

The columns to return. Defaults to all columns in the table.

nprobes
integer
default:
1

The number of partitions to search. Higher values yield better search results but are slower.

refine_factor
integer | null

The refine step re-ranks refine_factor * k results based on exact vectors. Null (the default) skips this step for faster queries.

Response

200
application/vnd.apache.arrow.file
top k results if query is successfully executed

The response is of type file.