Using the Algolia integration

The Algolia integration allows you to bind records from an Algolia search index to component parameters.

Once you've installed the integration, the next step is to connect Algolia to your Uniform project by creating a new data source.

  1. Navigate to Experience > Data Types. A data type is an element that can be retrieved from a data source, so the first step is to identify a data source.

  2. Create a new data source by clicking the Add data type button and select the "Create new" option under the Algolia label.

    Where to create a new data type from the available data sources.
  3. Provide details specific to the Algolia application you are connecting to:

    Application ID
    API Key
  4. Name your data source. Choose a name that helps to inform your editorial users where the content is coming from. The name of the Algolia application is a good option here.

Use multiple applications

You may have more than one application that you are using with Algolia, perhaps to separate content used across different sites or different brands.

By repeating the preceding steps, you can support any number of Algolia applications within a single Uniform project, allowing you to bring content together from across your Algolia applications.

Before you start connecting Algolia data to your Uniform compositions, it's important to first create some data types. Data types define which types of Algolia data editors can use. This could be simple, like allowing an editor to select a single "hero" entity, or more perhaps a more complex query such as "the five latest news article entries."

Go to Experience > Data Types and click the Add data type button from below the Algolia data source that you set-up earlier.

Add a data type after selecting the data source.

Next, you will want to select and configure an archetype from the options below:

The recommend selector is useful for returning a records that are recommended based on the record selected by the editor.

The screen where you select the record to get recommendations for.

The query archetype will always return a list of records, up to the limit set by the editor in Uniform. This can be useful for dynamic queries where the most up-to-date information is needed, such as a "latest content" section.

Retrive records by a query.

The single record archetype will always return a single record from Algolia, based on a selection by the editor in Uniform. This is useful for non-list elements that render as an independent item, such as a single "hero" record or "article" record. It can accept a variable from a dynamic token (such as a slug) and retrieve the corresponding record.

Select a single record from available data.

The multiple records archetype lets an editor hand pick multiple records to render as a list. This is useful when a small selection of specific records is required, such as in a "featured articles" carousel.


Once you have configured your data types, they can be used to bind parameters on compositions, components and compositions to Algolia records.