> ## Documentation Index
> Fetch the complete documentation index at: https://algolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get started with Algolia search for Shopify

> Add fast, customizable Algolia search to your Shopify or Shopify Plus store.

export const Index = () => <Tooltip tip="An Algolia index is a searchable dataset that consists of records and configuration settings. These settings define how the records are searched and ranked.">
    index
  </Tooltip>;

Algolia AI Search & Discovery replaces the default Shopify search and connects to your Shopify store, indexes your products and collections, and enables fast, relevant search across your site.

Algolia Search & Discovery is a **Shopify Plus certified app**.
You can use it with Shopify Plus and Shopify stores.

## 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](https://www.algolia.com/users/sign_up) for free.
* [Shopify admin access](https://help.shopify.com/en/manual/your-account/logging-in).
* A [duplicate](https://help.shopify.com/en/manual/online-store/themes/managing-themes/duplicating-themes) of a Shopify theme.

<Info>
  Shopify apps can't modify theme code directly.
  To integrate Autocomplete and InstantSearch,
  use the Algolia AI Search & Discovery app's **App Embed** and **App Blocks**.

  For more information, see:

  * [Manual theme configuration](/doc/integration/shopify/getting-started/quick-start#manual-theme-configuration)
  * [Shopify Algolia configuration](/doc/integration/shopify/sending-and-managing-data/algolia-config)
</Info>

## 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.

<Steps>
  <Step title="Install the Algolia AI Search & Discovery app">
    Go to [https://shopify.algolia.com/install](https://shopify.algolia.com/install),
    enter your Shopify domain, and click **Install app**.

    <Tip>
      To quickly access your search settings from the sidebar of Shopify admin,
      click **Pin to your navigation** for the **Algolia AI Search & Discovery** app.

      <img alt="Sidebar in the Shopify admin with the Pin to your navigation button for the Algolia AI Search and Discovery app" src="https://mintcdn.com/algolia/aEHwQtyVTByx4c7q/doc/integration/shopify/getting-started/pin-navigation.png?fit=max&auto=format&n=aEHwQtyVTByx4c7q&q=85&s=e983609562fb86ead1569dfc878aec20" style={{maxWidth: "300px"}} width="980" height="260" data-path="doc/integration/shopify/getting-started/pin-navigation.png" />
    </Tip>
  </Step>

  <Step title="Connect to Algolia">
    1. In the Algolia AI Search & Discovery app, click **Get Started**.

           <img src="https://mintcdn.com/algolia/aEHwQtyVTByx4c7q/doc/integration/shopify/getting-started/get-started.png?fit=max&auto=format&n=aEHwQtyVTByx4c7q&q=85&s=f59eaf5d75b6c868d29992ec1a1f827f" alt="Screenshot of a webpage with a 'Get Started' button and text thanking the user for installing the plugin." width="500" height="606" data-path="doc/integration/shopify/getting-started/get-started.png" />

           <Note>
             If automatic setup fails or your security policy forbids automatic key creation,
             click **[Use manual setup instead](#enter-credentials-manually)**.
           </Note>

    2. Sign in to your Algolia account.

           <img src="https://mintcdn.com/algolia/aEHwQtyVTByx4c7q/doc/integration/shopify/getting-started/4a-algolia-credentials-step.png?fit=max&auto=format&n=aEHwQtyVTByx4c7q&q=85&s=00c89b68d31e11367987a954b968e592" alt="Algolia AI Search and Discovery configuration with a menu to select your Algolia application, API keys, and index prefix" width="700" height="423" data-path="doc/integration/shopify/getting-started/4a-algolia-credentials-step.png" />

       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.

           <Note>
             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.
           </Note>

    3. Click **Save**.
  </Step>

  <Step title="Configure your duplicate theme">
    1. Select your duplicated theme using the drop-down menu and click **Next**.

           <img src="https://mintcdn.com/algolia/aEHwQtyVTByx4c7q/doc/integration/shopify/getting-started/step_1.png?fit=max&auto=format&n=aEHwQtyVTByx4c7q&q=85&s=5061c09f52d44c8e233dee7035eddcf6" alt="Screenshot of a drop-down menu labeled 'Dawn (Current)' in a Shopify integration setup interface." width="929" height="418" data-path="doc/integration/shopify/getting-started/step_1.png" />

    2. Click **Enable Algolia Search** to add Algolia Autocomplete to your theme.

    3. Click **Save** and then **Next**.

           <img src="https://mintcdn.com/algolia/aEHwQtyVTByx4c7q/doc/integration/shopify/getting-started/save_button.png?fit=max&auto=format&n=aEHwQtyVTByx4c7q&q=85&s=93578befcabc28399e2b9e044be99d9d" alt="Screenshot of a theme editor interface showing a 'Save' button with a keyboard shortcut hint 'S' displayed in a tooltip." width="313" height="108" data-path="doc/integration/shopify/getting-started/save_button.png" />

    4. Click **Enable InstantSearch** to add Algolia InstantSearch to your theme.

    5. To turn off the default Shopify search results, click <Icon icon="eye" color="var(--tw-prose-body)" /> **Search results** then click **Save**.

           <img src="https://mintcdn.com/algolia/aEHwQtyVTByx4c7q/doc/integration/shopify/getting-started/step_3_eye_icon.png?fit=max&auto=format&n=aEHwQtyVTByx4c7q&q=85&s=cec8d1cc0dd099a0d39644480ffb3861" alt="Click the eye icon to turn off the default Shopify search results" width="354" height="335" data-path="doc/integration/shopify/getting-started/step_3_eye_icon.png" />

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

           <img src="https://mintcdn.com/algolia/aEHwQtyVTByx4c7q/doc/integration/shopify/getting-started/view_your_algolia_search.png?fit=max&auto=format&n=aEHwQtyVTByx4c7q&q=85&s=01c1c0caf3638bfa43c0b4b9c86d229f" alt="Screenshot of a success screen confirming data indexing in Algolia Search, with a 'Try Algolia Search' button and CSS Selector verification note." width="929" height="441" data-path="doc/integration/shopify/getting-started/view_your_algolia_search.png" />

    <Note>
      This step automatically applies the required theme changes.\
      You can [manually configure the same settings](#manual-theme-configuration) but that doesn't add any extra options or give you any extra control.
    </Note>
  </Step>

  <Step title="Publish your duplicate theme">
    1. Go to **Online Store > Themes** in your Shopify admin.
    2. Select the duplicate theme with Algolia search enabled and click **Publish**.

           <img src="https://mintcdn.com/algolia/aEHwQtyVTByx4c7q/doc/integration/shopify/getting-started/publish-theme.png?fit=max&auto=format&n=aEHwQtyVTByx4c7q&q=85&s=f4c5e77b07c6d294d746eb178c87824f" alt="The theme library section in your theme settings with a publish button" width="1544" height="394" data-path="doc/integration/shopify/getting-started/publish-theme.png" />
  </Step>
</Steps>

## Enter credentials manually

<Note>
  Only use this method if your security policy prevents automatic API key creation.
  Otherwise, follow the process in the [Quickstart](#quickstart).
</Note>

1. Go to the [API Keys](https://dashboard.algolia.com/account/api-keys) page in the Algolia dashboard for the application you'll use and copy:

   * **Application ID**
   * **Search API Key**
   * **Admin API Key**

   <img src="https://mintcdn.com/algolia/aEHwQtyVTByx4c7q/doc/integration/shopify/getting-started/api-keys.png?fit=max&auto=format&n=aEHwQtyVTByx4c7q&q=85&s=7b4c3b72f68ba20984fbb293edc469cf" alt="The API Keys page in the Algolia dashboard with fields for your application ID, search API key, and Admin API key. Copy these credentials to the Algolia AI Search and Discovery app" width="2248" height="946" data-path="doc/integration/shopify/getting-started/api-keys.png" />

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

   <img src="https://mintcdn.com/algolia/aEHwQtyVTByx4c7q/doc/integration/shopify/getting-started/4-algolia-credentials-step.jpeg?fit=max&auto=format&n=aEHwQtyVTByx4c7q&q=85&s=c459264f77967f0f0690e21b1847b2ee" alt="Credentials page in the Algolia AI Search and Discovery app" width="1932" height="842" data-path="doc/integration/shopify/getting-started/4-algolia-credentials-step.jpeg" />

3. Optional: set your <Index /> prefix, for example, `my_shopify_`. The prefix helps to distinguish indices from multiple stores in your Algolia application.

4. Click **Save**, then continue with theme configuration.

## Advanced customization (optional)

To customize your search experience, you can:

* [Hide attributes in search results](#hide-attributes-in-search-results)
* [Change your CSS selector](#change-css-selector) to use a non-standard search form
* [Add Algolia search to collection pages](#add-algolia-search-to-shopify-collection-pages)
* [Customize your app's behavior and UI](/doc/integration/shopify/getting-started/quick-start#customize-app-behavior-and-ui).

### Hide attributes in search results

By default, search results show [matching records for each indexed attribute](/doc/integration/shopify/sending-and-managing-data/schemas#retrievable-attributes).

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](https://dashboard.algolia.com/explorer/configuration/products/retrieved-attributes).

### 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

1. In Shopify's theme customizer, open the **Home page** menu and select **Collections**.

   <img src="https://mintcdn.com/algolia/aEHwQtyVTByx4c7q/doc/integration/shopify/getting-started/customizer-home-page.png?fit=max&auto=format&n=aEHwQtyVTByx4c7q&q=85&s=c40c0f20c319671a4f1467ed716b1ece" alt="Screenshot of a drop-down menu in the theme customizer showing options like 'Home page,' 'Products,' and 'Collections.'" width="917" height="210" data-path="doc/integration/shopify/getting-started/customizer-home-page.png" />

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

   <img src="https://mintcdn.com/algolia/aEHwQtyVTByx4c7q/doc/integration/shopify/getting-started/default-collection.png?fit=max&auto=format&n=aEHwQtyVTByx4c7q&q=85&s=4928314cca22b141dd68af26aeffe6ac" alt="Screenshot of a drop-down menu showing 'Collections' with 'Default collection' assigned to 4 collections and a 'Create template' link." width="502" height="274" data-path="doc/integration/shopify/getting-started/default-collection.png" />

3. Under **Template**, click <Icon icon="eye" color="var(--tw-prose-body)" /> **Product grid** to turn off the theme's default product grid.

   <img src="https://mintcdn.com/algolia/aEHwQtyVTByx4c7q/doc/integration/shopify/getting-started/turn-off-default-product-grid.png?fit=max&auto=format&n=aEHwQtyVTByx4c7q&q=85&s=e8c51d39f05dfdaaa5071205ddadce38" alt="Screenshot of a Shopify theme editor showing 'Default collection' with 'Announcement bar,' 'Header,' 'Collection banner,' and 'Product grid' options." width="355" height="545" data-path="doc/integration/shopify/getting-started/turn-off-default-product-grid.png" />

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

   <img src="https://mintcdn.com/algolia/aEHwQtyVTByx4c7q/doc/integration/shopify/getting-started/customizer-collection-list-start.png?fit=max&auto=format&n=aEHwQtyVTByx4c7q&q=85&s=557b68a77a334014fc36856c6700296e" alt="Screenshot of a drop-down menu with options: 'Home page,' 'Products,' 'Collections,' 'Collections list,' 'Pages,' and 'Blogs.'" width="578" height="352" data-path="doc/integration/shopify/getting-started/customizer-collection-list-start.png" />

5. Under **Template**, click <Icon icon="eye" color="var(--tw-prose-body)" /> **Collections list page** to turn off the theme's default collections list page.

   <img src="https://mintcdn.com/algolia/aEHwQtyVTByx4c7q/doc/integration/shopify/getting-started/turn-off-collection-list.png?fit=max&auto=format&n=aEHwQtyVTByx4c7q&q=85&s=dc601e242546aa7488630e27ec891e6b" alt="Screenshot of a Shopify theme editor showing the 'Collection list' page with options to add sections and toggle the 'Collections list page' template." width="358" height="495" data-path="doc/integration/shopify/getting-started/turn-off-collection-list.png" />

6. [Add the InstantSearch app block](#add-the-instantsearch-app-block).

### Customize app behavior and UI

Adjust the [InstantSearch configuration](/doc/integration/shopify/building-search-ui/instant-search#configuration) to control behaviors such as number of hits, sort order, and facets.
For more advanced control of the UI, use [Autocomplete](/doc/integration/shopify/building-search-ui/autocomplete-hooks) or
[InstantSearch](/doc/integration/shopify/building-search-ui/instantsearch-hooks) custom hooks.

## Manual theme configuration

<Note>
  This isn't the recommended process for configuring a theme:
  instead, follow the process in the [Quickstart](#quickstart).
</Note>

Algolia attaches to your theme with [Shopify app embeds and blocks](https://help.shopify.com/en/manual/online-store/themes/customizing-themes/apps):

* **Autocomplete** uses Shopify app embeds.
* **InstantSearch** uses Shopify app blocks.

### Enable Autocomplete

1. In Shopify's theme customizer, click **Embed apps**.

   <img alt="Screenshot of the Shopify theme customizer showing the 'App embeds' icon selected and the 'Algolia Search' app listed below." src="https://mintcdn.com/algolia/aEHwQtyVTByx4c7q/doc/integration/shopify/getting-started/find-embeded-apps.png?fit=max&auto=format&n=aEHwQtyVTByx4c7q&q=85&s=ddf4aa4b9f34fac5fc102d8d827a7e43" style={{maxWidth: "350px"}} width="704" height="754" data-path="doc/integration/shopify/getting-started/find-embeded-apps.png" />

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

   <img alt="The Algolia Search app toggle in the Shopify theme customizer" src="https://mintcdn.com/algolia/aEHwQtyVTByx4c7q/doc/integration/shopify/getting-started/enable-algolia.png?fit=max&auto=format&n=aEHwQtyVTByx4c7q&q=85&s=f44929e1dbef5e58251851fe76e9f95a" style={{maxWidth: "350px"}} width="698" height="670" data-path="doc/integration/shopify/getting-started/enable-algolia.png" />

3. To preview the theme, select <Icon icon="ellipsis" color="var(--tw-prose-body)" /> **Options > Preview**.

   <img alt="Screenshot of a drop-down menu in the Shopify theme customizer showing options for the 'Dawn 12.0.0' theme, with 'Preview' highlighted." src="https://mintcdn.com/algolia/aEHwQtyVTByx4c7q/doc/integration/shopify/getting-started/preview-algolia.png?fit=max&auto=format&n=aEHwQtyVTByx4c7q&q=85&s=efc9ab74e019510fb1678386e08b8420" style={{maxWidth: "350px"}} width="692" height="662" data-path="doc/integration/shopify/getting-started/preview-algolia.png" />

### Enable InstantSearch

1. In the theme customizer, open the **Home page** menu.

   <img src="https://mintcdn.com/algolia/aEHwQtyVTByx4c7q/doc/integration/shopify/getting-started/customizer-home-page.png?fit=max&auto=format&n=aEHwQtyVTByx4c7q&q=85&s=c40c0f20c319671a4f1467ed716b1ece" alt="Screenshot of the theme customizer with the 'Home page' drop-down menu open, showing options for 'Home page,' 'Products,' and 'Collections.'" width="917" height="210" data-path="doc/integration/shopify/getting-started/customizer-home-page.png" />

2. In the **Search online store** box, enter `search` to find the search page, then select <Icon icon="panels-top-left" color="var(--tw-prose-body)" /> **Search**.

   <img src="https://mintcdn.com/algolia/aEHwQtyVTByx4c7q/doc/integration/shopify/getting-started/search-page.png?fit=max&auto=format&n=aEHwQtyVTByx4c7q&q=85&s=bb1f2e4fe4bdd26613ef1db8e3582cb9" alt="Screenshot of a search box in the theme customizer with the text 'Search' entered and a 'Cancel' button." width="2106" height="362" data-path="doc/integration/shopify/getting-started/search-page.png" />

3. Under **Template**, click <Icon icon="eye" color="var(--tw-prose-body)" /> **Search results** to turn off the theme's default search results.

   <img src="https://mintcdn.com/algolia/aEHwQtyVTByx4c7q/doc/integration/shopify/getting-started/turn-off-default-search.png?fit=max&auto=format&n=aEHwQtyVTByx4c7q&q=85&s=4f1910700ad9a63d877c49e539e94b90" alt="Screenshot of a 'Search' settings panel with 'Header,' 'Template,' and 'Footer' sections, each with an 'Add section' button." width="350" height="436" data-path="doc/integration/shopify/getting-started/turn-off-default-search.png" />

4. Add the InstantSearch app block.

### Add the InstantSearch app block

1. Under **Template**, click **Add section**.
   Open the **Apps** tab and select **Algolia InstantSearch**.

   <img src="https://mintcdn.com/algolia/aEHwQtyVTByx4c7q/doc/integration/shopify/getting-started/add-instantsearch.png?fit=max&auto=format&n=aEHwQtyVTByx4c7q&q=85&s=030f3eefbbe28e0b7bc6688bd9bef2ca" alt="Screenshot of a drop-down menu showing the 'Algolia InstantSearch' app option with a blue icon, listed under 'Apps' with a 'View apps' link below." width="588" height="334" data-path="doc/integration/shopify/getting-started/add-instantsearch.png" />

2. To remove extra padding, click **Apps**.

   <img src="https://mintcdn.com/algolia/aEHwQtyVTByx4c7q/doc/integration/shopify/getting-started/parent-app.png?fit=max&auto=format&n=aEHwQtyVTByx4c7q&q=85&s=fa4edbc1a45fd1fdd89c06d12ca31e60" alt="Screenshot of a Shopify admin interface showing the 'Apps' section with 'Algolia InstantSearch' listed, and an 'Add block' option below it." width="350" height="434" data-path="doc/integration/shopify/getting-started/parent-app.png" />

   Clear the **Make section margins the same as theme** option.

   <img src="https://mintcdn.com/algolia/aEHwQtyVTByx4c7q/doc/integration/shopify/getting-started/remove-padding.png?fit=max&auto=format&n=aEHwQtyVTByx4c7q&q=85&s=a198d6e4ed2cd28ca0b81ccf8204e4d7" alt="Screenshot of the 'Apps' section with 'Make section margins the same as theme,' 'Theme Settings,' and 'Custom CSS' options." width="353" height="259" data-path="doc/integration/shopify/getting-started/remove-padding.png" />
