Qdrant API
API description for Qdrant vector search engine. This document describes CRUD and search operations on collections of points (vectors with payload). Qdrant…
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
API description for Qdrant vector search engine.
This document describes CRUD and search operations on collections of points (vectors with payload).
Qdrant supports any combinations of should, min_should, must and must_not conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.
Examples
This examples cover the most basic use-cases - collection creation and basic vector search.
Create collection
First - let's create a collection with dot-production metric.
curl -X PUT 'http://localhost:6333/collections/test_collection' \
-H 'Content-Type: application/json' \
--data-raw '{
"vectors": {
"size": 4,
"distance": "Dot"
}
}'
Expected response:
{
"result": true,
"status": "ok",
"time": 0.031095451
}We can ensure that collection was created:
curl 'http://localhost:6333/collections/test_collection'Expected response:
{
"result": {
"status": "green",
"segments_count": 5,
"disk_data_size": 0,
"ram_data_size": 0,
"config": {
"params": {
"vectors": {
"size": 4,
"distance": "Dot"
}
},
"hnsw_config": {
"m": 16,
"ef_construct": 100,
"full_scan_threshold": 10000
},
"optimizer_config": {
"deleted_threshold": 0.2,
"vacuum_min_vector_number": 1000,
"default_segment_number": 2,
"max_segment_size": null,
"memmap_threshold": null,
"indexing_threshold": 20000,
"flush_interval_sec": 5,
"max_optimization_threads": null
},
"wal_config": {
"wal_capacity_mb": 32,
"wal_segments_ahead": 0
}
}
},
"status": "ok",
"time": 2.1199e-05
}Add points
Let's now add vectors with some payload:
curl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \ -H 'Content-Type: application/json' \ --data-raw '{
"points": [
{"id": 1, "vector": [0.05, 0.61, 0.76, 0.74], "payload": {"city": "Berlin"}},
{"id": 2, "vector": [0.19, 0.81, 0.75, 0.11], "payload": {"city": ["Berlin", "London"] }},
{"id": 3, "vector": [0.36, 0.55, 0.47, 0.94], "payload": {"city": ["Berlin", "Moscow"] }},
{"id": 4, "vector": [0.18, 0.01, 0.85, 0.80], "payload": {"city": ["London", "Moscow"] }},
{"id": 5, "vector": [0.24, 0.18, 0.22, 0.44], "payload": {"count": [0]}},
{"id": 6, "vector": [0.35, 0.08, 0.11, 0.44]}
]
}'Expected response:
{
"result": {
"operation_id": 0,
"status": "completed"
},
"status": "ok",
"time": 0.000206061
}Search with filtering
Let's start with a basic request:
curl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \ -H 'Content-Type: application/json' \ --data-raw '{
"vector": [0.2,0.1,0.9,0.7],
"top": 3
}'Expected response:
{
"result": [
{ "id": 4, "score": 1.362, "payload": null, "version": 0 },
{ "id": 1, "score": 1.273, "payload": null, "version": 0 },
{ "id": 3, "score": 1.208, "payload": null, "version": 0 }
],
"status": "ok",
"time": 0.000055785
}But result is different if we add a filter:
curl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \ -H 'Content-Type: application/json' \ --data-raw '{
"filter": {
"should": [
{
"key": "city",
"match": {
"value": "London"
}
}
]
},
"vector": [0.2, 0.1, 0.9, 0.7],
"top": 3
}'Expected response:
{
"result": [
{ "id": 4, "score": 1.362, "payload": null, "version": 0 },
{ "id": 2, "score": 0.871, "payload": null, "version": 0 }
],
"status": "ok",
"time": 0.000093972
}Endpoints 69
Collections
- GETList collections
/collectionsGet list name of all existing collections - GETCollection info
/collections/:collection_nameGet detailed information about specified existing collection - PUTCreate collection
/collections/:collection_name?timeout=1Create new collection with given parameters - DELETEDelete collection
/collections/:collection_name?timeout=1Drop collection and all associated data - PATCHUpdate collection parameters
/collections/:collection_name?timeout=1Update parameters of the existing collection - GETCheck the existence of a collection
/collections/:collection_name/existsReturns "true" if the given collection name exists, and "false" otherwise - PUTCreate named vector
/collections/:collection_name/vectors/:vector_name?wait=true&ordering=weak&timeout=1Create a new named vector on an existing collection - DELETEDelete named vector
/collections/:collection_name/vectors/:vector_name?wait=true&ordering=weak&timeout=1Delete a named vector from a collection - GETGet optimization progress
/collections/:collection_name/optimizations?with=string&completed_limit=16Get progress of ongoing and completed optimizations for a collection
Points
- GETGet point
/collections/:collection_name/points/:id?consistency=1&timeout=1Retrieve full information of single point by id - PUTUpsert points
/collections/:collection_name/points?wait=true&ordering=weak&timeout=1Perform insert + updates on points. If point with given ID already exists - it will be overwritten. - POSTGet points
/collections/:collection_name/points?consistency=1&timeout=1Retrieve multiple points by specified IDs - POSTDelete points
/collections/:collection_name/points/delete?wait=true&ordering=weak&timeout=1Delete points - PUTUpdate vectors
/collections/:collection_name/points/vectors?wait=true&ordering=weak&timeout=1Update specified named vectors on points, keep unspecified vectors intact. - POSTDelete vectors
/collections/:collection_name/points/vectors/delete?wait=true&ordering=weak&timeout=1Delete named vectors from the given points. - PUTOverwrite payload
/collections/:collection_name/points/payload?wait=true&ordering=weak&timeout=1Replace full payload of points with new one - POSTSet payload
/collections/:collection_name/points/payload?wait=true&ordering=weak&timeout=1Set payload values for points - POSTDelete payload
/collections/:collection_name/points/payload/delete?wait=true&ordering=weak&timeout=1Delete specified key payload for points - POSTClear payload
/collections/:collection_name/points/payload/clear?wait=true&ordering=weak&timeout=1Remove all payload for specified points - POSTBatch update points
/collections/:collection_name/points/batch?wait=true&ordering=weak&timeout=1Apply a series of update operations for points, vectors and payloads - POSTScroll points
/collections/:collection_name/points/scroll?consistency=1&timeout=1Scroll request - paginate over all points which matches given filtering condition - POSTCount points
/collections/:collection_name/points/count?consistency=1&timeout=1Count points which matches given filtering condition - POSTFacet a payload key with a given filter.
/collections/:collection_name/facet?consistency=1&timeout=1Count points that satisfy the given filter for each unique value of a payload key.
Search
- POSTQuery points
/collections/:collection_name/points/query?consistency=1&timeout=1Universally query points. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries. - POSTQuery points in batch
/collections/:collection_name/points/query/batch?consistency=1&timeout=1Universally query points in batch. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage… - POSTQuery points, grouped by a given payload field
/collections/:collection_name/points/query/groups?consistency=1&timeout=1Universally query points, grouped by a given payload field - POSTSearch points matrix distance pairs
/collections/:collection_name/points/search/matrix/pairs?consistency=1&timeout=1Compute distance matrix for sampled points with a pair based output format - POSTSearch points matrix distance offsets
/collections/:collection_name/points/search/matrix/offsets?consistency=1&timeout=1Compute distance matrix for sampled points with an offset based output format
Aliases
- POSTUpdate aliases of the collections
/collections/aliases?timeout=1 - GETList aliases for collection
/collections/:collection_name/aliasesGet list of all aliases for a collection - GETList collections aliases
/aliasesGet list of all existing collections aliases
Indexes
- PUTCreate index for field in collection
/collections/:collection_name/index?wait=true&ordering=weak&timeout=1Create index for field in collection - DELETEDelete index for field in collection
/collections/:collection_name/index/:field_name?wait=true&ordering=weak&timeout=1Delete field index for collection
Distributed
- GETList shard keys
/collections/:collection_name/shards - PUTCreate shard key
/collections/:collection_name/shards?timeout=1 - POSTDelete shard key
/collections/:collection_name/shards/delete?timeout=1 - GETGet cluster status info
/clusterGet information about the current state and composition of the cluster - GETCollect cluster telemetry data
/cluster/telemetry?details_level=0&timeout=60Get telemetry data, from the point of view of the cluster. This includes peers info, collections info, shard transfers, and resharding status - POSTTries to recover current peer Raft state.
/cluster/recover - DELETERemove peer from the cluster
/cluster/peer/:peer_id?timeout=1&force=falseTries to remove peer from the cluster. Will return an error if peer has shards on it. - GETCollection cluster info
/collections/:collection_name/clusterGet cluster information for a collection - POSTUpdate collection cluster setup
/collections/:collection_name/cluster?timeout=1
Snapshots
- POSTRecover from an uploaded snapshot
/collections/:collection_name/snapshots/upload?wait=true&priority=no_sync&checksum=stringRecover local collection data from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist -… - PUTRecover from a snapshot
/collections/:collection_name/snapshots/recover?wait=trueRecover local collection data from a snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will… - GETList collection snapshots
/collections/:collection_name/snapshotsGet list of snapshots for a collection - POSTCreate collection snapshot
/collections/:collection_name/snapshots?wait=trueCreate new snapshot for a collection - GETDownload collection snapshot
/collections/:collection_name/snapshots/:snapshot_nameDownload specified snapshot from a collection as a file - DELETEDelete collection snapshot
/collections/:collection_name/snapshots/:snapshot_name?wait=trueDelete snapshot for a collection - GETList of storage snapshots
/snapshotsGet list of snapshots of the whole storage - POSTCreate storage snapshot
/snapshots?wait=trueCreate new snapshot of the whole storage - GETDownload storage snapshot
/snapshots/:snapshot_nameDownload specified snapshot of the whole storage as a file - DELETEDelete storage snapshot
/snapshots/:snapshot_name?wait=trueDelete snapshot of the whole storage - GETDownload shard snapshot
/collections/:collection_name/shards/:shard_id/snapshotStream the current state of a shard as a snapshot file - POSTRecover shard from an uploaded snapshot
/collections/:collection_name/shards/:shard_id/snapshots/upload?wait=true&priority=no_sync&checksum=stringRecover shard of a local collection from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection shard. - PUTRecover from a snapshot
/collections/:collection_name/shards/:shard_id/snapshots/recover?wait=trueRecover shard of a local collection data from a snapshot. This will overwrite any data, stored in this shard, for the collection. - GETList shards snapshots for a collection
/collections/:collection_name/shards/:shard_id/snapshotsGet list of snapshots for a shard of a collection - POSTCreate shard snapshot
/collections/:collection_name/shards/:shard_id/snapshots?wait=trueCreate new snapshot of a shard for a collection - GETDownload collection snapshot
/collections/:collection_name/shards/:shard_id/snapshots/:snapshot_nameDownload specified snapshot of a shard from a collection as a file - DELETEDelete shard snapshot
/collections/:collection_name/shards/:shard_id/snapshots/:snapshot_name?wait=trueDelete snapshot of a shard for a collection
Service
- GETReturns information about the running Qdrant instance
/Returns information about the running Qdrant instance like version and commit id - GETCollect telemetry data
/telemetry?anonymize=true&details_level=0&per_collection=true&timeout=60Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics - GETCollect Prometheus metrics data
/metrics?anonymize=true&per_collection=true&timeout=60Collect metrics data including app info, collections info, cluster info and statistics - GETKubernetes healthz endpoint
/healthzLiveness-style health check. Returns 200 as soon as the HTTP API is serving requests. It does not inspect collections, shards or consensus state, and is… - GETKubernetes livez endpoint
/livezKubernetes liveness probe. Returns 200 as soon as the HTTP API is serving requests. It does not inspect collections, shards or consensus state, and is… - GETKubernetes readyz endpoint
/readyzKubernetes readiness probe. Checks the instance and waits out pending data operations to see when it can start accepting traffic. In a distributed deployment…
Quotas
- GETGet global quotas
/quotasGet the cluster-wide resource quota configuration, together with the current utilization it is measured against. The configuration is the same on every peer,… - PUTSet global quotas
/quotas?wait=falseReplace the cluster-wide resource quota configuration. The new configuration is propagated to every peer through consensus and persisted, so it survives…
Beta
- GETGet issues
/issuesGet a report of performance issues and configuration suggestions - DELETEClear issues
/issuesRemoves all issues reported so far
API details
- Authentication
- An API key in the api-key header
A bearer token in the Authorization header - Operations
- 69 operations on 53 pathsGET 26POST 24PUT 10DELETE 8PATCH 1
- Main resources
- Snapshots 17Points 14Collections 9Distributed 9Service 6Search 5Aliases 3Beta 2Indexes 2Quotas 2
- Response formats
application/jsontext/plainapplication/octet-stream- Description format
- OpenAPI 3.0.1, API version
master - Links
- Documentation · OpenAPI document
- Listed from
- Qdrant's published OpenAPI description (qdrant/qdrant) (Apache-2.0)
How to test the Qdrant API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Qdrant API collection, without the publisher's secrets.
- Add your credentialsThis API uses an API key in the api-key header. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “List collections” (GET /collections), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Qdrant API?
API description for Qdrant vector search engine. This document describes CRUD and search operations on collections of points (vectors with payload). Qdrant… It is listed under AI & machine learning and has 69 endpoints.
Who publishes the Qdrant API?
It is listed from Qdrant's public API description (an OpenAPI document), not published by Qdrant on Swastik Codes. Anyone who controls qdrant.tech can claim the profile by adding a DNS TXT record.
How do I authenticate with the Qdrant API?
It accepts 2 methods: an API key in the api-key header; A bearer token in the Authorization header.
How many endpoints does the Qdrant API have?
69 operations on 53 paths (26 GET, 24 POST, 10 PUT, 8 DELETE, 1 PATCH). The largest groups are Snapshots, Points, Collections, Distributed.
Is forking the Qdrant API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.