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

# List credit usage per day



## OpenAPI

````yaml /openapi.json get /credits/usage
openapi: 3.1.0
info:
  title: Clipstake API
  description: >-
    Instagram, X and YouTube media tracking, audience geography and
    demographics, as an API.
  version: 0.0.1
servers:
  - url: https://api.clipstake.com/v1
security: []
paths:
  /credits/usage:
    get:
      tags:
        - Credits
      summary: List credit usage per day
      operationId: credits-usage
      parameters:
        - in: query
          name: from
          schema:
            type: string
            format: date
        - in: query
          name: to
          schema:
            type: string
            format: date
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  from:
                    type: string
                    format: date
                    description: First UTC day included.
                  to:
                    type: string
                    format: date
                    description: Last UTC day included.
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        date:
                          type: string
                          format: date
                          description: The UTC day.
                        project_id:
                          anyOf:
                            - type: string
                              pattern: ^prj_[0-9a-f]{24}$
                            - type: 'null'
                          description: >-
                            The project the reads belong to. Null for the daily
                            geo account cost, which belongs to the workspace.
                        resource_type:
                          type: string
                          description: >-
                            What used the credits: `media` (reads of tracked
                            media), `geo_read` (the geo cost added to each read,
                            while the account has audience data) or `account`
                            (the daily geo account cost). Accept values you do
                            not know.
                        reads:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                          description: Successful reads on this day.
                        credits:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                          description: Credits these reads used.
                      required:
                        - date
                        - project_id
                        - resource_type
                        - reads
                        - credits
                      additionalProperties: false
                    description: >-
                      One row per day, project and type, oldest day first. Days
                      with no reads have no row.
                required:
                  - from
                  - to
                  - data
                additionalProperties: false
              example:
                from: '2026-10-21'
                to: '2026-10-22'
                data:
                  - date: '2026-10-21'
                    project_id: prj_5f9c0a1b2c3d4e5f60718293
                    resource_type: media
                    reads: 612
                    credits: 7344
                  - date: '2026-10-21'
                    project_id: prj_5f9c0a1b2c3d4e5f60718293
                    resource_type: geo_read
                    reads: 204
                    credits: 816
                  - date: '2026-10-21'
                    project_id: null
                    resource_type: account
                    reads: 3
                    credits: 4500
                  - date: '2026-10-22'
                    project_id: prj_5f9c0a1b2c3d4e5f60718293
                    resource_type: media
                    reads: 598
                    credits: 7176
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
              example:
                error:
                  code: invalid_request
                  message: The request body or parameters are invalid.
                  request_id: req_01K5A7N8QY2M4C6V9X3J
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
              example:
                error:
                  code: unauthorized
                  message: Provide a valid API key.
                  request_id: req_01K5A7P2CH8T6R4W9M1B
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
              example:
                error:
                  code: internal_error
                  message: An unexpected error occurred.
                  request_id: req_01K5A7S6FQ3V8H2N9C4M
      security:
        - Authorization: []
components:
  schemas:
    error.BAD_REQUEST:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Bad request
        code:
          type: string
          description: The error code
          example: BAD_REQUEST
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Bad request error (400)
      description: The error information
      example:
        code: BAD_REQUEST
        message: Bad request
        issues: []
    error.UNAUTHORIZED:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Unauthorized
        code:
          type: string
          description: The error code
          example: UNAUTHORIZED
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Unauthorized error (401)
      description: The error information
      example:
        code: UNAUTHORIZED
        message: Unauthorized
        issues: []
    error.INTERNAL_SERVER_ERROR:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Internal server error
        code:
          type: string
          description: The error code
          example: INTERNAL_SERVER_ERROR
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Internal server error error (500)
      description: The error information
      example:
        code: INTERNAL_SERVER_ERROR
        message: Internal server error
        issues: []
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````

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