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

# List Domain Groups

> List all domain groups in the workspace. A domain group merges analytics for multiple entities that represent the same brand into a single entry.

Provide the optional `groupId` query parameter to fetch a single group by its ID, or `entityId` to filter to groups scoped to a specific entity tracking.



## OpenAPI

````yaml get /domain-groups
openapi: 3.1.0
info:
  title: Geogen API
  description: >-
    API for accessing LLM visibility data, managing entities, and tracking AI
    mentions.
  version: 1.0.0
servers:
  - url: https://api.geogen.io/v1
    description: Production server
security:
  - bearerAuth: []
paths:
  /domain-groups:
    get:
      tags:
        - Domain Groups
      summary: List Domain Groups
      description: >-
        List all domain groups in the workspace. A domain group merges analytics
        for multiple entities that represent the same brand into a single entry.


        Provide the optional `groupId` query parameter to fetch a single group
        by its ID, or `entityId` to filter to groups scoped to a specific entity
        tracking.
      operationId: listDomainGroups
      parameters:
        - name: groupId
          in: query
          required: false
          schema:
            type: string
          description: When provided, returns a single domain group by ID.
        - name: entityId
          in: query
          required: false
          schema:
            type: string
          description: >-
            When provided, only returns groups scoped to this entity tracking
            (or legacy groups that have no tracking scope).
      responses:
        '200':
          description: Domain groups retrieved successfully.
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    description: >-
                      Returned when neither groupId nor an empty result is
                      requested.
                    properties:
                      success:
                        type: boolean
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/DomainGroup'
                      count:
                        type: number
                  - type: object
                    description: Returned when `groupId` is supplied.
                    properties:
                      success:
                        type: boolean
                      data:
                        $ref: '#/components/schemas/DomainGroup'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Domain group not found (only when `groupId` is supplied).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  retryAfter:
                    type: number
components:
  schemas:
    DomainGroup:
      type: object
      description: >-
        A group of entities that represent the same brand. Analytics for grouped
        entities are merged across all pages and responses.
      properties:
        id:
          type: string
          description: Domain group ID.
        name:
          type: string
          description: Display name for the group.
        primaryEntityUuid:
          type: string
          description: UUID of the entity whose name and favicon represent the group.
        entityTrackingId:
          type: string
          nullable: true
          description: >-
            Optional entity-tracking scope. When set, the group only applies to
            analytics generated under this specific tracking.
        entities:
          type: array
          description: >-
            Entities included in the group. The entity with `isPrimary=true`
            represents the group.
          items:
            $ref: '#/components/schemas/DomainGroupEntity'
        createdAt:
          type: number
          description: Creation timestamp (ms).
        updatedAt:
          type: number
          description: Last update timestamp (ms).
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
    DomainGroupEntity:
      type: object
      description: A single entity inside a domain group, enriched with display data.
      properties:
        entityId:
          type: string
          nullable: true
          description: >-
            Tracking ID for the entity in this workspace (null when the entity
            is not tracked here, e.g. a competitor).
        entityUuid:
          type: string
          description: Stable, system-wide entity UUID.
        name:
          type: string
          nullable: true
          description: Entity display name.
        target:
          type: string
          nullable: true
          description: Entity domain or term.
        faviconUrl:
          type: string
          nullable: true
          description: Favicon URL for the entity, if known.
        isPrimary:
          type: boolean
          description: >-
            Whether this entity is the group's primary entity (its name/favicon
            represent the group).
        inWorkspace:
          type: boolean
          description: Whether this entity is tracked in the current workspace.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'API key authentication. Format: Bearer wsk_your_api_key'

````