API client
/
Methods
Mar. 17, 2023
Recommend
List of methods
Get frequently bought together |
Retrieve frequently bought together items for a set of |
Get related products |
Retrieve related products or related content for a set of |
Get trending items |
Retrieve global trending items. |
Get trending facets |
Retrieve trending facet values for a specific facet attribute. |
Get recommendations |
Get recommendations from any Algolia recommendation model. |
We released a new version of the PHP API client in public beta. Read the beta documentation for more information.
Guide
Algolia Recommend
Install#
The Algolia Recommend client is separate from the search client. You can install it from npm.
Copy
1
npm install @algolia/recommend
If you don’t use a package manager, you can include this snippet in your HTML:
Copy
1
2
3
4
<script src="https://cdn.jsdelivr.net/npm/@algolia/recommend"></script>
<script>
const algoliarecommend = window['@algolia/recommend'];
</script>
Initialize the client#
Copy
1
2
3
4
5
<?php
require_once __DIR__."/vendor/autoload.php"
use Algolia\AlgoliaSearch\RecommendClient;
$client = RecommendClient::create('YourApplicationID', 'YourSearchOnlyAPIKey');
Did you find this page helpful?