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

# Get project usage

> Returns the usage of a project per UTC day: runtime, storage, bandwidth, documents, searches, and chat tokens. The window is clamped to the project lifetime, terminated projects included.



## OpenAPI

````yaml /assets/cloud-assets/meilisearch-cloud-openapi-mintlify.json get /api/v2/projects/{projectId}/usage
openapi: 3.0.1
info:
  title: Meilisearch Cloud API V2
  version: v2
  contact:
    name: Meilisearch support
    email: support@meilisearch.com
  description: >-
    Manages Meilisearch Cloud organizations, teams and projects. Request and
    response fields are camelCase.


    ## Authentication


    Send `Authorization: Bearer <token>` with a Personal Access Token or an
    OAuth2 access token. OAuth2 tokens need the `read` scope for GET requests
    and `write` for every other method. See
    [Authentication](https://www.meilisearch.com/docs/reference/management-api/authentication).


    ## Pagination


    List endpoints take `offset` and `limit` and return `{ results, offset,
    limit, total }`.


    ## Errors


    Every non-2xx response has the `Error` body. Read its `code` field to know
    the exact error. Each operation documents the statuses it can answer. Every
    endpoint can also answer:


    - `400` `invalid_id`: an id in the path or the query is not an integer.

    - `400` `invalid_body`: the body is not valid JSON.

    - `400` `unknown_field`: the body has a field the endpoint does not accept.

    - `400` `invalid_offset`, `invalid_limit`: invalid pagination parameter on a
    list endpoint.

    - `401` `missing_authorization_header`, `invalid_token`: no token, or an
    invalid, expired or revoked one.

    - `403` `forbidden`: the OAuth2 token does not have the scope the method
    needs.

    - `429` `rate_limited`: over 30 requests per minute per token. Retry after
    the number of seconds in the `Retry-After` header.

    - `500` `internal`: unexpected error.
servers:
  - url: https://api.meilisearch.com
security:
  - personal_access_token: []
  - oauth2:
      - read
      - write
tags:
  - name: Authentication
    description: Identity of the token owner.
  - name: Organizations
    description: Organizations hold teams and billing.
  - name: Teams
    description: Teams hold projects and members.
  - name: Projects
    description: Meilisearch instances.
  - name: Cost monitoring
    description: Usage and estimated cost of projects.
  - name: Regions
    description: Regions where a project can be created.
  - name: Resources
    description: Machine sizes and their plans, to create a project or change its plan.
  - name: Meilisearch Versions
    description: Meilisearch versions a project can run.
paths:
  /api/v2/projects/{projectId}/usage:
    parameters:
      - name: projectId
        in: path
        schema:
          type: integer
          minimum: 0
        description: Id of the project.
        required: true
      - name: from
        in: query
        schema:
          type: string
          format: date
        required: false
        description: >-
          First UTC day of the window, inclusive. Defaults to the first day of
          the current month.
      - name: to
        in: query
        schema:
          type: string
          format: date
        required: false
        description: >-
          Last UTC day of the window, inclusive. Defaults to today. The window
          can not exceed 93 days.
    get:
      tags:
        - Cost monitoring
      summary: Get project usage
      description: >-
        Returns the usage of a project per UTC day: runtime, storage, bandwidth,
        documents, searches, and chat tokens. The window is clamped to the
        project lifetime, terminated projects included.
      operationId: getProjectUsage
      responses:
        '200':
          description: Project usage
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectUsage'
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                invalid_token:
                  value:
                    message: The provided token is invalid.
                    code: invalid_token
                    type: auth
                    link: >-
                      https://www.meilisearch.com/docs/reference/management-api-errors#invalid_token
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              examples:
                project_not_found:
                  value:
                    message: Project not found.
                    code: project_not_found
                    type: invalid_request
                    link: >-
                      https://www.meilisearch.com/docs/reference/management-api-errors#project_not_found
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Unprocessable Content
          content:
            application/json:
              examples:
                usage_range_too_large:
                  value:
                    message: Usage date range too large
                    code: usage_range_too_large
                    type: invalid_request
                    link: >-
                      https://www.meilisearch.com/docs/reference/management-api-errors#usage_range_too_large
                    details:
                      - field: from
                        code: invalid
                        message: Usage date range too large
                      - field: to
                        code: invalid
                        message: Usage date range too large
                usage_invalid_range:
                  value:
                    message: Invalid usage date range
                    code: usage_invalid_range
                    type: invalid_request
                    link: >-
                      https://www.meilisearch.com/docs/reference/management-api-errors#usage_invalid_range
                    details:
                      - field: from
                        code: invalid
                        message: Invalid usage date range
                      - field: to
                        code: invalid
                        message: Invalid usage date range
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - personal_access_token: []
        - oauth2:
            - read
      x-codeSamples:
        - lang: cURL
          label: HTTP request
          source: |-
            curl \
              -X GET 'https://api.meilisearch.com/api/v2/projects/343/usage?from=2026-10-01&to=2026-10-31' \
              -H 'Authorization: Bearer MANAGEMENT_API_TOKEN'
components:
  schemas:
    ProjectUsage:
      type: object
      properties:
        projectId:
          type: integer
          description: Id of the project.
          example: 56
        from:
          type: string
          format: date
          description: First UTC day of the window.
          example: '2026-11-01'
        to:
          type: string
          format: date
          description: Last UTC day of the window.
          example: '2026-11-23'
        days:
          type: array
          items:
            $ref: '#/components/schemas/ProjectUsageDay'
          description: Usage of each day of the window.
      required:
        - projectId
        - from
        - to
        - days
    Error:
      type: object
      description: >-
        Error body returned by every non-2xx response. Switch on `code`, never
        on `message`.
      properties:
        message:
          type: string
          description: Human-readable description of the error.
          example: Project not found.
        code:
          type: string
          description: Stable snake_case identifier of the error.
          example: project_not_found
        type:
          type: string
          enum:
            - invalid_request
            - auth
            - internal
          description: Category of the error, derived from the HTTP status.
          example: invalid_request
        link:
          type: string
          format: uri
          description: Documentation of this error code.
          example: >-
            https://www.meilisearch.com/docs/reference/management-api-errors#project_not_found
        details:
          type: array
          description: >-
            Request fields the error is about. Present whenever the error
            involves request fields.
          items:
            type: object
            properties:
              field:
                type: string
                description: Name of the field, in camelCase.
                example: name
              code:
                type: string
                description: Reason the field was rejected, e.g. `missing` or `unknown`.
                example: blank
              message:
                type: string
                description: Human-readable description of the problem.
                example: Name can't be blank
            required:
              - field
              - code
              - message
      required:
        - message
        - code
        - type
        - link
    ProjectUsageDay:
      type: object
      description: >-
        Usage of a UTC day. A null quantity means nothing was collected that
        day.
      properties:
        date:
          type: string
          format: date
          description: UTC day.
          example: '2026-11-01'
        runtime:
          type: array
          description: >-
            Hours per machine size (resource), each one having its own hourly
            price.
          items:
            type: object
            properties:
              resourceId:
                type: integer
                description: Id of the resource.
                example: 7
              hours:
                type: number
                description: Hours the instance ran on this resource.
                example: 24
            required:
              - resourceId
              - hours
        storageGb:
          type: integer
          nullable: true
          description: Provisioned disk, in GB.
          example: 32
        bandwidthBytes:
          type: integer
          nullable: true
          description: Outbound bandwidth, in bytes.
          example: 52428800
        documents:
          type: integer
          nullable: true
          description: Number of documents stored.
          example: 120000
        searches:
          type: integer
          nullable: true
          description: Number of search requests.
          example: 4500
        chatTokens:
          type: integer
          nullable: true
          description: Number of chat completion tokens.
          example: 0
      required:
        - date
        - runtime
        - storageGb
        - bandwidthBytes
        - documents
        - searches
        - chatTokens
  securitySchemes:
    personal_access_token:
      type: http
      scheme: bearer
      description: >-
        Send `Authorization: Bearer <token>`, where `<token>` is a personal
        access token (PAT) or an OAuth2 access token. A PAT authenticates as the
        user who owns it. See
        [Authentication](https://www.meilisearch.com/docs/reference/management-api/authentication).
    oauth2:
      type: oauth2
      description: >-
        OAuth2 authorization code flow with PKCE, for partner applications
        acting on behalf of a user. Send the user to the authorization URL in
        their browser. `read` allows GET requests, `write` allows every other
        method. See
        [Authentication](https://www.meilisearch.com/docs/reference/management-api/authentication).
      flows:
        authorizationCode:
          authorizationUrl: https://cloud.meilisearch.com/oauth/authorize
          tokenUrl: https://api.meilisearch.com/oauth/token
          refreshUrl: https://api.meilisearch.com/oauth/token
          scopes:
            read: Read access (GET requests)
            write: Write access (all other requests)

````

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