> ## 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 Query Groups

> Retrieve query groups associated with a customer.
A query group represents a set of related queries for a specific product line or campaign. Customers can have multiple query groups.

This endpoint returns keywords, scan location, and a complete history of all scans with their scores and dates.

<Accordion title="Query Group Statuses">
  **Active** — live, scanned on schedule, data available via API.

  **Pause** — scanning paused, still accessible via API, can be resumed.

  **Not Active** — fully disabled, no scanning, not available via API.
</Accordion>

<Accordion title="What is an Execution?">
  An execution is a single scan/run of all queries in a query group against a specific AI platform, producing visibility scores, competitor mentions, and source citations for each query. Executions run periodically and their results over time power the growth tracking and trend analysis.

  Each execution targets a single AI platform, indicated by the `ai_platform` field. A query group can have multiple executions per run — one per supported platform.
</Accordion>

<Accordion title="AI Platforms (`ai_platform`)">
  Each execution includes an `ai_platform` field indicating which AI platform it ran against. Current values:

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

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


## OpenAPI

````yaml POST /get-customer-query-groups
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-query-groups:
    post:
      description: >-
        Retrieve query groups associated with a customer.

        A query group represents a set of related queries for a specific product
        line or campaign. Customers can have multiple query groups.


        This endpoint returns keywords, scan location, and a complete history of
        all scans with their scores and dates.
      requestBody:
        description: Customer ID
        content:
          application/json:
            schema:
              type: object
              properties:
                customerID:
                  type: number
                  description: The ID of the customer
              required:
                - customerID
        required: true
      responses:
        '200':
          description: List of query groups for the customer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryGroupsResponse'
components:
  schemas:
    QueryGroupsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/QueryGroup'
          description: List of query groups
        version:
          type: string
          description: API version
        env:
          type: string
          description: Environment name
      required:
        - data
        - version
        - env
    QueryGroup:
      type: object
      properties:
        query_group_id:
          type: number
          description: Query group ID
        group_type:
          type: string
          description: Type of the group
        query_group_name:
          type: string
          description: Name of the query group
        created_time:
          type: string
          format: date-time
          description: Creation timestamp
        keywords:
          type: string
          description: Keywords for the group
        num_of_queries:
          type: number
          nullable: true
          description: Number of queries
        website_url:
          type: string
          format: uri
          description: Website URL
        run_from_location:
          type: string
          description: Location to run from. Default is 'us'
        executions:
          type: array
          items:
            $ref: '#/components/schemas/Execution'
          description: List of executions
      required:
        - query_group_id
        - group_type
        - query_group_title
        - created_time
        - keywords
        - website_url
        - run_from_location
        - executions
    Execution:
      type: object
      properties:
        id:
          type: number
          description: Execution ID
        title:
          type: string
          description: Execution title
        execution_date:
          type: string
          format: date
          description: Date of execution
        score:
          type: number
          description: Execution score
        ai_platform:
          type: string
          description: >-
            AI platform this execution ran against. Current values: 'chatgpt'
            (ChatGPT), 'aioverview' (Google AI Overview). Additional platforms
            may be added in the future.
      required:
        - id
        - title
        - execution_date
        - score
        - ai_platform
  securitySchemes:
    apiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````