Recombee Docs
Visit recombee.comStart Free
docs20User Documentation
adminuiAdmin UI
codeAPI Clients & Integrations
cookhatScenario Recipes

JavaScript API Client

The library allows you to request recommendations and send interactions between users and items (views, bookmarks, purchases …).

It is intended for usage in browsers and other client side integrations (such as in React Native / NativeScript mobile apps). For Node.js SDK please see the Node.js library.


var client = new recombee.ApiClient('name-of-your-db', '...db-public-token...', {region: 'us-west'});

var itemId = 'product-270';
var userId = 'user-1539'
// Send detail view
client.send(new recombee.AddDetailView(userId, itemId));
// Request recommended items
client.send(new recombee.RecommendItemsToItem(itemId, userId, 3,
      returnProperties: true,
      includedProperties: ['title', 'description', 'link', 'image_link', 'price'],
      filter: "'title' != null AND 'availability' == \"in stock\"",
      scenario: 'related_items'
  (err, resp) => {
    if(err) {
      console.log("Could not load recomms: ", err);
    console.log("Recommendations: ", resp.recomms);

© Copyright 2024, Recombee s.r.o