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

# Citation breakdown by ICANN public suffix (TLD)

> Groups source citations by the ICANN public suffix of the cited domain (e.g. "be", "co.uk", "com"), with citationShare and citationRate per TLD. Useful for slicing sources by country / ccTLD.



## OpenAPI

````yaml https://api.mentionlab.io/api/docs-json post /api/analytics/sources/tld-breakdown
openapi: 3.0.0
info:
  title: MentionLab Public API v0.2.8-rc.6
  description: ''
  version: 0.2.8-rc.6
  contact: {}
servers:
  - url: https://api.mentionlab.io
security: []
tags: []
paths:
  /api/analytics/sources/tld-breakdown:
    post:
      tags:
        - Analytics - Sources
      summary: Citation breakdown by ICANN public suffix (TLD)
      description: >-
        Groups source citations by the ICANN public suffix of the cited domain
        (e.g. "be", "co.uk", "com"), with citationShare and citationRate per
        TLD. Useful for slicing sources by country / ccTLD.
      operationId: SourcesController_getTldBreakdown
      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/SourceTldBreakdownDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SourceTldBreakdownResponse'
        '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:
    SourceTldBreakdownDto:
      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
          example:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
          type: array
          items:
            type: string
        execTagIds:
          description: Filter by execution tag IDs
          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
        size:
          type: number
          description: Max TLDs to return (default 50, max 200)
          default: 50
          example: 50
    SourceTldBreakdownResponse:
      type: object
      properties:
        totalCitations:
          type: number
          description: Total source citations across all returned TLDs.
          example: 769
        totalResponses:
          type: number
          description: AI responses matching the request filters.
          example: 1500
        tlds:
          description: Breakdown of citations by ICANN public suffix.
          type: array
          items:
            $ref: '#/components/schemas/SourceTldBreakdownPoint'
      required:
        - totalCitations
        - totalResponses
        - tlds
    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
    SourceTldBreakdownPoint:
      type: object
      properties:
        tld:
          type: string
          description: >-
            ICANN public suffix of the cited domain (e.g. "be", "co.uk", "com").
            Null when the domain has no recognised public suffix.
          example: be
          nullable: true
        resultCount:
          type: number
          description: Distinct AI responses that cited a domain with this TLD.
          example: 142
        domainCount:
          type: number
          description: Distinct domains with this TLD that received a citation.
          example: 23
        pageCount:
          type: number
          description: Total page citations from domains with this TLD.
          example: 318
        citationShare:
          type: number
          description: >-
            This TLD's share of all source citations (%). Sums to 100% across
            returned TLDs.
          example: 18.5
        citationRate:
          type: number
          description: Percentage of all AI responses that cite this TLD.
          example: 9.4
      required:
        - tld
        - resultCount
        - domainCount
        - pageCount
        - citationShare
        - citationRate

````