For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
CloudGitHub
  • API Reference
      • POSTSearch points
      • POSTSearch batch points
      • POSTSearch point groups
      • POSTRecommend points
      • POSTRecommend batch points
      • POSTRecommend point groups
      • POSTDiscover points
      • POSTDiscover batch points
      • POSTQuery points
      • POSTQuery points in batch
      • POSTQuery point groups
      • POSTDistance matrix pairs
      • POSTDistance matrix offsets
LogoLogo
CloudGitHub
API ReferenceSearch

Search points

Deprecated
POST
/collections/:collection_name/points/search
POST
/collections/:collection_name/points/search
$curl -X POST \
> 'http://localhost:6333/collections/collection_name/points/search' \
> --header 'api-key: <api-key-value>' \
> --header 'Content-Type: application/json' \
> --data-raw '{
> "vector": [
> 0.2,
> 0.1,
> 0.9,
> 0.7
> ],
> "limit": 1,
> "filter": {
> "must": [
> {
> "key": "city",
> "match": {
> "value": "London"
> }
> }
> ]
> }
>}'
200Successful
1{
2 "usage": {
3 "cpu": 1,
4 "payload_io_read": 1,
5 "payload_io_write": 1,
6 "payload_index_io_read": 1,
7 "payload_index_io_write": 1,
8 "vector_io_read": 1,
9 "vector_io_write": 1
10 },
11 "time": 0.002,
12 "status": "ok",
13 "result": [
14 {
15 "id": 42,
16 "version": 3,
17 "score": 0.75,
18 "payload": {},
19 "vector": {},
20 "shard_key": "region_1",
21 "order_value": 42
22 }
23 ]
24}
Retrieves the closest points based on vector similarity and given filtering conditions.
Was this page helpful?
Previous

Search batch points

Next
Built with

Authentication

api-keystring
API Key authentication via header

Path parameters

collection_namestringRequired
Name of the collection to search in

Query parameters

consistencyinteger or enumOptional
Define read consistency guarantees for the operation
timeoutintegerOptional>=1
If set, overrides global timeout for this request. Unit is seconds.

Request

Search request with optional filtering
vectorlist of doubles or objectRequired

Vector data separator for named and unnamed modes Unnamed mode:

{ “vector”: [1.0, 2.0, 3.0] }

or named mode:

{ “vector”: { “vector”: [1.0, 2.0, 3.0], “name”: “image-embeddings” } }

limitintegerRequired>=1
Max number of result to return
shard_keystring or uint64 or list of strings or uint64s or anyOptional

Specify in which shards to look for the points, if not specified - look in all shards

filterobject or anyOptional
Look only for points which satisfies this conditions
paramsobject or anyOptional
Additional search params
offsetinteger or nullOptional>=0

Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.

with_payloadboolean or list of strings or object or anyOptional
Select which payload to return with the response. Default is false.
with_vectorboolean or list of strings or anyOptional
Options for specifying which vectors to include into response. Default is false.
score_thresholddouble or nullOptional
Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.

Response

successful operation
usageobject or any
timedouble
Time spent to process this request
statusstring
resultlist of objects