User Based

Prev Next

The User Based algorithm recommends items by finding users similar to the current user. It generates recommendations powered by user behaviors and product popularity.

In this algorithm, product recommendations are based on the behavior of similar users (users with close similarity index scores: viewed, purchased, or added the same or similar category products to their cart) with the current user. The algorithm recommends products that similar users came across in the past but have not visited by the current user. The user-based algorithm also takes the user-product-rating matrix as another input. For each product a user visits, a rating is calculated based on the number of visits, purchases, and add-to-carts within the last 30 days. This type of algorithm can be used on every kind of page.

Endpoint

GET https://recommendation.api.useinsider.com/v2/user-based

Query Parameters

ParameterSample ValueDescriptionData TypeRequired
partnerNamemybrandPartner Identifier assigned by Insider. You can use PartnerID as well.StringYes
localeus_USLocale of requested product catalogStringYes
platformwebRequested platform. Web comes by default.EnumNo
userIda1b2c3d4User identifier that is assigned by InsiderStringYes
currencyUSDRequested currency of the products. If no value is set, the default currency in your settings is used.StringYes
size50Required number of items in response. Valid values are 0 to 100.IntegerNo
categoryList[“Clothes”, “Skirts”]Category filter of the productsArray (of string)No
filter
Smart Recommender filtering. There can be more than one filter parameter.StringNo
detailstrueAdds details to the products of the responseBooleanNo
shufflefalseShuffles the products of the responseBooleanNo
getGroupProductsfalseShows variant products under the products of the responseBooleanNo
groupProductsFields
Adds these fields to the variant products’ detailsStringNo
excludeVariantstrueExclude variants from the responseBooleanNo
excludeViewDay30After how many days should viewed products be excluded.IntegerNo (Can be used only with userId)
excludeViewItem100How many viewed products should be excluded.IntegerNo (Can be used only with userId)
excludePurchaseDay30After how many days should purchased products be excluded.IntegerNo (Can be used only with userId)
excludePurchaseItem100How many purchased products should be excluded.IntegerNo (Can be used only with userId)
hpfalseMakes affinities affect products of the response.BooleanNo
dayLimit2If FMT is published_time, it adds a day limit filter.IntegerNo
productIdABC123CBACurrent product IDStringNo

Sample Request

The sample below displays a request to User Based, a personalized recommendation algorithm that finds users similar to the current user.

GET https://recommendation.api.useinsider.com/v2/user-based?partnerName={Partner_Name}&locale={Locale}&currency=TRY&userId={User ID}

Sample Response

{
    "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 come from User Based are not enough to fill the response data, some fallback algorithms below fill it:

  • View-to-view of the last visited product
  • Most viewed of the category 
  • Most viewed of the category without excluding the right-most item in the categoryList
  • Most viewed of the Partner