Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@algolia/recommend

Package Overview
Dependencies
Maintainers
3
Versions
198
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@algolia/recommend

JavaScript client for recommend

  • 5.15.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
878K
decreased by-8.26%
Maintainers
3
Weekly downloads
 
Created

What is @algolia/recommend?

@algolia/recommend is a JavaScript library that provides tools to integrate Algolia's recommendation engine into your application. It allows you to easily implement personalized recommendations, related products, and other recommendation-based features using Algolia's powerful search and recommendation APIs.

What are @algolia/recommend's main functionalities?

Personalized Recommendations

This feature allows you to fetch personalized recommendations for a specific user. By providing the user token and the index name, you can retrieve a list of recommended items tailored to the user's preferences.

const { createRecommendClient } = require('@algolia/recommend');
const recommendClient = createRecommendClient({
  appId: 'YourApplicationID',
  apiKey: 'YourAdminAPIKey'
});

recommendClient.getPersonalizedRecommendations({
  indexName: 'products',
  userToken: 'user-123',
  maxRecommendations: 5
}).then(({ results }) => {
  console.log(results);
});

Related Products

This feature allows you to fetch products related to a specific item. By providing the object ID of the product and the index name, you can retrieve a list of items that are similar or related to the specified product.

const { createRecommendClient } = require('@algolia/recommend');
const recommendClient = createRecommendClient({
  appId: 'YourApplicationID',
  apiKey: 'YourAdminAPIKey'
});

recommendClient.getRelatedProducts({
  indexName: 'products',
  objectID: 'product-123',
  maxRecommendations: 5
}).then(({ results }) => {
  console.log(results);
});

Frequently Bought Together

This feature allows you to fetch items that are frequently bought together with a specific product. By providing the object ID of the product and the index name, you can retrieve a list of items that are commonly purchased along with the specified product.

const { createRecommendClient } = require('@algolia/recommend');
const recommendClient = createRecommendClient({
  appId: 'YourApplicationID',
  apiKey: 'YourAdminAPIKey'
});

recommendClient.getFrequentlyBoughtTogether({
  indexName: 'products',
  objectID: 'product-123',
  maxRecommendations: 5
}).then(({ results }) => {
  console.log(results);
});

Other packages similar to @algolia/recommend

FAQs

Package last updated on 19 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc