---
title: "Count documents in a collection."
method: GET
path: "/v1/collections/{collection_identifier}/documents/count"
tags: ["Collection Documents"]
---

# Count documents in a collection.

`GET /v1/collections/{collection_identifier}/documents/count`

Return the total number of documents in the collection. This is the obvious REST endpoint for a document count; it is declared before the `/{document_id}` route so the literal `count` segment is never matched as a document id (which previously produced a misleading 404).

## Path parameters

- `collection_identifier` string, required — The ID of the collection to count documents in.

## Response `200`

Successful Response

- DocumentCountResponse — Response model for the document-count endpoint. Returned by ``GET /v1/collections/{collection_id}/documents/count`` — the obvious REST guess for "how many documents are in this collection?" that previously 404'd (the literal ``count`` segment was matched as a ``{document_id}``). See FRUSTRATIONS 2026-06-29.
  - `collection_id` string, required — The collection the count is for (resolved id).
  - `count` integer, required — Total number of documents in the collection.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Validation Error
- `500` — Internal Server Error

---

[API](https://skmtc.net/mixpeek/apis/mixpeek-api.md) · [All operations](https://skmtc.net/mixpeek/apis/mixpeek-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mixpeek/mixpeek-api/versions/5d4c905106b4/schema)
