Skip to main content
Mintlify

Search documentation

Type to search this documentation.

On this pageOverview

Get assistant caller stats

Returns a breakdown of assistant query counts by caller type (web, API, and other) for the specified date range.

Authenticate with an admin API key.

Use this endpoint to see how the system distributes assistant queries across different caller types. The response breaks down total queries into:

  • web: Queries from the documentation site
  • api: Queries from direct API calls
  • other: Queries from other sources (for example, integrations, SDKs)
  • total: Sum of all query types

Filter by date range using dateFrom and dateTo parameters.

This endpoint allows 100 requests per organization per hour. All analytics endpoints share this limit.

analytics.openapi.json
openapi: 3.1.0
info:
  title: Mintlify Analytics Export API
  version: 1.0.0
  description: API for exporting documentation analytics data
servers:
  - url: https://api.mintlify.com
    description: Production
security: []
paths:
  /v1/analytics/{projectId}/assistant/caller-stats:
    get:
      tags:
        - Analytics
      summary: Get assistant caller stats
      description: >-
        Returns a breakdown of assistant query counts by caller type (web, API,
        and other) for the specified date range.


        Authenticate with an admin API key.
      parameters:
        - $ref: '#/components/parameters/projectId'
        - schema:
            type: string
            description: Date in ISO 8601 or YYYY-MM-DD format
            example: '2024-01-01'
          required: false
          name: dateFrom
          in: query
        - schema:
            type: string
            description: >-
              Date in ISO 8601 or YYYY-MM-DD format. `dateTo` is an exclusive
              upper limit. Results include dates before, but not on, the
              specified date.
            example: '2024-01-01'
          required: false
          name: dateTo
          in: query
      responses:
        '200':
          description: Assistant query counts broken down by caller type
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssistantCallerStatsResponse'
        '400':
          description: Invalid query parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsErrorResponse'
      security:
        - bearerAuth: []
components:
  parameters:
    projectId:
      schema:
        $ref: '#/components/schemas/projectId'
      required: true
      name: projectId
      in: path
  schemas:
    AssistantCallerStatsResponse:
      type: object
      properties:
        web:
          type: number
          description: >-
            Number of assistant queries originating from the web (documentation
            site).
        api:
          type: number
          description: Number of assistant queries originating from API calls.
        other:
          type: number
          description: >-
            Number of assistant queries from other sources (e.g., integrations,
            SDKs).
        total:
          type: number
          description: Total assistant queries across all caller types.
      required:
        - web
        - api
        - other
        - total
    AnalyticsErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message describing what went wrong.
        details:
          type: array
          description: Additional details about the error.
          items:
            type: object
            properties:
              message:
                type: string
                description: Description of a specific validation or processing error.
            required:
              - message
      required:
        - error
    projectId:
      type: string
      description: >-
        Your project ID. Can be copied from the [API
        keys](https://app.mintlify.com/settings/organization/api-keys) page in
        your dashboard.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        The Authorization header expects a Bearer token. Use an admin API key.
        This is a server-side secret key. Generate one on the [API keys
        page](https://app.mintlify.com/settings/organization/api-keys) in your
        dashboard.
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu