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

# Merchants

This report gives merchant data for ChatGPT shopping results. `group_by`
selects one of three views. `merchant_share` is the merchant's share of offers.
`merchant_visibility` is the merchant's share of the runs it appears in. These
are two different measures.

### Views

* **Distribution** (omit `group_by`) — one row for each merchant. Metrics: `merchant_share`, `merchant_share_rank`, `merchant_visibility`, `merchant_visibility_rank`. To get a time series, add `date`.
* **Brand share** (`group_by: ["brand"]`) — one row for each merchant and brand. Metrics: `merchant_share`, `brand_share` (the brand's share in the merchant), `visibility_rank`.
* **Top products** (`group_by: ["product"]`) — one row for each merchant and product. Metrics: `merchant_visibility`, `product_visibility`, `product_rank`.

**Filter fields:** `topic`, `region`, `persona`, `prompt`, `tag`. The
distribution view also accepts a `brand` filter.

### Rules

* Use the metrics that are valid for the view. Other metrics return `422`.
* Group by `brand` **or** `product`. Do not use both.
* `date` is available in the distribution view only. `group_by: ["brand", "date"]` or `["product", "date"]` returns `422`.
* The `brand` filter is available in the distribution view only.

<Note>
  In the distribution view, `merchant_visibility` and `merchant_visibility_rank`
  are run-appearance metrics. The report gets them from a second query and adds
  them to each merchant. Request them only when you need them.
</Note>

<Note>
  Shopping data comes from ChatGPT only. No shopping report has a `model`
  group\_by or a `model` filter.
</Note>

<Note>
  The v2 reports share one request shape. For the filter tree, grouping, and
  pagination, see [Filtering & concepts](/rest-api/reports/reports-v2-overview).
</Note>

<Accordion title="Streaming (SSE) variant (same body, /stream)">
  `POST /v2/reports/shopping/merchants/stream` uses the **same request body**.
  It returns [Server-Sent Events](https://developer.mozilla.org/docs/Web/API/Server-sent_events):
  one `summary` event (the `info` block), then one `result` event for each row.
  The stream rejects `limit` and `cursor`. It returns all rows by default. To
  set a maximum, use `max_results` (maximum 50000).
</Accordion>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.tryprofound.com/v2/reports/shopping/merchants \
    -H "X-API-Key: <your-api-key>" \
    -H "Content-Type: application/json" \
    -d '{
      "category_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "start_date": "2026-06-01",
      "end_date": "2026-06-30",
      "metrics": ["merchant_share", "merchant_share_rank", "merchant_visibility", "merchant_visibility_rank"],
      "limit": 10
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "info": {
      "total_results": 24,
      "count": 10,
      "next_cursor": "eyJvZmZzZXQiOjEwfQ==",
      "view": "distribution",
      "models": ["ChatGPT"],
      "metrics": ["merchant_share", "merchant_share_rank", "merchant_visibility", "merchant_visibility_rank"],
      "start_date": "2026-06-01",
      "end_date": "2026-06-30",
      "filter": null
    },
    "data": [
      {
        "merchant_name": "Example Retailer",
        "merchant_share": 0.25,
        "merchant_share_rank": 1,
        "merchant_visibility": 0.40,
        "merchant_visibility_rank": 1
      }
    ]
  }
  ```
</ResponseExample>


## OpenAPI

````yaml POST /v2/reports/shopping/merchants
openapi: 3.1.0
info:
  title: External API
  version: 8a280fe080bc62612cfa4d9ac5672343e0a2f720
servers:
  - url: https://api.tryprofound.com
    description: Production Server
security: []
paths:
  /v2/reports/shopping/merchants:
    post:
      tags:
        - Reports
        - Reports
      summary: Query Shopping Merchants V2
      operationId: query_shopping_merchants_v2_v2_reports_shopping_merchants_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShoppingMerchantsV2Query'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShoppingMerchantsV2Response'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - BearerAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Profound from '@profoundai/client';

            const client = new Profound({
              apiKey: process.env['PROFOUND_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.reports.shopping.merchants({
              category_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
              end_date: 'end_date',
              start_date: 'start_date',
            });

            console.log(response.data);
        - lang: Python
          source: |-
            import os
            from profound import Profound

            client = Profound(
                api_key=os.environ.get("PROFOUND_API_KEY"),  # This is the default and can be omitted
            )
            response = client.reports.shopping.merchants(
                category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                end_date="end_date",
                start_date="start_date",
            )
            print(response.data)
components:
  schemas:
    ShoppingMerchantsV2Query:
      properties:
        category_id:
          type: string
          format: uuid
          title: Category Id
        start_date:
          type: string
          title: Start Date
          description: YYYY-MM-DD, ET, inclusive
        end_date:
          type: string
          title: End Date
          description: YYYY-MM-DD, ET, inclusive
        group_by:
          items:
            type: string
            enum:
              - date
              - brand
              - product
          type: array
          title: Group By
          description: >-
            `[]` = distribution; `[brand]` = brand share within each merchant;
            `[product]` = top products per merchant. `date` (distribution only)
            adds a time series.
        metrics:
          anyOf:
            - items:
                type: string
                enum:
                  - merchant_share
                  - merchant_share_rank
                  - merchant_visibility
                  - merchant_visibility_rank
                  - visibility_rank
                  - brand_share
                  - product_visibility
                  - product_rank
              type: array
            - type: 'null'
          title: Metrics
          description: Defaults to the chosen view's metrics; must be valid for that view.
        interval:
          type: string
          enum:
            - day
            - week
            - month
          title: Interval
          default: day
        filter:
          anyOf:
            - $ref: '#/components/schemas/FilterNode'
            - type: 'null'
        limit:
          anyOf:
            - type: integer
              maximum: 50
              exclusiveMinimum: 0
            - type: 'null'
          title: Limit
          description: Page size; default 10, max 50.
        max_results:
          anyOf:
            - type: integer
              maximum: 50000
              exclusiveMinimum: 0
            - type: 'null'
          title: Max Results
          description: 'Stream endpoint only: cap streamed rows.'
        cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Cursor
      additionalProperties: false
      type: object
      required:
        - category_id
        - start_date
        - end_date
      title: ShoppingMerchantsV2Query
    ShoppingMerchantsV2Response:
      properties:
        info:
          $ref: '#/components/schemas/ShoppingMerchantsV2Info'
        data:
          items:
            $ref: '#/components/schemas/ShoppingMerchantRow'
          type: array
          title: Data
      type: object
      required:
        - info
        - data
      title: ShoppingMerchantsV2Response
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    FilterNode:
      properties:
        and:
          anyOf:
            - items:
                $ref: '#/components/schemas/FilterNode'
              type: array
            - type: 'null'
          title: And
        or:
          anyOf:
            - items:
                $ref: '#/components/schemas/FilterNode'
              type: array
            - type: 'null'
          title: Or
        not:
          anyOf:
            - $ref: '#/components/schemas/FilterNode'
            - type: 'null'
        field:
          anyOf:
            - type: string
            - type: 'null'
          title: Field
        op:
          anyOf:
            - type: string
            - type: 'null'
          title: Op
        value:
          title: Value
      additionalProperties: false
      type: object
      title: FilterNode
      description: A leaf (`field`/`op`/`value`) or an `and`/`or`/`not` group.
    ShoppingMerchantsV2Info:
      properties:
        total_results:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Results
          description: >-
            Total rows matching the query before pagination (null when not
            computed).
        count:
          type: integer
          title: Count
          description: Number of rows returned in `data` for this page.
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
          description: Opaque cursor for the next page; null on the last page.
        models:
          items:
            type: string
          type: array
          title: Models
          description: Display names of the models the report covers.
        start_date:
          type: string
          title: Start Date
          description: Echoed request start date (YYYY-MM-DD, ET).
        end_date:
          type: string
          title: End Date
          description: Echoed request end date (YYYY-MM-DD, ET).
        filter:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Filter
          description: Echoed normalized filter tree, or null when no filter was sent.
        view:
          type: string
          title: View
          description: '`distribution`, `brand_share`, or `top_products`.'
        metrics:
          items:
            type: string
          type: array
          title: Metrics
          description: Metrics returned per row.
      additionalProperties: true
      type: object
      required:
        - count
        - models
        - start_date
        - end_date
        - view
        - metrics
      title: ShoppingMerchantsV2Info
    ShoppingMerchantRow:
      properties:
        merchant_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Merchant Name
        merchant_share:
          anyOf:
            - type: number
            - type: 'null'
          title: Merchant Share
        merchant_share_rank:
          anyOf:
            - type: integer
            - type: 'null'
          title: Merchant Share Rank
        merchant_visibility:
          anyOf:
            - type: number
            - type: 'null'
          title: Merchant Visibility
        merchant_visibility_rank:
          anyOf:
            - type: integer
            - type: 'null'
          title: Merchant Visibility Rank
        date:
          anyOf:
            - type: string
            - type: 'null'
          title: Date
        visibility_rank:
          anyOf:
            - type: integer
            - type: 'null'
          title: Visibility Rank
        brand_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Brand Name
        brand_share:
          anyOf:
            - type: number
            - type: 'null'
          title: Brand Share
        product:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Product
        product_visibility:
          anyOf:
            - type: number
            - type: 'null'
          title: Product Visibility
        product_rank:
          anyOf:
            - type: integer
            - type: 'null'
          title: Product Rank
      additionalProperties: true
      type: object
      title: ShoppingMerchantRow
      description: >-
        One merchant row. `brand_name`/`brand_share` appear in the brand-share
        view; `product`/product

        metrics in the top-products view; metrics vary by view.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer

````