> ## Documentation Index
> Fetch the complete documentation index at: https://docs.invopop.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Count query results

> Count the documents matching a filter, without returning them.

Counting is bounded: past an internal limit the response reports
"count_capped", meaning the real total is at least the number given. A
count that cannot be produced in time reports "count_unavailable"
instead of failing.



## OpenAPI

````yaml GET /silo/v1/entries/query/count
openapi: 3.0.0
info:
  contact:
    email: dev@invopop.com
    name: Invopop Developers
  description: >-
    Store and manage GOBL documents along with their attachments in "Silo
    Entries".
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  title: Silo Service API
  version: 1.0.0
servers:
  - description: production
    url: https://api.invopop.com
security:
  - authToken: []
paths:
  /silo/v1/entries/query/count:
    get:
      description: |-
        Count the documents matching a filter, without returning them.

        Counting is bounded: past an internal limit the response reports
        "count_capped", meaning the real total is at least the number given. A
        count that cannot be produced in time reports "count_unavailable"
        instead of failing.
      parameters:
        - description: GOBL document type to count.
          in: query
          name: schema
          required: true
          schema:
            $ref: '#/components/schemas/SiloSchemaName'
        - description: Filter expression, as used when listing entries.
          in: query
          name: filter
          schema:
            description: Filter expression, as used when listing entries.
            example: state = "sent"
            title: Filter
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SiloEntryCount'
          description: OK
components:
  schemas:
    SiloSchemaName:
      enum:
        - bill/delivery
        - bill/invoice
        - bill/order
        - bill/payment
        - bill/status
        - note/message
        - org/item
        - org/party
      type: string
    SiloEntryCount:
      properties:
        count:
          description: Number of matching entries.
          example: 42
          title: Count
          type: integer
        count_capped:
          description: >-
            When true, counting stopped at an internal limit and the real total
            is at least count.
          title: Count Capped
          type: boolean
        count_unavailable:
          description: When true, the count could not be produced in time.
          title: Count Unavailable
          type: boolean
        filter:
          description: Filter expression that was applied.
          title: Filter
          type: string
        schema:
          description: Document type that was counted.
          example: bill/invoice
          title: Schema
          type: string
      type: object
  securitySchemes:
    authToken:
      bearerFormat: JWT
      description: >-
        Use the `Bearer` scheme with a valid JWT token to authenticate requests.
        Example: `Authorization: Bearer <token>`
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.