Skip to main content
To access the API directly, you may need to interact with Algolia’s PHP client. The Algolia PHP client lets you use Algolia’s features in the most customizable way possible.
Scout Extended already ships with version 4 of Algolia’s PHP client (algolia/algoliasearch-client-php), so you don’t need to require it separately.

Algolia::client

The client method returns an instance of Algolia\AlgoliaSearch\Api\SearchClient:
PHP

Algolia::index

The index method returns the index name of the given searchable as a string. Pass it to the client’s index-scoped methods:
PHP

Algolia::analytics

The analytics method returns an instance of Algolia\AlgoliaSearch\Api\AnalyticsClient:
PHP
Last modified on July 23, 2026