PuneetGarg
Nov 10, 2025
  718
(2 votes)

Algolia Search with Optimizely SAAS

Algolia + Optimizely SAAS (Remko Next.js) Integration Guide

This guide explains how to integrate Algolia Search with your Optimizely SaaS CMS project built on the Remko Starter Kit (Next.js).
It focuses on the Crawl Method, which automatically indexes your published Optimizely pages into Algolia — without manual API synchronization.

 

 Overview

Algolia is a powerful, fully managed search-as-a-service platform that delivers lightning-fast, relevant, and typo-tolerant search results.

When connected with Optimizely SaaS, you can enable:

  • Real-time full-text search

  • Category or keyword-based filtering

  • Faceted navigation

  • Personalized content discovery

With the Crawl Method, Algolia automatically reads and indexes your Optimizely site content — no backend coding required.

 

 Prerequisites

Make sure you have the following ready before you begin:

Requirement Description
✅ Optimizely SaaS CMS Project built on Remko Starter Kit (Next.js)
✅ Node.js Version 18+
✅ Algolia Account create from Algolia site
✅ Optimizely API Credentials (Only needed if you plan to fetch content manually)

 

 Setting Up the Algolia Crawler

  1. Log in to your Algolia DashboardCrawler section.

  2. Click “Create a new crawler.”

  3. Add your site URL — e.g.

     
    https://optimizely-something.vercel.app/
  4. Define your crawling rules — typically, you’ll want to include pages that have:

     
    <meta name="title" content="..." />
    <meta name="description" content="..." />
    <meta name="keywords" content="..." />
  5. Start the crawl. Once complete, Algolia will automatically create an index containing your site’s structured content.

Tip: You can view and fine-tune your index data in Algolia → Indices → [your index name].

 

 Environment Variables

These variables connect your frontend with your Algolia app.

Variable Purpose
ALGOLIA_APP_ID Identifies your Algolia app
ALGOLIA_SEARCH_KEY Safe public key for frontend search
ALGOLIA_INDEX_NAME Your index name in Algolia
ALGOLIA_ADMIN_KEY Private admin key (backend use only)
OPTIMIZELY_API_URL Only required for API-based indexing
OPTIMIZELY_API_KEY Access token if using Optimizely REST API

 

Note:

  • NEXT_PUBLIC_ prefix is required so your keys are available in the browser.

  • Do not include your ALGOLIA_ADMIN_KEY in frontend code — it’s sensitive.

 

 Add Algolia to Your Next.js App

Install the required dependencies:

 
npm install algoliasearch react-instantsearch

 


 Implementing the Search Component

Create a file like components/Search.tsx:

 
import algoliasearch from 'algoliasearch/lite';
import { InstantSearch, SearchBox, Hits } from 'react-instantsearch';

const searchClient = algoliasearch(
  process.env.NEXT_PUBLIC_ALGOLIA_APP_ID!,
  process.env.NEXT_PUBLIC_ALGOLIA_SEARCH_KEY!
);

export default function Search() {
  return (
    <InstantSearch
      searchClient={searchClient}
      indexName={process.env.NEXT_PUBLIC_ALGOLIA_INDEX_NAME!}
    >
      <div className="p-6">
        <SearchBox />
        <Hits hitComponent={Hit} />
      </div>
    </InstantSearch>
  );
}

function Hit({ hit }: any) {
  return (
    <div className="p-4 border-b border-gray-200">
      <h3 className="font-semibold text-lg">{hit.title}</h3>
      <p className="text-gray-600">{hit.description}</p>
    </div>
  );
}

Note - you can add pagination , facet and other stuff as well.

 Deploying to Vercel

  • Push your code to GitHub (or GitLab/Bitbucket).

  • Connect your repo to Vercel.

  • In Vercel → Project Settings → Environment Variables, add the same values as in your .env.local.

  • Click Deploy — your search-enabled Optimizely SaaS site goes live!

 

  Advantages of Using Algolia with Optimizely SaaS

Benefit Description
Ultra-Fast Search Delivers instant search results with minimal latency using Algolia’s distributed infrastructure.
Intelligent Relevance Built-in typo tolerance, synonyms, and ranking formulas improve result accuracy.
No Backend Complexity The crawler eliminates the need for building sync APIs — setup takes minutes.
Highly Customizable UI Algolia’s React InstantSearch library allows you to create dynamic and interactive search interfaces.
Built-in Analytics Gain insights into user behavior, popular searches, and zero-result queries.
Scalable & Cloud-Hosted Perfectly complements Optimizely SaaS’s headless architecture and cloud hosting model.
Secure Key Management Use public search keys on frontend, while keeping admin keys private for backend-only tasks.
Nov 10, 2025

Comments

Please login to comment.
Latest blogs
Announcing new library: SettingsManager

When you run .net app, there have been a few ways to store settings. Those can be set via appSettings.json, or via Azure Portal AppService...

Quan Mai | Apr 30, 2026

From Prompting to Production: Optimizely Opal University Cohort and the Future of Agentic MarTech

Most organizations today are still playing with AI. They experiment with prompts, test ideas in isolated chats, and occasionally automate a task or...

Augusto Davalos | Apr 28, 2026

Six Compelling Reasons for Upgrading to CMS 13

Most software updates ask you to keep up. Optimizely CMS 13 asks something different — it asks whether your digital strategy is built for a world...

Muhammad Talha | Apr 28, 2026

Optimizely CMS 13 breaking changes: GetContentTypePropertyDisplayName

When upgrading from CMS 12 to 13, resolving property display names may not work as before. Here’s what changed.

Tomas Hensrud Gulla | Apr 27, 2026 |

Accelerate Optimizely DAM Adoption: Unlocking Business Value with Metadata Bulk Import

Accelerating Optimizely DAM Adoption How a Metadata-Driven Bulk Import Utility Unlocks Real Business Value Executive Summary For enterprises runnin...

Vaibhav | Apr 27, 2026

Optimizely CMS 13 breaking changes: IValidate<T>

Custom IValidate validators in Optimizely CMS 13 are no longer auto-discovered. They must be registered explicitly when upgrading from CMS 12.

Tomas Hensrud Gulla | Apr 27, 2026 |