Skip to content
VercelLogotypeVercelLogotype
LoginSign Up

Algolia Search Starter

Add fast, relevant search to your Next.js app with this Algolia starter. Deploy in one click from the Vercel Marketplace.

DeployView Demo

Algolia Search Starter

A minimal Next.js starter showing how to use Algolia with the Algolia integration on the Vercel Marketplace. Deploy it, seed the sample products, and you have a full search experience — search-as-you-type, highlighting, keyboard navigation (⌘K) — powered by SiteSearch components built on React InstantSearch.

Live demo: algolia-search-starter.vercel.app

Deploy your own

Deploying this starter with the button below installs the Algolia integration on your new project. It provisions an Algolia app and injects the API keys as environment variables — no manual configuration needed.

After the first deploy, seed the sample data once:

git clone https://github.com/<your-account>/algolia-search-starter && cd algolia-search-starter
npm install
npx vercel link # link to the project you just deployed
npx vercel env pull .env.local
npm run seed # pushes data/products.json to the starter_products index

Reload your deployment — search is live.

How it works

The integration injects three environment variables into the Vercel project:

VariablePurposeBrowser-safe?
ALGOLIA_APP_IDIdentifies your Algolia application✅ exposed as NEXT_PUBLIC_ALGOLIA_APP_ID
ALGOLIA_SEARCH_API_KEYSearch-only key used by the frontend✅ exposed as NEXT_PUBLIC_ALGOLIA_SEARCH_API_KEY
ALGOLIA_WRITE_API_KEYIndexing key used by npm run seed❌ server-side only, never exposed

The browser-safe values are mapped in next.config.ts via the env key. The write key is deliberately not mapped.

  • app/page.tsx — landing page rendering the search experience
  • components/search.tsx — SiteSearch component (algoliasearch lite client + react-instantsearch)
  • data/products.json — 20 sample products
  • scripts/seed.mjs — idempotent seed script targeting the starter_products index

Local development

git clone https://github.com/algolia/algolia-search-starter && cd algolia-search-starter
npm install
npx vercel link # link to a Vercel project with the Algolia integration installed
npx vercel env pull .env.local
npm run seed # idempotent - safe to re-run
npm run dev

Open http://localhost:3000 and hit ⌘K.

Learn more

  • Algolia documentation
  • Algolia on the Vercel Marketplace
  • SiteSearch component registry
  • React InstantSearch

License

MIT

GitHub
Owneralgolia
Repositoryalgolia-search-starter
LicenseView License
Use Cases
Starter
AI
Stack
Next.js
Tailwind
Radix UI

Related Templates

Next.js OpenAI Doc Search Starter

Template for building your own custom ChatGPT style doc search powered by Next.js, OpenAI, and Supabase.
Next.js OpenAI Doc Search Starter thumbnail

Agent Stack

  • AI SDK
  • AI Gateway
  • Sandbox
  • Workflows
  • ConnectNew
  • PassportNew
  • eveNew

Core Platform

  • CI/CD
  • Content Delivery
  • Fluid Compute
  • Observability

Security

  • Platform Security
  • WAF
  • Bot Management
  • Bot ID

Tools

  • Vercel DropNew
  • Vercel Agent
  • Vercel PluginNew
  • Agent Skills
  • Next.js
  • Domains
  • v0

Frameworks

  • eveNew
  • Nuxt
  • SvelteKit
  • Nitro
  • Turborepo
  • Tanstack Start
  • FastAPI
  • xmcp
  • All frameworks

SDKs

  • Vercel SDK
  • Workflow SDKNew
  • Flags SDK
  • Chat SDKNew
  • Queues SDKNew
  • Streamdown

Build

  • AI Apps
  • Web Apps
  • Marketing Sites
  • Platforms
  • Commerce
  • Platform Engineers
  • Design Engineers

Learn

  • Docs
  • Blog
  • Changelog
  • Knowledge Base
  • Academy
  • Articles
  • Community

Explore

  • Customers
  • Marketplace
  • Templates
  • Partner Finder
  • Vercel + AWS

Company

  • About
  • Careers
  • Press
  • Events
  • Startups
  • Shipped on Vercel
  • Open Source Program
  • Enterprise
  • Pricing
  • Help

Legal & Trust

  • Privacy Policy
  • Terms of Service
  • Cookie Policy
  • DPA
  • Acceptable Use Policy
  • Legal (all documents)
  • Trust Center
  • Status

Social

  • GitHub
  • X
  • LinkedIn
  • YouTube
  • Instagram
  • VercelVercel
Agent Stack
  • AI SDK
  • AI Gateway
  • Sandbox
  • Workflows
  • Passport
  • eve
Core Platform
  • Security
  • Content Delivery
  • Fluid Compute
  • Observability
  • CI/CD
Tools
  • Next.js
  • Vercel Agent
  • Vercel Plugin
  • Domains↗
  • v0↗
Learn
  • Docs
  • About
  • Blog
  • Changelog
  • Knowledge Base
Build
  • AI Apps
  • Web Apps
  • Marketing Sites
  • Platforms
  • Commerce
Explore
  • Customers
  • Marketplace
  • Partner Finder
  • AWS
  • Community↗
EnterprisePricing
Contact
Log InSign Up
Dashboard

Products

Agent Stack

  • AI SDK
  • AI Gateway
  • Sandbox
  • Workflows
  • Passport
  • eve

Core Platform

  • Security
  • Content Delivery
  • Fluid Compute
  • Observability
  • CI/CD

Tools

  • Next.js
  • Vercel Agent
  • Vercel Plugin
  • Domains↗
  • v0↗
Resources

Learn

  • Docs
  • About
  • Blog
  • Changelog
  • Knowledge Base

Build

  • AI Apps
  • Web Apps
  • Marketing Sites
  • Platforms
  • Commerce

Explore

  • Customers
  • Marketplace
  • Partner Finder
  • AWS
  • Community↗
Enterprise
Pricing
Sign UpLog In
Contact
DeployView Demo

Loading status…

Select a display theme: