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

# /preview/reports/top-products

> With the topProducts endpoint, you can analyse the performances for each publisher, by top displays, top clicks or top sales.
<br/><br/>
This endpoint supports data retrieval for up to one year in the past.



## OpenAPI

````yaml https://api.criteo.com/preview/marketingsolutions/open-api-specifications.json post /preview/reports/top-products
openapi: 3.0.1
info:
  title: Criteo API
  description: Criteo API - MarketingSolutions
  version: Preview
servers:
  - url: https://api.criteo.com
security:
  - oauth: []
tags:
  - name: Advertiser
  - name: Analytics
  - name: Audience
  - name: Campaign
  - name: Catalog
  - name: Creative
  - name: Gateway
  - name: OnSiteRecommendation
  - name: Reco
paths:
  /preview/reports/top-products:
    post:
      tags:
        - Analytics
      summary: /preview/reports/top-products
      description: "With the topProducts endpoint, you can analyse the performances for each publisher, by top displays, top clicks or top sales.\r\n<br/><br/>\r\nThis endpoint supports data retrieval for up to one year in the past."
      operationId: GetTopProductsReport
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/GenerateTopProductsReportRequestAttributesRequest
            example:
              data:
                type: GenerateTopProductsReport
                attributes:
                  timezone: Europe/Paris
                  startDate: '2024-01-01T00:00:00.0000000+00:00'
                  endDate: '2024-01-04T00:00:00.0000000+00:00'
                  advertiserId: '1234'
                  limit: 200
                  rankProductsBy: Clicks
                  dimensions:
                    - CampaignId
                    - Campaign
                    - AdSetId
                    - AdSet
                    - ProductId
                    - Product
                    - ProductUrl
                    - Brand
                    - Category
                  metrics:
                    - Clicks
                    - Ctr
                    - Visits
                    - Sales
                    - Cost
                    - Revenue
                    - Displays
                  currency: EUR
                  brands:
                    - Brand1
                    - Brand2
                  categoryIds:
                    - '6666'
                    - '7777'
                  campaignIds:
                    - '9999'
                  adSetIds:
                    - '11111'
                    - '22222'
                  adSetStatus:
                    - Active
                    - NotRunning
          application/xml:
            schema:
              $ref: >-
                #/components/schemas/GenerateTopProductsReportRequestAttributesRequest
            example: "<ValueResourceInputOfGenerateTopProductsReportRequestAttributestukRIHCU xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.datacontract.org/2004/07/Criteo.Api.Resources\">\r\n  <Data>\r\n    <Attributes xmlns:d3p1=\"http://schemas.datacontract.org/2004/07/Criteo.Api.Exam.Statistics.Controllers.V1.Messages\">\r\n      <d3p1:AdSetIds xmlns:d4p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\">\r\n        <d4p1:string>11111</d4p1:string>\r\n        <d4p1:string>22222</d4p1:string>\r\n      </d3p1:AdSetIds>\r\n      <d3p1:AdSetStatus xmlns:d4p1=\"http://schemas.datacontract.org/2004/07/Criteo.Api.Exam.Statistics.Controllers.V1.Models\">\r\n        <d4p1:AdSetStatusFilter>Active</d4p1:AdSetStatusFilter>\r\n        <d4p1:AdSetStatusFilter>NotRunning</d4p1:AdSetStatusFilter>\r\n      </d3p1:AdSetStatus>\r\n      <d3p1:AdvertiserId>1234</d3p1:AdvertiserId>\r\n      <d3p1:Brands xmlns:d4p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\">\r\n        <d4p1:string>Brand1</d4p1:string>\r\n        <d4p1:string>Brand2</d4p1:string>\r\n      </d3p1:Brands>\r\n      <d3p1:CampaignIds xmlns:d4p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\">\r\n        <d4p1:string>9999</d4p1:string>\r\n      </d3p1:CampaignIds>\r\n      <d3p1:CategoryIds xmlns:d4p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\">\r\n        <d4p1:string>6666</d4p1:string>\r\n        <d4p1:string>7777</d4p1:string>\r\n      </d3p1:CategoryIds>\r\n      <d3p1:Currency>EUR</d3p1:Currency>\r\n      <d3p1:Dimensions xmlns:d4p1=\"http://schemas.datacontract.org/2004/07/Criteo.Api.Exam.Statistics.Controllers.V1.Models\">\r\n        <d4p1:TopProductsReportDimensions>CampaignId</d4p1:TopProductsReportDimensions>\r\n        <d4p1:TopProductsReportDimensions>Campaign</d4p1:TopProductsReportDimensions>\r\n        <d4p1:TopProductsReportDimensions>AdSetId</d4p1:TopProductsReportDimensions>\r\n        <d4p1:TopProductsReportDimensions>AdSet</d4p1:TopProductsReportDimensions>\r\n        <d4p1:TopProductsReportDimensions>ProductId</d4p1:TopProductsReportDimensions>\r\n        <d4p1:TopProductsReportDimensions>Product</d4p1:TopProductsReportDimensions>\r\n        <d4p1:TopProductsReportDimensions>ProductUrl</d4p1:TopProductsReportDimensions>\r\n        <d4p1:TopProductsReportDimensions>Brand</d4p1:TopProductsReportDimensions>\r\n        <d4p1:TopProductsReportDimensions>Category</d4p1:TopProductsReportDimensions>\r\n      </d3p1:Dimensions>\r\n      <d3p1:EndDate>2024-01-04T00:00:00</d3p1:EndDate>\r\n      <d3p1:IsInternal>false</d3p1:IsInternal>\r\n      <d3p1:Limit>200</d3p1:Limit>\r\n      <d3p1:Metrics xmlns:d4p1=\"http://schemas.datacontract.org/2004/07/Criteo.Api.Exam.Statistics.Controllers.V1.Models\">\r\n        <d4p1:TopProductsReportMetrics>Clicks</d4p1:TopProductsReportMetrics>\r\n        <d4p1:TopProductsReportMetrics>Ctr</d4p1:TopProductsReportMetrics>\r\n        <d4p1:TopProductsReportMetrics>Visits</d4p1:TopProductsReportMetrics>\r\n        <d4p1:TopProductsReportMetrics>Sales</d4p1:TopProductsReportMetrics>\r\n        <d4p1:TopProductsReportMetrics>Cost</d4p1:TopProductsReportMetrics>\r\n        <d4p1:TopProductsReportMetrics>Revenue</d4p1:TopProductsReportMetrics>\r\n        <d4p1:TopProductsReportMetrics>Displays</d4p1:TopProductsReportMetrics>\r\n      </d3p1:Metrics>\r\n      <d3p1:RankProductsBy>Clicks</d3p1:RankProductsBy>\r\n      <d3p1:StartDate>2024-01-01T00:00:00</d3p1:StartDate>\r\n      <d3p1:Timezone>Europe/Paris</d3p1:Timezone>\r\n    </Attributes>\r\n    <Type>GenerateTopProductsReport</Type>\r\n  </Data>\r\n</ValueResourceInputOfGenerateTopProductsReportRequestAttributestukRIHCU>"
          text/xml:
            schema:
              $ref: >-
                #/components/schemas/GenerateTopProductsReportRequestAttributesRequest
            example: "<ValueResourceInputOfGenerateTopProductsReportRequestAttributestukRIHCU xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.datacontract.org/2004/07/Criteo.Api.Resources\">\r\n  <Data>\r\n    <Attributes xmlns:d3p1=\"http://schemas.datacontract.org/2004/07/Criteo.Api.Exam.Statistics.Controllers.V1.Messages\">\r\n      <d3p1:AdSetIds xmlns:d4p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\">\r\n        <d4p1:string>11111</d4p1:string>\r\n        <d4p1:string>22222</d4p1:string>\r\n      </d3p1:AdSetIds>\r\n      <d3p1:AdSetStatus xmlns:d4p1=\"http://schemas.datacontract.org/2004/07/Criteo.Api.Exam.Statistics.Controllers.V1.Models\">\r\n        <d4p1:AdSetStatusFilter>Active</d4p1:AdSetStatusFilter>\r\n        <d4p1:AdSetStatusFilter>NotRunning</d4p1:AdSetStatusFilter>\r\n      </d3p1:AdSetStatus>\r\n      <d3p1:AdvertiserId>1234</d3p1:AdvertiserId>\r\n      <d3p1:Brands xmlns:d4p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\">\r\n        <d4p1:string>Brand1</d4p1:string>\r\n        <d4p1:string>Brand2</d4p1:string>\r\n      </d3p1:Brands>\r\n      <d3p1:CampaignIds xmlns:d4p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\">\r\n        <d4p1:string>9999</d4p1:string>\r\n      </d3p1:CampaignIds>\r\n      <d3p1:CategoryIds xmlns:d4p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\">\r\n        <d4p1:string>6666</d4p1:string>\r\n        <d4p1:string>7777</d4p1:string>\r\n      </d3p1:CategoryIds>\r\n      <d3p1:Currency>EUR</d3p1:Currency>\r\n      <d3p1:Dimensions xmlns:d4p1=\"http://schemas.datacontract.org/2004/07/Criteo.Api.Exam.Statistics.Controllers.V1.Models\">\r\n        <d4p1:TopProductsReportDimensions>CampaignId</d4p1:TopProductsReportDimensions>\r\n        <d4p1:TopProductsReportDimensions>Campaign</d4p1:TopProductsReportDimensions>\r\n        <d4p1:TopProductsReportDimensions>AdSetId</d4p1:TopProductsReportDimensions>\r\n        <d4p1:TopProductsReportDimensions>AdSet</d4p1:TopProductsReportDimensions>\r\n        <d4p1:TopProductsReportDimensions>ProductId</d4p1:TopProductsReportDimensions>\r\n        <d4p1:TopProductsReportDimensions>Product</d4p1:TopProductsReportDimensions>\r\n        <d4p1:TopProductsReportDimensions>ProductUrl</d4p1:TopProductsReportDimensions>\r\n        <d4p1:TopProductsReportDimensions>Brand</d4p1:TopProductsReportDimensions>\r\n        <d4p1:TopProductsReportDimensions>Category</d4p1:TopProductsReportDimensions>\r\n      </d3p1:Dimensions>\r\n      <d3p1:EndDate>2024-01-04T00:00:00</d3p1:EndDate>\r\n      <d3p1:IsInternal>false</d3p1:IsInternal>\r\n      <d3p1:Limit>200</d3p1:Limit>\r\n      <d3p1:Metrics xmlns:d4p1=\"http://schemas.datacontract.org/2004/07/Criteo.Api.Exam.Statistics.Controllers.V1.Models\">\r\n        <d4p1:TopProductsReportMetrics>Clicks</d4p1:TopProductsReportMetrics>\r\n        <d4p1:TopProductsReportMetrics>Ctr</d4p1:TopProductsReportMetrics>\r\n        <d4p1:TopProductsReportMetrics>Visits</d4p1:TopProductsReportMetrics>\r\n        <d4p1:TopProductsReportMetrics>Sales</d4p1:TopProductsReportMetrics>\r\n        <d4p1:TopProductsReportMetrics>Cost</d4p1:TopProductsReportMetrics>\r\n        <d4p1:TopProductsReportMetrics>Revenue</d4p1:TopProductsReportMetrics>\r\n        <d4p1:TopProductsReportMetrics>Displays</d4p1:TopProductsReportMetrics>\r\n      </d3p1:Metrics>\r\n      <d3p1:RankProductsBy>Clicks</d3p1:RankProductsBy>\r\n      <d3p1:StartDate>2024-01-01T00:00:00</d3p1:StartDate>\r\n      <d3p1:Timezone>Europe/Paris</d3p1:Timezone>\r\n    </Attributes>\r\n    <Type>GenerateTopProductsReport</Type>\r\n  </Data>\r\n</ValueResourceInputOfGenerateTopProductsReportRequestAttributestukRIHCU>"
          application/*+xml:
            schema:
              $ref: >-
                #/components/schemas/GenerateTopProductsReportRequestAttributesRequest
            example: "<ValueResourceInputOfGenerateTopProductsReportRequestAttributestukRIHCU xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.datacontract.org/2004/07/Criteo.Api.Resources\">\r\n  <Data>\r\n    <Attributes xmlns:d3p1=\"http://schemas.datacontract.org/2004/07/Criteo.Api.Exam.Statistics.Controllers.V1.Messages\">\r\n      <d3p1:AdSetIds xmlns:d4p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\">\r\n        <d4p1:string>11111</d4p1:string>\r\n        <d4p1:string>22222</d4p1:string>\r\n      </d3p1:AdSetIds>\r\n      <d3p1:AdSetStatus xmlns:d4p1=\"http://schemas.datacontract.org/2004/07/Criteo.Api.Exam.Statistics.Controllers.V1.Models\">\r\n        <d4p1:AdSetStatusFilter>Active</d4p1:AdSetStatusFilter>\r\n        <d4p1:AdSetStatusFilter>NotRunning</d4p1:AdSetStatusFilter>\r\n      </d3p1:AdSetStatus>\r\n      <d3p1:AdvertiserId>1234</d3p1:AdvertiserId>\r\n      <d3p1:Brands xmlns:d4p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\">\r\n        <d4p1:string>Brand1</d4p1:string>\r\n        <d4p1:string>Brand2</d4p1:string>\r\n      </d3p1:Brands>\r\n      <d3p1:CampaignIds xmlns:d4p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\">\r\n        <d4p1:string>9999</d4p1:string>\r\n      </d3p1:CampaignIds>\r\n      <d3p1:CategoryIds xmlns:d4p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\">\r\n        <d4p1:string>6666</d4p1:string>\r\n        <d4p1:string>7777</d4p1:string>\r\n      </d3p1:CategoryIds>\r\n      <d3p1:Currency>EUR</d3p1:Currency>\r\n      <d3p1:Dimensions xmlns:d4p1=\"http://schemas.datacontract.org/2004/07/Criteo.Api.Exam.Statistics.Controllers.V1.Models\">\r\n        <d4p1:TopProductsReportDimensions>CampaignId</d4p1:TopProductsReportDimensions>\r\n        <d4p1:TopProductsReportDimensions>Campaign</d4p1:TopProductsReportDimensions>\r\n        <d4p1:TopProductsReportDimensions>AdSetId</d4p1:TopProductsReportDimensions>\r\n        <d4p1:TopProductsReportDimensions>AdSet</d4p1:TopProductsReportDimensions>\r\n        <d4p1:TopProductsReportDimensions>ProductId</d4p1:TopProductsReportDimensions>\r\n        <d4p1:TopProductsReportDimensions>Product</d4p1:TopProductsReportDimensions>\r\n        <d4p1:TopProductsReportDimensions>ProductUrl</d4p1:TopProductsReportDimensions>\r\n        <d4p1:TopProductsReportDimensions>Brand</d4p1:TopProductsReportDimensions>\r\n        <d4p1:TopProductsReportDimensions>Category</d4p1:TopProductsReportDimensions>\r\n      </d3p1:Dimensions>\r\n      <d3p1:EndDate>2024-01-04T00:00:00</d3p1:EndDate>\r\n      <d3p1:IsInternal>false</d3p1:IsInternal>\r\n      <d3p1:Limit>200</d3p1:Limit>\r\n      <d3p1:Metrics xmlns:d4p1=\"http://schemas.datacontract.org/2004/07/Criteo.Api.Exam.Statistics.Controllers.V1.Models\">\r\n        <d4p1:TopProductsReportMetrics>Clicks</d4p1:TopProductsReportMetrics>\r\n        <d4p1:TopProductsReportMetrics>Ctr</d4p1:TopProductsReportMetrics>\r\n        <d4p1:TopProductsReportMetrics>Visits</d4p1:TopProductsReportMetrics>\r\n        <d4p1:TopProductsReportMetrics>Sales</d4p1:TopProductsReportMetrics>\r\n        <d4p1:TopProductsReportMetrics>Cost</d4p1:TopProductsReportMetrics>\r\n        <d4p1:TopProductsReportMetrics>Revenue</d4p1:TopProductsReportMetrics>\r\n        <d4p1:TopProductsReportMetrics>Displays</d4p1:TopProductsReportMetrics>\r\n      </d3p1:Metrics>\r\n      <d3p1:RankProductsBy>Clicks</d3p1:RankProductsBy>\r\n      <d3p1:StartDate>2024-01-01T00:00:00</d3p1:StartDate>\r\n      <d3p1:Timezone>Europe/Paris</d3p1:Timezone>\r\n    </Attributes>\r\n    <Type>GenerateTopProductsReport</Type>\r\n  </Data>\r\n</ValueResourceInputOfGenerateTopProductsReportRequestAttributestukRIHCU>"
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonReportRowsListResponse'
            application/xml:
              schema:
                $ref: '#/components/schemas/JsonReportRowsListResponse'
            text/xml:
              schema:
                $ref: '#/components/schemas/JsonReportRowsListResponse'
      security:
        - oauth:
            - MarketingSolutions_Analytics_Read
components:
  schemas:
    GenerateTopProductsReportRequestAttributesRequest:
      type: object
      properties:
        data:
          $ref: >-
            #/components/schemas/GenerateTopProductsReportRequestAttributesResource
      additionalProperties: false
      description: >-
        A top-level object that encapsulates a Criteo API request for a single
        value object.
    JsonReportRowsListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/JsonReportRowsResource'
          nullable: true
        errors:
          type: array
          items:
            $ref: '#/components/schemas/CommonProblem'
          description: Errors that occured during this call.
          nullable: true
          readOnly: true
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/CommonProblem'
          description: Warnings that occured during this call.
          nullable: true
          readOnly: true
      additionalProperties: false
      description: >-
        A top-level object that encapsulates a Criteo API response for several
        value objects.
    GenerateTopProductsReportRequestAttributesResource:
      type: object
      properties:
        attributes:
          $ref: '#/components/schemas/GenerateTopProductsReportRequestAttributes'
        type:
          type: string
          description: Type of the resource.
          nullable: true
      additionalProperties: false
      description: A value resource exposed by the API.
    JsonReportRowsResource:
      type: object
      properties:
        attributes:
          $ref: '#/components/schemas/JsonReportRows'
        type:
          type: string
          description: Type of the resource.
          nullable: true
      additionalProperties: false
      description: A value resource exposed by the API.
    CommonProblem:
      type: object
      properties:
        code:
          type: string
          description: A machine-readable error code, expressed as a string value.
          nullable: true
        detail:
          type: string
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem
          nullable: true
        instance:
          type: string
          description: A URI that identifies the specific occurrence of the problem.
          nullable: true
        source:
          type: object
          additionalProperties:
            type: string
          description: >-
            A machine-readable structure to reference to the exact location(s)
            causing the error(s)
          nullable: true
        stackTrace:
          type: string
          nullable: true
        title:
          type: string
          description: A short human-readable description of the problem type
          nullable: true
        traceId:
          type: string
          description: The request correlation ID this problem comes from.
          nullable: true
        traceIdentifier:
          type: string
          description: >-
            The request correlation ID this problem comes from. (deprecated, use
            traceId instead)
          nullable: true
        type:
          enum:
            - unknown
            - access-control
            - authentication
            - authorization
            - availability
            - deprecation
            - quota
            - validation
          type: string
          description: The problem's category.
          nullable: true
      description: Common problem object.
    GenerateTopProductsReportRequestAttributes:
      required:
        - advertiserId
        - currency
        - endDate
        - rankProductsBy
        - startDate
      type: object
      properties:
        adSetIds:
          type: array
          items:
            type: string
          description: >-
            Optional list of ad set IDs to filter on. The ad sets must already
            exist. If empty, all ad sets will be included.
          nullable: true
        adSetStatus:
          type: array
          items:
            enum:
              - Active
              - NotRunning
              - Dead
            type: string
          description: >-
            Optional list of ad set statuses to filter on. If empty, all ad sets
            will be included.
          nullable: true
        advertiserId:
          type: string
          description: >-
            The advertiser ID to report on. The advertiser must already exist.
            At least one advertiser ID should be provided
        brands:
          type: array
          items:
            type: string
          description: >-
            Optional list of brand names to filter on. If empty, all brands will
            be included.
          nullable: true
        campaignIds:
          type: array
          items:
            type: string
          description: >-
            Optional list of campaign IDs to filter on. The campaigns must
            already exist. If empty, all campaigns will be included.
          nullable: true
        categoryIds:
          type: array
          items:
            type: string
          description: >-
            Optional list of product catalog category IDs to filter on. If
            empty, all categories will be included.
          nullable: true
        currency:
          type: string
          description: >-
            The currency used for the report. ISO 4217 code (three-letter
            capitals).
          default: EUR
        dimensions:
          type: array
          items:
            enum:
              - Campaign
              - CampaignId
              - AdSet
              - AdSetId
              - Product
              - ProductId
              - Category
              - CategoryId
              - Advertiser
              - AdvertiserId
              - ProductUrl
              - Brand
            type: string
          description: >-
            Optional list of dimensions for the report. If not provided,
            defaults to [ProductId, Product, ProductUrl]. When an ID dimension
            is requested (e.g., CampaignId), the corresponding name dimension
            (e.g., Campaign) is automatically included, and vice versa. This
            applies to the following pairs: CampaignId/Campaign, AdSetId/AdSet,
            ProductId/Product, CategoryId/Category, AdvertiserId/Advertiser.
          nullable: true
        endDate:
          type: string
          description: >-
            End date of the report. Date component of ISO 8601 format, any time
            or timezone component is ignored.
          format: date-time
        limit:
          maximum: 200
          minimum: 1
          type: integer
          description: >-
            Optional maximum number of top products returned. Must be between 1
            and 200.
          format: int32
          default: 200
        metrics:
          type: array
          items:
            enum:
              - Clicks
              - Ctr
              - Visits
              - Sales
              - Cost
              - Revenue
              - Displays
            type: string
          description: >-
            Optional list of metrics to report. If not provided, defaults to the
            metric specified in rankProductsBy.
          nullable: true
        rankProductsBy:
          enum:
            - Clicks
            - Displays
            - Sales
          type: string
          description: >-
            Optional metric used to rank the top products. Allowed values:
            'Clicks', 'Displays', 'Sales'.
        startDate:
          type: string
          description: >-
            Start date of the report. Date component of ISO 8601 format, any
            time or timezone component is ignored. Must be ≤ endDate.
          format: date-time
        timezone:
          type: string
          description: >-
            Optional timezone used for the report. Timezone Database format
            (Tz).
          default: UTC
          nullable: true
      additionalProperties: false
      description: This is the message defining the query for TopProducts report
    JsonReportRows:
      type: object
      properties:
        rows:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
          nullable: true
      additionalProperties: false
      description: This is the message defining the json report rows
      nullable: true
  securitySchemes:
    oauth:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.criteo.com/oauth2/token
          scopes: {}
        authorizationCode:
          authorizationUrl: https://api.criteo.com/oauth2
          tokenUrl: https://api.criteo.com/oauth2/token
          scopes: {}

````