Retrieve recommendations

Retrieves recommendations from selected AI models.

Usage

Required ACL: search
1
2
3
4
5
6
7
8
import { algoliasearch } from 'algoliasearch';

//
const client = algoliasearch('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY').initRecommend();

const response = await client.getRecommendations({
  requests: [{ indexName: 'indexName', objectID: 'objectID', model: 'related-products', threshold: 42.1 }],
});
Did you find this page helpful?
JavaScript API clients v5