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

# Count records

> Exact count of one Corpus's authorized Records within optional current-Version acceptance-time bounds. Includes withdrawn Records, as the listing does. Records without a current Version are counted only when neither bound is supplied. Uses content:read and the same Corpus scope as listRecords. This is an independent read, not a snapshot shared with listing pages. Equal bounds count zero; reversed bounds, malformed dates, duplicate or unknown parameters return 422 invalid_query.



## OpenAPI

````yaml /openapi.yaml get /v0/records/count
openapi: 3.1.0
info:
  title: Quivr HTTP API
  version: 0.0.0-draft
  description: >-
    Every endpoint of the Quivr v0 HTTP API. Send an API key as a bearer token;
    the key decides the Organization, the actions and the Corpora a request may
    reach.
servers: []
security:
  - ApiKey: []
paths:
  /v0/records/count:
    get:
      tags:
        - Records
      summary: Count records
      description: >-
        Exact count of one Corpus's authorized Records within optional
        current-Version acceptance-time bounds. Includes withdrawn Records, as
        the listing does. Records without a current Version are counted only
        when neither bound is supplied. Uses content:read and the same Corpus
        scope as listRecords. This is an independent read, not a snapshot shared
        with listing pages. Equal bounds count zero; reversed bounds, malformed
        dates, duplicate or unknown parameters return 422 invalid_query.
      operationId: countRecords
      parameters:
        - name: corpus_id
          in: query
          required: true
          schema:
            type: string
            minLength: 1
        - name: accepted_after
          in: query
          required: false
          description: >-
            Inclusive lower bound on the current Version's acceptance time. RFC
            3339 with an offset and at most 9 fractional-second digits; clients
            convert local days into bounds. Quivr applies no time-zone rules.
          schema:
            type: string
            format: date-time
        - name: accepted_before
          in: query
          required: false
          description: >-
            Exclusive upper bound on the current Version's acceptance time. RFC
            3339 with an offset and at most 9 fractional-second digits.
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecordCount'
        default:
          description: Structured error; see contract HTTP mapping.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    RecordCount:
      type: object
      additionalProperties: false
      properties:
        count:
          type: integer
          format: int64
          minimum: 0
      required:
        - count
    Error:
      type: object
      additionalProperties: false
      properties:
        code:
          type: string
          minLength: 1
        message:
          type: string
          minLength: 1
        retryable:
          type: boolean
        field:
          type: string
          minLength: 1
          description: >-
            JSON Pointer (RFC 6901) to the request member that caused a 422,
            when known (for example /config/url or /credential/secret/token on
            connector commands).
        resync_url:
          type: string
          format: uri-reference
      required:
        - code
        - message
        - retryable
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      description: >-
        API key, not necessarily a JWT. Server derives Organization, permitted
        actions and Corpus scope; every resource access is authorized.

````

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