> ## 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.

# Create Query Group

> Creates a new Query Group for a customer.

A Query Group represents a set of related queries for a specific product line or campaign. Customers can have multiple Query Groups. For example, a cybersecurity company might have separate Query Groups for "SASE", "Network Security", and "Endpoint Protection", each tracking different keywords and AI visibility metrics independently.

Query Groups allow segmentation of AI visibility across product lines, geographies (e.g., "UK-focused buying queries" vs "US-based comparisons"), or verticals/use cases (e.g., "Best AI tools for legal firms" vs "Best tools for startups").

Once created, the system will begin tracking AI visibility for the provided keywords under this Query Group.

**Note:** Creating a Query Group consumes one credit from the organization's quota.



## OpenAPI

````yaml POST /create-query-group
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:
  /create-query-group:
    post:
      description: >-
        Creates a new Query Group for a customer.


        A Query Group represents a set of related queries for a specific product
        line or campaign. Customers can have multiple Query Groups. For example,
        a cybersecurity company might have separate Query Groups for "SASE",
        "Network Security", and "Endpoint Protection", each tracking different
        keywords and AI visibility metrics independently.


        Query Groups allow segmentation of AI visibility across product lines,
        geographies (e.g., "UK-focused buying queries" vs "US-based
        comparisons"), or verticals/use cases (e.g., "Best AI tools for legal
        firms" vs "Best tools for startups").


        Once created, the system will begin tracking AI visibility for the
        provided keywords under this Query Group.


        **Note:** Creating a Query Group consumes one credit from the
        organization's quota.
      requestBody:
        description: Query Group details
        content:
          application/json:
            schema:
              type: object
              properties:
                customerID:
                  type: number
                  description: >-
                    The ID of the customer to create the Query Group for. Must
                    be a valid, existing customer that belongs to the caller's
                    organization.
                name:
                  type: string
                  description: >-
                    Display name for the Query Group (e.g., "SASE", "Network
                    Security"). Must be non-empty.
                websiteUrl:
                  type: string
                  description: >-
                    The website URL associated with this Query Group. Does not
                    require http(s):// prefix — bare domains like mindshare.so
                    are valid.
                keywords:
                  type: string
                  description: >-
                    Comma-separated list of SEO high-intent keywords to track
                    (e.g., "residential proxies, rotating proxies, static
                    proxies"). Each keyword must be non-empty after trimming.
                language:
                  type: string
                  description: >-
                    The language for the keywords (case-insensitive). Supported
                    languages: English, Portuguese, Spanish, German, French,
                    Italian, Dutch, Swedish, Polish, Norwegian, Danish, Finnish,
                    Greek, Hungarian, Czech, Romanian, Ukrainian, Slovak,
                    Bulgarian, Croatian, Serbian, Slovenian, Lithuanian,
                    Latvian, Estonian, Icelandic, Belarusian, Bosnian, Albanian,
                    Macedonian, Georgian, Armenian, Azerbaijani, Hindi,
                    Japanese, Korean, Indonesian, Urdu, Bengali, Filipino,
                    Vietnamese, Thai, Burmese, Chinese, Malay, Uzbek, Kazakh,
                    Turkmen, Tajik, Kyrgyz, Sinhala, Khmer, Lao, Hebrew, Arabic,
                    Turkish, Swahili
                countryCode:
                  type: string
                  description: >-
                    Two-letter country code indicating the location context for
                    running queries (e.g., "us", "gb", "il"). Supported codes:
                    us, ca, br, mx, ar, co, cl, pe, ve, ec, bo, uy, pa, cr, do,
                    jm, de, gb, fr, it, es, nl, ch, se, pl, be, at, no, dk, ie,
                    fi, pt, gr, hu, cz, ro, ua, lu, sk, bg, hr, rs, si, lt, lv,
                    ee, is, by, md, ba, al, mk, cy, ge, am, az, im, li, in, jp,
                    kr, id, pk, bd, ph, vn, th, mm, tw, my, hk, sg, uz, kz, tm,
                    tj, kg, lk, kh, la, mo, bn, il, ae, sa, za, ng, eg, tr, iq,
                    qa, kw, om, jo, ma, ke, gh, tz, cm, tn, zw, bw, mz, mw, zm,
                    sl, cg, au, nz
              required:
                - customerID
                - name
                - websiteUrl
                - keywords
                - language
                - countryCode
        required: true
      responses:
        '200':
          description: Query Group created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateQueryGroupResponse'
components:
  schemas:
    CreateQueryGroupResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            query_group_id:
              type: number
              description: The ID of the newly created Query Group
          required:
            - query_group_id
          description: Created Query Group details
        version:
          type: string
          description: API version
        env:
          type: string
          description: Environment name
      required:
        - data
        - version
        - env
  securitySchemes:
    apiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````