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.
1️⃣ 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.
2️⃣ 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 one here |
| ✅ Optimizely API Credentials | (Only needed if you plan to fetch content manually) |
3️⃣ Setting Up the Algolia Crawler
-
Log in to your Algolia Dashboard → Crawler section.
-
Click “Create a new crawler.”
-
Add your site URL — e.g.
-
Define your crawling rules — typically, you’ll want to include pages that have:
-
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].
4️⃣ 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_KEYin frontend code — it’s sensitive.
5️⃣ Add Algolia to Your Next.js App
Install the required dependencies:
6️⃣ Implementing the Search Component
Create a file like components/Search.tsx:
Comments