Skip to main content
You should perform searches directly from your frontend, using JavaScript. This drastically improves search response times, and reduces the load and traffic on your servers.

Generate search keys

With client-side implementations, only use search API keys. Scout Extended provides the searchKey method to generate a search key for each searchable class:
PHP
The generated search key restricts searches to the given Searchable class, and no other Searchable classes.
The searchKey method uses the application cache to return the same search key until its expiry, 24 hours after generation.

Integration with Vue InstantSearch

Scout Extended doesn’t dictate which JavaScript solution to use. You’re free to pick your favorite InstantSearch flavor. The example below covers the Vue InstantSearch integration.

Install Vue InstantSearch

Laravel doesn’t ship with a frontend framework, so install Vue with the Vite plugin, then add vue-instantsearch and algoliasearch as dependencies:
Command line
Register the Vue plugin in your vite.config.js file:
vite.config.js
Then, open up your resources/js/app.js file, create the Vue app, and register InstantSearch:
resources/js/app.js
To compile the JavaScript while working on it, run the Vite development server:
Command line

Scaffold a search interface

The following example shows a small search interface with a minimal design. Since the frontend needs access to the and , expose them from your Blade template before loading the bundle:
Blade
You can refer to the Vue InstantSearch documentation to learn more about Vue InstantSearch and its components.
Last modified on July 23, 2026