API client / Methods
List of methods

We released a new version of the JavaScript API client in public beta. Read the beta documentation for more information.

We released a new version of the PHP API client in public beta. Read the beta documentation for more information.

We released a new version of the Java API client in public beta. Read the beta documentation for more information.

Install

The Algolia Recommend client is separate from the search client. You can install it from npm.

1
npm install @algolia/recommend

If you don’t use a package manager, you can include this snippet in your HTML:

1
2
3
4
<script src="https://cdn.jsdelivr.net/npm/@algolia/recommend"></script>
<script>
  const algoliarecommend = window['@algolia/recommend'];
</script>

Initialize the client

1
2
3
4
5
<?php
require_once __DIR__."/vendor/autoload.php"
use Algolia\AlgoliaSearch\RecommendClient;

$recommend_client = RecommendClient::create('YourApplicationID', 'YourSearchOnlyAPIKey');
Did you find this page helpful?