> ## 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 Domain Stats

> This endpoint returns two datasets:

**Domain Stats**: Shows which domains appear in query results
Count: How many queries this domain was mentioned in
Percentage: What percent of total queries this domain appeared in
Category: Domain category classification

**Article Stats**: Shows which specific articles appear in query results
Count: How many queries this article was appear in. 
Percentage: What percent of total queries this article appeared in
isCustomerMentioned: Indicator whether your customer is mentioned inside the article.

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

<Accordion title="AI Platforms (`aiPlatform`)">
  Both datasets (Domain Stats and Article Stats) are aggregated across all supported AI platforms by default — each domain/article appears once with combined `count` and `percentage` across platforms. Response rows do not include an `ai_platform` field.

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

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

  Additional platforms may be added in the future.

  When `aiPlatform` is set, `count` and `percentage` in both datasets are recomputed relative to that platform only (i.e. `percentage` is over the filtered platform's queries, not the total across all platforms).

  When `executionID` is provided, `aiPlatform` is not needed because an execution already belongs to a single platform.
</Accordion>


## OpenAPI

````yaml POST /get-domain-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-domain-stats:
    post:
      description: >-
        This endpoint returns two datasets:


        **Domain Stats**: Shows which domains appear in query results

        Count: How many queries this domain was mentioned in

        Percentage: What percent of total queries this domain appeared in

        Category: Domain category classification


        **Article Stats**: Shows which specific articles appear in query results

        Count: How many queries this article was appear in. 

        Percentage: What percent of total queries this article appeared in

        isCustomerMentioned: Indicator whether your customer is mentioned inside
        the article.


        Results include executions from all supported AI platforms (e.g.
        ChatGPT, Google AI Overview) by default.
      requestBody:
        description: Get domain stats parameters
        content:
          application/json:
            schema:
              type: object
              properties:
                customerID:
                  type: number
                  description: The ID of the customer
                queryGroupID:
                  type: number
                  description: The ID of the query group
                startDate:
                  type: string
                  format: date
                  description: Start date in yyyy-mm-dd format
                endDate:
                  type: string
                  format: date
                  description: End date in yyyy-mm-dd format
                executionID:
                  type: number
                  description: The ID of the execution
                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 are aggregated across all platforms. Not
                    needed when 'executionID' is provided, since an execution
                    already belongs to a single platform.
              required:
                - customerID
        required: true
      responses:
        '200':
          description: Domain and article statistics
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainStatsResponse'
components:
  schemas:
    DomainStatsResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            domainStats:
              type: array
              items:
                $ref: '#/components/schemas/DomainStat'
              description: List of domain statistics
            articleStats:
              type: array
              items:
                $ref: '#/components/schemas/ArticleStat'
              description: List of article statistics
          required:
            - domainStats
            - articleStats
        version:
          type: string
          description: API version
        env:
          type: string
          description: Environment name
      required:
        - data
        - version
        - env
    DomainStat:
      type: object
      properties:
        domain:
          type: string
          description: Domain name
        count:
          type: number
          description: Number of occurrences
        percentage:
          type: number
          description: Percentage of occurrences
        category:
          type: string
          nullable: true
          description: Category of the domain
      required:
        - domain
        - count
        - percentage
    ArticleStat:
      type: object
      properties:
        url:
          type: string
          format: uri
          description: Article URL
        count:
          type: number
          description: Number of occurrences
        percentage:
          type: number
          description: Percentage of occurrences
        isCustomerMentioned:
          type: boolean
          description: Whether the customer is mentioned in this article
      required:
        - url
        - count
        - percentage
        - isCustomerMentioned
  securitySchemes:
    apiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````