> ## 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/recommendation/search

> Retrieves a list of products recommended for the given user. This end point can either rely on a Criteo UserId, or a list of user events to perform the recommendation



## OpenAPI

````yaml https://api.criteo.com/preview/marketingsolutions/open-api-specifications.json post /preview/recommendation/search
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/recommendation/search:
    post:
      tags:
        - OnSiteRecommendation
      summary: /preview/recommendation/search
      description: >-
        Retrieves a list of products recommended for the given user. This end
        point can either rely on a Criteo UserId, or a list of user events to
        perform the recommendation
      operationId: SearchRecommendedProducts
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OnSiteRecoRequest'
        x-bodyName: request
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnSiteRecoResponse'
      security:
        - oauth:
            - MarketingSolutions_OnSiteRecommendation_Read
components:
  schemas:
    OnSiteRecoRequest:
      required:
        - nbRequestedProducts
        - partnerId
      type: object
      properties:
        adId:
          type: integer
          description: >-
            Id of the Ad. This field is optional, it allows to setup Reco
            controls at Ad level.
          format: int32
        adSetId:
          type: integer
          description: >-
            Id of the AdSet. This field is optional and is resolved
            automatically for adsets previously configured.
          format: int32
        identityType:
          enum:
            - CtoBundle
            - Idfa
            - Gaid
            - InternalUserId
          type: string
          description: >-
            Type of the user identifier (CtoBundle, Idfa, Gaid...) Optional if
            its type is CtoBundle
        nbRequestedProducts:
          type: integer
          description: Amount of products to recommend.
          format: int32
        partnerId:
          type: integer
          description: Id of the partner.
          format: int32
        userId:
          type: string
          description: Used to retrieve user events from Criteo trackers.
      description: Recommendation request parameters
    OnSiteRecoResponse:
      type: object
      properties:
        extraInfos:
          type: array
          items:
            type: integer
            format: int32
          description: Additional information in case of warnings, errors...
          nullable: true
        products:
          type: array
          items:
            $ref: '#/components/schemas/RecommendedProduct'
          description: Recommended products
          nullable: true
      description: Recommendation response
    RecommendedProduct:
      type: object
      properties:
        alternativeClickUrl:
          type: string
          description: >-
            Url leading to product details page and also used to track user
            click. It's relying on a custom product URL field in the catalog.
          nullable: true
        brand:
          type: string
          description: Product brand.
          nullable: true
        clickUrl:
          type: string
          description: >-
            Url leading to product details page and also used to track user
            click
          nullable: true
        description:
          type: string
          description: Product description.
          nullable: true
        googleCategory:
          type: string
          description: Product google category.
          nullable: true
        hasVariants:
          type: boolean
          description: Whether the product has variants available.
          nullable: true
        imageUrl:
          type: string
          description: Product image.
          nullable: true
        name:
          type: string
          description: Product name
          nullable: true
        price:
          type: number
          description: Product price.
          format: double
          nullable: true
        productExternalId:
          type: string
          description: Product external id. Same id than what is used in user events
          nullable: true
        relevanceLabel:
          enum:
            - Similar
            - Relevant
          type: string
          description: Product Relevance label
          nullable: true
        relevancyScore:
          type: number
          description: Product Relevancy score
          format: double
          nullable: true
        retailPrice:
          type: number
          description: Product retail price.
          format: double
          nullable: true
      description: Represents a recommended product.
  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: {}

````