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

# Get API Usage

> Retrieve your API usage statistics within the specified date range (maximum 365 days). Defaults to 7 days ago when no start or end dates are provided.



## OpenAPI

````yaml /api-v3/api-v3.yaml get /usage
openapi: 3.1.0
info:
  version: 1.0.0
  title: CreatorDB Headless API V3
  description: '# CreatorDB Headless API V3'
  contact:
    name: CreatorDB
    url: https://www.creatordb.app
    email: support@creatordb.app
  license:
    url: http://www.apache.org/licenses/LICENSE-2.0.html
    name: Apache 2.0
servers:
  - url: https://apiv3.creatordb.app
    description: Production Environment (CreatorDB Headless API V3)
security:
  - ApiKeyAuth: []
tags:
  - name: Brand
    description: Brand analysis endpoints including sponsor search and brand reports.
  - name: Facebook
    description: Facebook creator data endpoints with metrics and search capabilities.
  - name: General Operations
    description: >-
      General-purpose endpoints such as API status, content retrieval, and
      cross-platform operations.
  - name: Instagram
    description: >-
      Instagram creator data endpoints with metrics and advanced search
      capabilities.
  - name: Niches
    description: >-
      Niche-related endpoints for content category analysis and related
      searches.
  - name: Threads
    description: Threads creator data endpoints with basic metrics and historical data.
  - name: TikTok
    description: >-
      TikTok creator data endpoints with metrics and advanced search
      functionality.
  - name: Topic
    description: Topic-based analysis and reporting endpoints for content categorization.
  - name: YouTube
    description: >-
      YouTube creator data endpoints including basic metrics, historical data,
      and detailed analytics.
paths:
  /usage:
    get:
      tags:
        - User Account
      summary: Get API Usage
      description: >-
        Retrieve your API usage statistics within the specified date range
        (maximum 365 days). Defaults to 7 days ago when no start or end dates
        are provided.
      operationId: getApiUsage
      parameters:
        - name: start
          in: query
          description: >-
            Start date, represented as a Unix timestamp in milliseconds.
            Defaults to 7 days ago.
          required: false
          schema:
            type: string
            examples:
              - '1737312000000'
        - name: end
          in: query
          description: >-
            End date, represented as a Unix timestamp in milliseconds. Defaults
            to current time.
          required: false
          schema:
            type: string
            examples:
              - '1737398400000'
      responses:
        '200':
          description: API credit usage results returned successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    description: API usage data containing records and count.
                    properties:
                      records:
                        type: array
                        description: API usage records for the requested date range.
                        items:
                          type: object
                          properties:
                            date:
                              type: string
                              description: Date in YYYYMMDD format (UTC±0).
                              pattern: ^\d{8}$
                              examples:
                                - '20260120'
                            requestCount:
                              type: integer
                              description: >-
                                Total number of API requests for this API key on
                                this day.
                              minimum: 0
                              examples:
                                - 47
                            totalQuotaUsed:
                              type: integer
                              description: >-
                                Total credits consumed for this API key on this
                                day.
                              minimum: 0
                              examples:
                                - 47
                            endpoints:
                              type: object
                              description: Request count and quota usage per endpoint.
                              additionalProperties:
                                type: object
                                properties:
                                  count:
                                    type: integer
                                    description: Number of requests made to this endpoint.
                                    minimum: 0
                                  creditsUsed:
                                    type: integer
                                    description: Total quota consumed by this endpoint.
                                    minimum: 0
                                required:
                                  - count
                                  - creditsUsed
                              examples:
                                - searchInstagram:
                                    count: 12
                                    creditsUsed: 12
                                  getInstagramProfile:
                                    count: 8
                                    creditsUsed: 8
                                  getTiktokProfile:
                                    count: 10
                                    creditsUsed: 10
                            platforms:
                              type: object
                              description: >-
                                Number of requests per social media platform.
                                Empty when no platform-specific calls were made.
                              additionalProperties:
                                type: integer
                                minimum: 0
                              default: {}
                              examples:
                                - instagram: 20
                                  tiktok: 10
                                  youtube: 17
                            quotaByPlatform:
                              type: object
                              description: >-
                                Quota consumed per social media platform. Empty
                                when no platform-specific calls were made.
                              additionalProperties:
                                type: integer
                                minimum: 0
                              default: {}
                              examples:
                                - instagram: 20
                                  tiktok: 10
                                  youtube: 17
                          required:
                            - date
                            - requestCount
                            - totalQuotaUsed
                            - endpoints
                      count:
                        type: integer
                        description: Total number of records returned.
                        minimum: 0
                        examples:
                          - 7
                    required:
                      - records
                      - count
                  creditsUsed:
                    type: integer
                    description: >-
                      Total number of API credits consumed across all requests
                      in this session.
                    examples:
                      - 1
                  creditsAvailable:
                    type: integer
                    description: Number of API credits remaining.
                    examples:
                      - -1
                  traceId:
                    type: string
                    description: Unique trace ID for each request.
                    examples:
                      - f8e4a3b2c1d0e9f8a7b6c5d4e3f2a1b0
                  timestamp:
                    type: integer
                    description: >-
                      Time the response was generated, represented as a Unix
                      timestamp in milliseconds.
                    examples:
                      - 1750732453635
                  errorCode:
                    type: string
                    description: >-
                      Error code returned if the request fails. Empty if the
                      request is successful.
                    examples:
                      - ''
                  errorDescription:
                    type: string
                    description: >-
                      Description of the error. Empty if the request is
                      successful.
                    examples:
                      - ''
                  success:
                    type: boolean
                    description: '`true` if the request is successful.'
                    examples:
                      - true
                required:
                  - data
                  - traceId
                  - timestamp
                  - errorCode
                  - errorDescription
                  - success
                  - creditsUsed
                  - creditsAvailable
        '400':
          description: Validation error.
          content:
            application/json:
              schema:
                type: object
                title: ValidationErrorResponse
                properties:
                  success:
                    const: false
                  error:
                    type: string
                  message:
                    type: string
                  timestamp:
                    type: integer
                required:
                  - success
                  - error
                  - message
                  - timestamp
              examples:
                invalid date range:
                  summary: Date range exceeds 365 days
                  value:
                    success: false
                    error: VALIDATION_ERROR
                    message: The 'start' and 'end' date range cannot exceed 365 days.
                    timestamp: 1770099403116
        '429':
          description: Exceeded quota or rate limit.
          content:
            application/json:
              schema:
                type: object
                title: QuotaErrorResponse
                properties:
                  success:
                    const: false
                  error:
                    type: string
                  message:
                    type: string
                  remainingPlanCredit:
                    type: number
                required:
                  - success
                  - error
                  - message
                  - remainingPlanCredit
              examples:
                rate limited:
                  summary: Rate limit exceeded
                  value:
                    success: false
                    error: RATE_LIMIT_EXCEEDED
                    message: Too many requests. Please try again later.
                quota exceeded:
                  summary: Credit quota exceeded
                  value:
                    success: false
                    error: QUOTA_EXCEEDED
                    message: Not enough credits to complete this request.
      security:
        - ApiKeyAuth: []
      servers:
        - url: https://apiv3.creatordb.app
          description: Production Environment (CreatorDB Headless API V3)
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |
            curl -X GET "https://apiv3.creatordb.app/usage" \
              -H "api-key: <YOUR_API-KEY_HERE>"
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: The valid CreatorDB API key for authentication.
      name: api-key
      in: header

````