---
title: Get Recommended Products
slug: data-platform/api/get-recommended-products
docTags: 
createdAt: 2026-09-02T14:41:00.110Z
---

{
  "id": "EO28umVspC7y4NWLIOlf8",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.us1.odp.optimizely.com/v3/recommendations/products",
    "servers": [
      {
        "url": "https://api.us1.odp.optimizely.com/v3/recommendations/products",
        "description": "United States"
      },
      {
        "url": "https://api.eu1.odp.optimizely.com/v3/recommendations/products",
        "description": "Europe"
      },
      {
        "url": "https://api.au1.odp.optimizely.com/v3/recommendations/products",
        "description": "Asia-Pacific"
      }
    ],
    "name": "Get Recommended Products",
    "description": "Get recommendations for a customer or product.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "{identifier}=identifier_value",
          "type": "string",
          "example": "{\"email\":\"sample@test.com\"}",
          "examples": [
            {
              "label": "Email Identifier",
              "value": "{\"email\":\"sample@test.com\"}"
            }
          ],
          "description": "<p>The identifier type and its value. Acceptable identifier types include: <code>vuid</code>, <code>email</code>, <code>zaiusalias</code>, and <code>customer_id</code>.</p>"
        },
        {
          "kind": "optional",
          "name": "product_ids",
          "type": "string",
          "description": "<p>A comma-separated list of product IDs. Using the <code>product_ids</code> parameter allows you to generate recommended products based on the product IDs passed in.</p>"
        },
        {
          "kind": "optional",
          "name": "type",
          "type": "string",
          "description": "<p>The type of recommendation requested. Acceptable values are: <code>personal</code> and <code>contextual</code>.</p>",
          "enum": [
            "personal",
            "contextual"
          ]
        },
        {
          "kind": "optional",
          "name": "criteria",
          "type": "object",
          "description": "Filter criteria applied to the recommendations returned. you can use any field on the product schema to filter. See above for the filter construct.",
          "schema": []
        },
        {
          "kind": "optional",
          "name": "sort_by",
          "type": "string",
          "description": "<p>Product field to sort by, which can be any base or custom field defined in your Product schema. Default sort is highest to lowest recommendation rank. Changing this will not change which products are returned, only the order in which they display in the array.</p>"
        },
        {
          "kind": "optional",
          "name": "order",
          "type": "string",
          "description": "<p>Options are <code>asc</code> and <code>desc</code>. Order in which to sort the resulting products. Changing this will not change which products are returned, only the order in which they display in the array. This will not change the order of products if there is no sort specified.</p>",
          "default": "asc",
          "enum": [
            "asc",
            "desc"
          ]
        },
        {
          "kind": "optional",
          "name": "limit",
          "type": "string",
          "description": "The number of products to return. Must be an integer value from 1 to 100. Default is 10.",
          "default": 10,
          "minimum": 1,
          "maximum": 100
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "x-api-key",
          "name": "x-api-key",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "[ { \"product_id\": \"1234BLK\", \"name\": \"Basics - Black\", \"brand\": \"Jungle James Basics\", \"sku\": \"1234BLK\", \"upc\": \"042100005264\", \"image_url\": \"https://http.cat/404\", \"price\": 25.99, \"parent_product_id\": \"1234\", \"recommendation_type\": \"contextual\" }, { \"product_id\": \"1234BLU\", \"name\": \"Basics - Blue\", \"brand\": \"Jungle James Basics\", \"sku\": \"1234BLU\", \"upc\": \"042100005265\", \"image_url\": \"https://http.cat/404\", \"price\": 25.99, \"parent_product_id\": \"1234\", \"recommendation_type\": \"contextual\" } ]",
            "description": "",
            "customType": "Recommendation",
            "schema": [
              {
                "name": "product_id",
                "kind": "optional",
                "type": "string",
                "description": "",
                "example": "1234BLK"
              },
              {
                "name": "name",
                "kind": "optional",
                "type": "string",
                "description": "",
                "example": "Basics - Black"
              },
              {
                "name": "brand",
                "kind": "optional",
                "type": "string",
                "description": "",
                "example": "Jungle James Basics"
              },
              {
                "name": "sku",
                "kind": "optional",
                "type": "string",
                "description": "",
                "example": "1234BLK"
              },
              {
                "name": "upc",
                "kind": "optional",
                "type": "string",
                "description": "",
                "example": "042100005264"
              },
              {
                "name": "image_url",
                "kind": "optional",
                "type": "string",
                "description": "",
                "example": "https://http.cat/404"
              },
              {
                "name": "price",
                "kind": "optional",
                "type": "number",
                "description": "",
                "example": 25.99,
                "default": 0
              },
              {
                "name": "parent_product_id",
                "kind": "optional",
                "type": "string",
                "description": "",
                "example": "1234"
              },
              {
                "name": "recommendation_type",
                "kind": "optional",
                "type": "string",
                "description": "",
                "example": "contextual"
              }
            ],
            "modelRef": "#/components/schemas/Recommendation",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Bad Request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "undefined",
            "example": "{\"title\":\"Bad Request\",\"status\":400,\"timestamp\":\"2018-09-10T21:07:10-05:00\",\"detail\":{\"invalids\":[{\"field\":\"delimiter\",\"reason\":\"Unrecognized delimiter, valid options are comma, tab or pipe\"}]}}",
            "description": "",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "Forbidden",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "undefined",
            "example": "{  \"message\": \"Forbidden\"}",
            "description": "",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "Vfwu3t6-mdz6WhcZJkDBC",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url 'https://api.us1.odp.optimizely.com/v3/recommendations/products?criteria=object&order=asc&limit=10' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "Xp9dweHwp5n__NzetyZMt",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.us1.odp.optimizely.com/v3/recommendations/products?criteria=object&order=asc&limit=10\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "zXbE1l9CbIt7LW1Q3ZgJl",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.us1.odp.optimizely.com/v3/recommendations/products?criteria=object&order=asc&limit=10\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "LJhuc_uFqgo8qXO4Kiby_",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.us1.odp.optimizely.com/v3/recommendations/products?criteria=object&order=asc&limit=10\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "Vfwu3t6-mdz6WhcZJkDBC"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n{\n  \"product_id\": \"1234BLK\",\n  \"name\": \"Basics - Black\",\n  \"brand\": \"Jungle James Basics\",\n  \"sku\": \"1234BLK\",\n  \"upc\": \"042100005264\",\n  \"image_url\": \"https://http.cat/404\",\n  \"price\": 25.99,\n  \"parent_product_id\": \"1234\",\n  \"recommendation_type\": \"contextual\"\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Bad Request\n\"{\\\"title\\\":\\\"Bad Request\\\",\\\"status\\\":400,\\\"timestamp\\\":\\\"2018-09-10T21:07:10-05:00\\\",\\\"detail\\\":{\\\"invalids\\\":[{\\\"field\\\":\\\"delimiter\\\",\\\"reason\\\":\\\"Unrecognized delimiter, valid options are comma, tab or pipe\\\"}]}}\""
        },
        {
          "id": "response-2-403",
          "language": "403",
          "code": "// Forbidden\n\"{  \\\"message\\\": \\\"Forbidden\\\"}\""
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}