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

# Get Customer Growth Stats

> This endpoint provides data organized by query group, with two distinct views:

**Per Scan**: Shows individual scores for each scan with its date. Provides granular, point-in-time data for each scan. Includes execution date and score for each scan

**Overview**: Shows 30-day rolling average scores. Provides smoothed trend data that reduces noise. Calculated as rolling averages based on the last 30 days of executions — computed per AI platform.

Results include executions from all supported AI platforms (e.g. ChatGPT, Google AI Overview) by default.

<Accordion title="AI Platforms (`aiPlatform`)">
  Both views (Per Scan and Overview) include data from all supported AI platforms by default, interleaved inside each query group's `data` array. Every data point is tagged with an `aiPlatform` field so you can distinguish points per platform.

  Overview rolling averages are **computed per platform**, which means the same `startDate`/`endDate` window can appear multiple times for the same query group — one entry per platform.

  Use the optional `aiPlatform` request parameter to scope the response to a single platform. Current values:

  * `chatgpt` — ChatGPT
  * `aioverview` — Google AI Overview

  Additional platforms may be added in the future.
</Accordion>


## OpenAPI

````yaml POST /get-customer-growth-stats
openapi: 3.1.0
info:
  title: Mindshare API
  description: >-
    The Mindshare API provides comprehensive access to brand visibility
    analytics, customer intelligence, and growth tracking. Use this API to
    retrieve customer data, query groups, execution results, domain insights,
    and actionable recommendations for improving your brand's AI visibility.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.mindshare.so/customer/v1
security:
  - apiKeyHeader: []
paths:
  /get-customer-growth-stats:
    post:
      description: >-
        This endpoint provides data organized by query group, with two distinct
        views:


        **Per Scan**: Shows individual scores for each scan with its date.
        Provides granular, point-in-time data for each scan. Includes execution
        date and score for each scan


        **Overview**: Shows 30-day rolling average scores. Provides smoothed
        trend data that reduces noise. Calculated as rolling averages based on
        the last 30 days of executions — computed per AI platform.


        Results include executions from all supported AI platforms (e.g.
        ChatGPT, Google AI Overview) by default.
      requestBody:
        description: Customer ID
        content:
          application/json:
            schema:
              type: object
              properties:
                customerID:
                  type: number
                  description: The ID of the customer
                aiPlatform:
                  type: string
                  description: >-
                    Optional. Filter stats to a single AI platform. Current
                    values: 'chatgpt' (ChatGPT), 'aioverview' (Google AI
                    Overview). Additional platforms may be added in the future.
                    If omitted, stats from all platforms are returned,
                    interleaved in each query group's data array.
              required:
                - customerID
        required: true
      responses:
        '200':
          description: Growth statistics for the customer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GrowthStatsResponse'
components:
  schemas:
    GrowthStatsResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            perScan:
              type: array
              items:
                $ref: '#/components/schemas/PerScanGroup'
              description: Per scan data for each query group
            overview:
              type: array
              items:
                $ref: '#/components/schemas/OverviewGroup'
              description: Overview data with 30-day rolling averages for each query group
          required:
            - perScan
            - overview
        version:
          type: string
          description: API version
        env:
          type: string
          description: Environment name
      required:
        - data
        - version
        - env
    PerScanGroup:
      type: object
      properties:
        queryGroupId:
          type: number
          description: Query group ID
        queryGroupTitle:
          type: string
          description: Query group title
        data:
          type: array
          items:
            $ref: '#/components/schemas/PerScanDataPoint'
          description: Per scan data points
      required:
        - queryGroupId
        - queryGroupTitle
        - data
    OverviewGroup:
      type: object
      properties:
        queryGroupId:
          type: number
          description: Query group ID
        queryGroupTitle:
          type: string
          description: Query group title
        data:
          type: array
          items:
            $ref: '#/components/schemas/OverviewDataPoint'
          description: Overview data points with 30-day rolling averages
      required:
        - queryGroupId
        - queryGroupTitle
        - data
    PerScanDataPoint:
      type: object
      properties:
        date:
          type: string
          format: date
          description: Execution date
        aiPlatform:
          type: string
          description: >-
            AI platform this scan ran against. Current values: 'chatgpt'
            (ChatGPT), 'aioverview' (Google AI Overview). Additional platforms
            may be added in the future.
        score:
          type: number
          description: Score for this scan
        executionId:
          type: number
          description: ID of the execution
      required:
        - date
        - aiPlatform
        - score
        - executionId
    OverviewDataPoint:
      type: object
      properties:
        startDate:
          type: string
          format: date
          description: Start date of the 30-day window
        endDate:
          type: string
          format: date
          description: End date of the 30-day window
        aiPlatform:
          type: string
          description: >-
            AI platform this rolling average is computed for. Current values:
            'chatgpt' (ChatGPT), 'aioverview' (Google AI Overview). Additional
            platforms may be added in the future.
        score:
          type: number
          description: Rolling average score for the 30-day period
      required:
        - startDate
        - endDate
        - aiPlatform
        - score
  securitySchemes:
    apiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````