Before you begin
Ensure you have the following tools and accounts ready:- An Algolia account. If you don’t have one, create a new account for free.
- Shopify admin access.
- A duplicate of a Shopify theme.
As of December 31, 2023, Shopify no longer allows apps to modify theme code.
To integrate Autocomplete and InstantSearch, use the Algolia AI Search & Discovery app’s App Embed and App Blocks.
To get started, see Quickstart and Algolia configuration.
Quickstart
In this quickstart, you’ll install the Algolia AI Search & Discovery app, connect to Algolia, configure your duplicate theme, enable Autocomplete and InstantSearch, then publish your duplicate theme. The live theme remains unchanged until you publish the duplicate.1
Install the Algolia AI Search & Discovery app
Go to https://shopify.algolia.com/install,
enter your Shopify domain, and click Install app.
2
Connect to Algolia
-
In the Algolia AI Search & Discovery app, click Get Started.
If automatic setup fails or your security policy forbids automatic key creation, click Use manual setup instead. -
Sign in to your Algolia account.
On the Credentials page of the Algolia Search & Discovery app, select the Algolia application for your Shopify store. Leave Index prefix set to
shopify_. The Algolia AI Search & Discovery app creates new API keys in your Algolia account and automatically adds them to this page.The Search API key generated during automatic setup has a rate limit of 100,000 requests per IP address per hour. This helps block bot traffic without affecting users. - Click Save.
3
Configure your duplicate theme
-
Select your duplicated theme using the drop-down menu and click Next.

- Click Enable Algolia Search to add Algolia Autocomplete to your theme.
-
Click Save and then Next.

- Click Enable InstantSearch to add Algolia InstantSearch to your theme.
-
To turn off the default Shopify search results, click Search results then click Save.

-
Click Try Algolia Search to test your new Algolia-powered search.

This step automatically applies the required theme changes.
You can manually configure the same settings but that doesn’t add any extra options or give you any extra control.
You can manually configure the same settings but that doesn’t add any extra options or give you any extra control.
4
Publish your duplicate theme
- Go to Online Store > Themes in your Shopify admin.
-
Select the duplicate theme with Algolia search enabled and click Publish.

Enter credentials manually
Only use this method if your security policy prevents automatic API key creation.
Otherwise, follow the process in the Quickstart.
-
Go to the API Keys page in the Algolia dashboard for the application you’ll use and copy:
- Application ID
- Search API Key
- Admin API Key

-
On the Credentials page in the Algolia AI Search & Discovery app,
paste the credentials you copied from the Algolia dashboard.

-
Optional: set your index prefix, for example,
my_shopify_. The prefix helps to distinguish indices from multiple stores in your Algolia application. - Click Save, then continue with theme configuration.
Advanced customization (optional)
To customize your search experience, you can:- Hide attributes in search results
- Change your CSS selector to use a non-standard search form
- Add Algolia search to collection pages
- Customize your app’s behavior and UI.
Hide attributes in search results
By default, search results show matching records for each indexed attribute. To hide attributes, go to the Algolia dashboard: Search > Configuration > Search behavior > Retrieved attributes > Unretrievable attributes and add the attributes you don’t want to retrieve.Change CSS selector
If you use a non-standard search form, locate the CSS selector in Shopify admin and click Edit to change it from the default:form[action="/search"].
Add Algolia Search to Shopify collection pages
-
In Shopify’s theme customizer, open the Home page menu and select Collections.

-
Select the collection template to which you want to add Algolia InstantSearch.
For example: Default collection.

-
Under Template, click Product grid to turn off the theme’s default product grid.

-
In the theme customizer, open the Home page menu and select Collections list.

-
Under Template, click Collections list page to turn off the theme’s default collections list page.

- Add the InstantSearch app block.
Customize app behavior and UI
Adjust the InstantSearch configuration to control behaviors such as number of hits, sort order, and facets. For more advanced control of the UI, use Autocomplete or InstantSearch custom hooks.Manual theme configuration
This isn’t the recommended process for configuring a theme:
instead, follow the process in the Quickstart.
- Autocomplete uses Shopify app embeds.
- InstantSearch uses Shopify app blocks.
Enable Autocomplete
-
In Shopify’s theme customizer, click Embed apps.

-
Select Algolia Search to enable Algolia for the theme and click Save.

-
To preview the theme, select Options > Preview.

Enable InstantSearch
-
In the theme customizer, open the Home page menu.

-
In the Search online store box, enter
searchto find the search page, then select Search.
-
Under Template, click Search results to turn off the theme’s default search results.

- Add the InstantSearch app block.
Add the InstantSearch app block
-
Under Template, click Add section.
Open the Apps tab and select Algolia InstantSearch.

-
To remove extra padding, click Apps.
Clear the Make section margins the same as theme option.

