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

# List merchants with citation metrics

> Returns a paginated, sortable list of merchants cited in shopping AI responses for the project, with citation and offer-quality metrics across all merchants, plus reach metrics scoped to the requested brands.



## OpenAPI

````yaml https://api.mentionlab.io/api/docs-json post /api/v1/analytics/shopping/merchants
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/shopping/merchants:
    post:
      tags:
        - Analytics - Shopping
      summary: List merchants with citation metrics
      description: >-
        Returns a paginated, sortable list of merchants cited in shopping AI
        responses for the project, with citation and offer-quality metrics
        across all merchants, plus reach metrics scoped to the requested brands.
      operationId: ShoppingV1Controller_getMerchants_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/ShoppingAllMerchantsDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShoppingAllMerchantsResponse'
        '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:
    ShoppingAllMerchantsDto:
      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
        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
        entityIds:
          description: >-
            Entity IDs for brand-specific metrics (defaults to primary
            non-blacklisted).
          example:
            - a1b2c3d4-e5f6-7890-abcd-ef1234567890
          type: array
          items:
            type: string
        merchantName:
          type: string
          description: Case-insensitive substring match on merchant name.
          example: amazon
        sort:
          description: >-
            Sort order. Allowed fields: merchantName, citationRate,
            citationShare, entityCitationShare, trueReach, mentionCount.
          example:
            - field: citationShare
              direction: DESC
          type: array
          items:
            $ref: '#/components/schemas/SortOptions'
    ShoppingAllMerchantsResponse:
      type: object
      properties:
        totalResponses:
          type: number
          description: Total AI responses in filtered scope (denominator for citationRate).
          example: 365
        totalMerchantCitations:
          type: number
          description: >-
            Sum of mentionCount across all merchants (denominator for
            citationShare).
          example: 450
        totalBrandMentions:
          type: number
          description: >-
            Sum of brand-matched mention counts across all merchants
            (denominator for entityCitationShare).
          example: 200
        merchants:
          description: Merchant list, sorted and paginated.
          type: array
          items:
            $ref: '#/components/schemas/ShoppingMerchantPoint'
        page:
          description: Pagination metadata.
          allOf:
            - $ref: '#/components/schemas/Paging'
      required:
        - totalResponses
        - totalMerchantCitations
        - totalBrandMentions
        - merchants
        - 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
    ShoppingMerchantPoint:
      type: object
      properties:
        merchantId:
          type: string
          description: Merchant UUID.
          example: 550e8400-e29b-41d4-a716-446655440000
        merchantName:
          type: string
          description: Merchant display name.
          example: Amazon
        domain:
          type: string
          description: Merchant domain if known.
          example: amazon.com
          nullable: true
        mentionCount:
          type: number
          description: Number of distinct products this merchant is cited for.
          example: 45
        citationRate:
          type: number
          description: >-
            Citation rate — how often this merchant appears across all AI
            responses. Formula: (distinct AI responses citing this merchant /
            totalResponses) × 100.
          example: 28
        citationShare:
          type: number
          description: >-
            Citation share — this merchant's portion of all merchant citations.
            Formula: (mentionCount / totalMerchantCitations) × 100.
          example: 15
        entityCitationShare:
          type: number
          description: >-
            Entity citation share — this merchant's portion of all brand-matched
            merchant rows. Formula: (brandMentionCount / totalBrandMentions) ×
            100. Values across all merchants sum to 100%. Shows which merchants
            drive brand presence.
          example: 22.5
        trueReach:
          type: number
          description: >-
            True reach — percentage of this merchant's product rows that mention
            the brand. Formula: (brandMentionCount / mentionCount) × 100. A
            per-merchant quality indicator of brand alignment.
          example: 40
        aboveFoldShare:
          type: number
          description: >-
            Above-fold share — percentage of this merchant's offer appearances
            shown by default (not hidden behind "Show more offers"). Formula:
            (appearances above the fold / appearances with a known fold flag) ×
            100. Null when no appearance has a known fold flag.
          example: 62.5
          nullable: true
        avgPosition:
          type: number
          description: >-
            Average 1-based offer rank for this merchant across appearances
            (lower is more prominent). Null when no appearance has a known
            position.
          example: 2.4
          nullable: true
        freeShippingShare:
          type: number
          description: >-
            Free-shipping share — percentage of this merchant's offers that ship
            free. Formula: (offers with shippingPrice = 0 / offers with a known
            shipping price) × 100. Null when no offer has a known shipping
            price.
          example: 40
          nullable: true
        avgShippingPrice:
          type: number
          description: >-
            Average shipping cost across this merchant's offers with a known
            price (free offers count as 0). Currency-naive — mixes currencies if
            the project spans several, same as price fields. Null when no offer
            has a known shipping price.
          example: 4.95
          nullable: true
        inStockShare:
          type: number
          description: >-
            In-stock share — percentage of this merchant's offers marked
            available. Formula: (offers available / offers with a known
            availability flag) × 100. Null when no offer has a known
            availability flag.
          example: 95
          nullable: true
      required:
        - merchantId
        - merchantName
        - domain
        - mentionCount
        - citationRate
        - citationShare
        - entityCitationShare
        - trueReach
        - aboveFoldShare
        - avgPosition
        - freeShippingShare
        - avgShippingPrice
        - inStockShare
    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

````