Points

Count points

POST
Counts the number of points that match a specified filtering condition.

Path parameters

collection_namestringRequired
Name of the collection to count in

Request

This endpoint expects an object.
shard_key
unionOptional
Specify in which shards to look for the points, if not specified - look in all shards
filter
unionOptional
Look only for points which satisfies this conditions
exact
booleanOptional
If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true

Response

This endpoint returns an object
time
doubleOptional
Time spent to process this request
status
stringOptional
result
objectOptional
POST
1curl -X POST http://localhost:6333/collections/collection_name/points/count \
2 -H "api-key: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{}'
200Successful
1{
2 "time": 1.1,
3 "status": "status",
4 "result": {
5 "count": 1
6 }
7}