--- title: "Viewed Together" slug: "recommendation-api-viewed-together-algorithm" description: "Documents the GET /v2/viewed-together endpoint, recommending products viewed alongside the current item in the same sessions, ranked by view frequency." tags: ["viewed together"] updated: 2026-09-09T15:13:45Z published: 2026-09-09T15:13:45Z canonical: "academy.insiderone.com/recommendation-api-viewed-together-algorithm" --- > ## Documentation Index > Fetch the complete documentation index at: https://academy.insiderone.com/llms.txt > Use this file to discover all available pages before exploring further. # Viewed Together The Viewed Together algorithm recommends items by identifying similar products users have viewed. It generates recommendations based on products viewed in the same sessions and locale over the past 30 days. After generating recommendations, the Viewed Together algorithm orders the results by visit frequency (popularity). This helps users find complementary or substitute products for the one they are currently viewing. This increases discovery rates and the likelihood of grabbing users’ attention when they don’t have a target product. This type of algorithm works best on **product pages**. ## Endpoint > **GET** https://recommendation.api.useinsider.com/v2/viewed-together[](https://developers.insiderone.com/#7fdb30a0-c22b-43db-a872-e7687b161ca7) ## Query Parameters | Parameter | Sample Value | Description | Data Type | Required | | --- | --- | --- | --- | --- | | partnerName | mybrand | Partner Identifier assigned by Insider One. You can use PartnerID as well. | String | Yes | | locale | us_US | Locale of the requested product catalog | String | Yes | | platform | web | Requested platform. Web comes by default. | Enum | No | | currency | USD | Requested currency of the products. If no value is set, the default currency in your settings is used. | String | No | | productId | ABC0123 | Base product ID | String | Yes | | size | 50 | Required number of items in response. Valid values are 0 to 100. | Integer | No | | categoryList | [“Clothes”, “Skirts”] | Category filter of the products | Array (of string) | No | | filter | | [Smart Recommender filtering](https://academy.insiderone.com/docs/filtering-recommendation-responses). There can be more than one filter parameter. | String | No | | details | true | Adds details to the products in the response | Boolean | No | | shuffle | false | Shuffles the products of the response | Boolean | No | | getGroupProducts | false | Shows variant products under the products of the response | Boolean | No | | groupProductsFields | | Adds these fields to the variant products’ details | String | No | | excludeVariants | true | Exclude variants from the response | Boolean | No | | userId | a1b2c3d4 | User identifier that is assigned by Insider One | String | No | | excludeViewDay | 30 | After how many days should viewed products be excluded | Integer | No (Can be used only with userId) | | excludeViewItem | 100 | How many viewed products should be excluded | Integer | No (Can be used only with userId) | | excludePurchaseDay | 30 | After how many days should purchased products be excluded | Integer | No (Can be used only with userId) | | excludePurchaseItem | 100 | How many purchased products should be excluded | Integer | No (Can be used only with userId) | | hp | false | Makes affinities affect products of the response | Boolean | No | ## Sample Request The sample below displays a request to Viewed Together, a recommendation algorithm that suggests items commonly viewed alongside the same product by other users. ```http https://recommendation.api.useinsider.com/v2/viewed-together?locale={Locale}&productId={ProductID}¤cy={Currenct}&partnerName={PartnerName} ``` ## Sample Response ```json {        "success": true,        "total": 10,        "types": {        "mvop": 10        },        "data": [        "QAZ-7890",        "XYZ-1234",        "QAZ-7899",        "XYZ-1233",        "QAZ-7898",        "XYZ-1243",        "QAZ-7891",        "XYZ-1223",        "QAZ-7892",        "XYZ-1342"        ]        } ``` ## Fallback Algorithms If the products from **Viewed Together** are not enough to fill the response data, some fallback algorithms below fill it: - Most viewed of the category - Most viewed of the category without excluding the right-most item in the **categoryList** - Most viewed of the Partner ## Related - [API Authentication Tokens](/api-authentication-tokens.md) - [API Rate Limits](/api-rate-limits.md) - [API Status and Error Codes](/api-status-and-error-codes.md) - [Insider One APIs in Postman](/insider-apis-in-postman.md)