Docs

count_unavailable

400 invalid_request. totalCount could not be computed cheaply for this filter (a relation filter matching over 50,000 entries).

View as Markdown
HTTP statustypeSurfaces
400invalid_requestREST, GraphQL

What it means

totalCount could not be computed cheaply for this filter (a relation filter matching over 50,000 entries).

WhenWhat the hint tells you
count=true with a relation filter over 50,000 rowsdrop the relation filter or drop count=true

What to do

Drop totalCount, or narrow the filter.

The response

HTTP 400:

{
  "error": {
    "type": "invalid_request",
    "code": "count_unavailable",
    "message": "This filter matches too many entries to count.",
    "param": "count",
    "docs": "https://docs.capacms.com/errors/count_unavailable"
  },
  "meta": {
    "version": "2026-10-01",
    "contract": 1,
    "requestId": "req_0f3c…"
  }
}

On GraphQL

/api/graphql answers the same code inside errors[].extensions. The status depends on the Accept header you send (status codes):

application/jsongraphql-response+jsonWhen
200200totalCount could not be taken (a hop filter matching over 50,000 entries); only totalCount is null

See also