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

# Source domains with citation & brand-reach metrics

> Returns the project's cited source domains with citation and brand-reach metrics over the selected date range; pass `limit` for a top-N view.



## OpenAPI

````yaml https://api.mentionlab.io/api/docs-json post /api/v1/analytics/sources/domains
openapi: 3.0.0
info:
  title: MentionLab Public API v0.3.4-rc
  description: ''
  version: 0.3.4-rc
  contact: {}
servers:
  - url: https://api.mentionlab.io
security: []
tags: []
paths:
  /api/v1/analytics/sources/domains:
    post:
      tags:
        - Analytics - Sources
      summary: Source domains with citation & brand-reach metrics
      description: >-
        Returns the project's cited source domains with citation and brand-reach
        metrics over the selected date range; pass `limit` for a top-N view.
      operationId: SourcesV1Controller_getDomains_v1
      parameters:
        - name: x-project-id
          in: header
          description: Project ID to specify the project context
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SourceAllDomainsDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SourceAllDomainsResponse'
        '400':
          description: >-
            The request failed validation — the body, query or path parameters
            are malformed or out of range.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: The request is missing valid authentication credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '403':
          description: >-
            The authenticated principal lacks the required permission, or access
            to the requested organisation/project.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
components:
  schemas:
    SourceAllDomainsDto:
      type: object
      properties:
        startDate:
          type: string
          description: Start date (inclusive)
          example: '2025-01-01'
        endDate:
          type: string
          description: End date (exclusive)
          example: '2025-02-01'
        countries:
          description: Filter by country codes
          example:
            - BE
            - FR
          type: array
          items:
            type: string
        languages:
          description: Filter by language codes
          example:
            - en
            - fr
          type: array
          items:
            type: string
        models:
          description: Filter by AI models
          example:
            - gpt-4o
            - claude-3-5-sonnet
          type: array
          items:
            type: string
        queryIds:
          description: Filter by query IDs
          example:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
          type: array
          items:
            type: string
        hasSources:
          type: string
          description: >-
            Filter by source presence: "sources" (only with sources),
            "no_sources" (only without), "all" (no filter). Legacy true/false
            values are still accepted.
          enum:
            - all
            - sources
            - no_sources
        hasShopping:
          type: string
          description: >-
            Filter by shopping presence: "shopping" (only with shopping),
            "no_shopping" (only without), "all" (no filter). Legacy true/false
            values are still accepted.
          enum:
            - all
            - shopping
            - no_shopping
        queryTagIds:
          description: Filter by query tag IDs (numeric — bigint column)
          example:
            - '42'
          type: array
          items:
            type: string
        execTagIds:
          description: Filter by execution tag IDs
          example:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
          type: array
          items:
            type: string
        queryTagGroupIds:
          description: >-
            Filter by query tag group IDs — matches rows carrying any tag filed
            under a selected group. Combines with queryTagIds per queryTagMode.
          example:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
          type: array
          items:
            type: string
        execTagGroupIds:
          description: >-
            Filter by execution tag group IDs — matches rows carrying any tag
            filed under a selected group. Combines with execTagIds per
            execTagMode.
          example:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
          type: array
          items:
            type: string
        queryTypes:
          type: array
          description: >-
            Filter by query type. Include "untyped" to also match queries
            without a type. Results from since-deleted queries are excluded when
            this filter is set.
          items:
            type: string
            enum:
              - comparative
              - informative
              - perception
              - untyped
        queryTagMode:
          type: string
          description: >-
            Query tag matching mode: "or" matches ANY tag (default), "and"
            matches ALL tags.
          enum:
            - and
            - or
          default: or
        execTagMode:
          type: string
          description: >-
            Execution tag matching mode: "or" matches ANY tag (default), "and"
            matches ALL tags.
          enum:
            - and
            - or
          default: or
        timezone:
          type: string
          description: >-
            IANA timezone for date bucketing and filtering (e.g.
            "Europe/Brussels"). Defaults to UTC.
          example: Europe/Brussels
          default: UTC
        groupBy:
          type: string
          description: >-
            Row grouping level for entity results. "none" = one row per entity,
            "division" = one row per division (entities not in a division get
            their own row), "group" = one row per top-level group (divisions
            roll up into their group). Defaults to "none".
          enum:
            - none
            - division
            - group
        groupByEntityGroup:
          type: boolean
          description: >-
            Deprecated — use groupBy instead. true is equivalent to
            groupBy="group".
          deprecated: true
          example: false
        showAllEntities:
          type: boolean
          description: >-
            Include entities that have only ever been seen in a single AI
            response. These are mostly one-off extraction noise and are hidden
            by default.
          example: false
        tlds:
          description: >-
            Restrict to source domains whose ICANN public suffix is one of these
            values. Matched exactly against the full suffix (e.g. "co.uk", not
            "uk").
          example:
            - be
            - co.uk
          type: array
          items:
            type: string
        entityIds:
          description: >-
            Entity IDs to compute brand metrics for (defaults to primary
            non-blacklisted)
          example:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
          type: array
          items:
            type: string
        limit:
          type: number
          description: Max domains to return (omit for all)
          example: 50
        page:
          type: number
          description: Page number (1-based).
          default: 1
          example: 1
        pageSize:
          type: number
          description: Items per page (max 200).
          default: 50
          example: 50
        categorySlugs:
          description: >-
            Filter to domains whose resolved source-type category matches one of
            these slugs. Pass 'other' to match uncategorised domains.
          example:
            - news_media
            - community_ugc
          type: array
          items:
            type: string
        search:
          type: string
          description: >-
            Case-insensitive substring filter on the domain name (e.g. "reddit"
            matches reddit.com).
          example: reddit
        sort:
          description: >-
            Sorting criteria applied to the returned domains. Each entry pairs a
            sortable field (e.g. domain, resultCount, citationRate,
            citationShare, pageCount, brandPageCount, entityCitationShare,
            presence, brandResultCount, trueReach) with a sort direction.
          example:
            - field: citationShare
              direction: desc
          type: array
          items:
            $ref: '#/components/schemas/SortOptions'
    SourceAllDomainsResponse:
      type: object
      properties:
        totalResponses:
          type: number
          description: >-
            Total number of AI responses in the filtered scope. Used as the
            denominator for citationRate.
          example: 365
        totalCitations:
          type: number
          description: >-
            Sum of resultCount across all source domains. Used as the
            denominator for citationShare. Note: this can exceed totalResponses
            because one response may cite multiple domains.
          example: 712
        totalBrandPages:
          type: number
          description: >-
            Sum of brandPageCount across all source domains. Used as the
            denominator for entityCitationShare.
          example: 200
        sources:
          description: >-
            Per-domain statistics with all citation and brand reach metrics,
            ordered by resultCount descending (unless sorted).
          type: array
          items:
            $ref: '#/components/schemas/SourceAllDomainsPoint'
        page:
          description: Pagination metadata.
          allOf:
            - $ref: '#/components/schemas/Paging'
      required:
        - totalResponses
        - totalCitations
        - totalBrandPages
        - sources
        - page
    ApiErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code of the error.
          example: 400
        message:
          type: string
          description: >-
            Human-readable description of the error. Validation failures return
            an array of per-field validation errors instead of a single string.
          example: Validation failed
        error:
          type: string
          description: Short name of the HTTP error.
          example: Bad Request
      required:
        - statusCode
    SortOptions:
      type: object
      properties:
        field:
          type: string
          description: Field name to sort by
        direction:
          type: string
          enum:
            - ASC
            - DESC
          description: Sort direction
      required:
        - field
        - direction
    SourceAllDomainsPoint:
      type: object
      properties:
        sourceDomainId:
          type: string
          description: >-
            Source domain UUID. Use as sourceDomainId for domain-entities and
            domain-urls endpoints.
          example: 01234567-89ab-cdef-0123-456789abcdef
        domain:
          type: string
          description: Root domain name (e.g. reddit.com).
          example: reddit.com
        categorySlug:
          type: string
          description: >-
            Source-type category slug for this domain. Resolves the
            project-scoped override first, then the global default; null when
            uncategorised.
          nullable: true
          example: news_media
        categoryLabel:
          type: string
          description: Human-readable label for categorySlug; null when uncategorised.
          nullable: true
          example: News & Media
        resultCount:
          type: number
          description: >-
            Number of distinct AI responses that cited at least one page from
            this domain. A single response citing 3 reddit.com pages counts as
            1.
          example: 102
        citationRate:
          type: number
          description: >-
            Citation rate — how often this domain appears across ALL AI
            responses. Formula: (resultCount / totalResponses) × 100.
          example: 28
        citationShare:
          type: number
          description: >-
            Citation share — this domain's portion of all source citations.
            Formula: (resultCount / totalCitations) × 100. Values across all
            domains sum to 100%.
          example: 14.3
        pageCount:
          type: number
          description: >-
            Total number of unique page URLs cited from this domain. The same
            URL cited by multiple AI responses is counted once.
          example: 178
        brandPageCount:
          type: number
          description: >-
            Number of unique page URLs from this domain where the selected
            entities (brand) were mentioned at least once. Subset of pageCount.
          example: 45
        entityCitationShare:
          type: number
          description: >-
            Entity citation share — this domain's portion of ALL brand-mentioned
            pages across all domains. Formula: (brandPageCount /
            totalBrandPages) × 100. Values across all domains sum to 100%. Shows
            which sources drive brand presence.
          example: 22.5
        presence:
          type: number
          description: >-
            Presence — the percentage of this domain's cited pages that also
            mention the brand. Formula: (brandPageCount / pageCount) × 100. A
            per-domain quality indicator of brand alignment.
          example: 25.3
        brandResultCount:
          type: number
          description: >-
            Number of distinct AI responses where this domain cited at least one
            brand-mentioned page. Subset of resultCount — only responses where
            the domain serves as a brand citation source.
          example: 38
        trueReach:
          type: number
          description: >-
            True Reach — of this domain's total citations, what percentage
            reference the brand. Formula: (brandCitationCount /
            totalCitationCount) × 100.
          example: 10.4
      required:
        - sourceDomainId
        - domain
        - categorySlug
        - categoryLabel
        - resultCount
        - citationRate
        - citationShare
        - pageCount
        - brandPageCount
        - entityCitationShare
        - presence
        - brandResultCount
        - trueReach
    Paging:
      type: object
      properties:
        totalRecords:
          type: number
        limit:
          type: number
        currentPage:
          type: number
        totalPages:
          type: number
        nextPage:
          type: number
        prevPage:
          type: number
      required:
        - totalRecords
        - limit
        - currentPage
        - totalPages
        - nextPage
        - prevPage

````