Add fast, typo-tolerant search to your Next.js application without building API routes, managing a search backend, or configuring edge functions. Sprigr compiles your content into a client-side search engine that searches entirely in the browser.
Your content is compiled into a client-side search engine that runs in the browser. No API routes, no edge functions, no search backend. Works identically whether your app is server-rendered, statically exported, or using the App Router with React Server Components.
Client-side engine Sprigr
No API routes Sprigr
Works with any mode Sprigr
Under 10ms queries Sprigr
You focus on the work. Sprigr runs the paperwork.
Works with every rendering mode
Sprigr runs client-side, so it adapts to however you build your Next.js app.
Static Site Generation (SSG)
Statically exported Next.js sites have no server to run search queries. Sprigr eliminates this limitation. Search loads as a client-side module alongside your static HTML. Use next export with full search functionality.
Server-Side Rendering (SSR)
For SSR pages, Sprigr hydrates alongside your React components. The search input renders immediately, and the search engine loads in the background. Users get instant results without waiting for server-rendered search markup.
App Router & Server Components
The App Router uses React Server Components by default, which cannot run browser APIs. Sprigr works perfectly here. Load the script in your root layout and use the search UI in any "use client" component. No conflicts with streaming or Suspense boundaries.
Incremental Static Regeneration
ISR lets Next.js regenerate pages on demand. Push content updates to Sprigr from the same build hook that triggers ISR, and your search index stays in sync with your content without manual effort.
Edge runtime compatible
Sprigr runs entirely client-side, so it works with Next.js Edge Runtime, Vercel Edge Functions, and Cloudflare Pages. The search engine doesn't need Node.js, a database, or any server-side infrastructure.
No Lighthouse penalty
The Sprigr script is lightweight and loads asynchronously with the afterInteractive strategy. It doesn't block rendering and doesn't impact Core Web Vitals. Your Lighthouse score stays where it is.
How Sprigr works with Next.js
Three steps to instant client-side search in your Next.js app.
01
Push your content
Send your pages, products, or docs to the Sprigr REST API. Use a build script, a CI/CD step, or push from a CMS webhook. The API accepts any JSON structure.
02
Add the script to your layout
Drop one <Script> tag into your root layout or _app.tsx. Sprigr loads the search engine and your pre-compiled index asynchronously. No blocking, no layout shift.
03
Search runs in the browser
Every query executes locally in the browser in under 10 ms. No network calls, no cold starts, no API rate limits. Results include typo tolerance, highlighting, and faceted filtering.
Add <Script src="https://cdn.sprigr.com/v1/sprigr.js" data-index="your-index-id" data-key="your-search-api-key" strategy="afterInteractive" /> to your root layout. Then call window.sprigr.search(query, { limit: 10 }) from any "use client" component. That's the entire integration.
Yes. Sprigr loads as a client-side script, so it works alongside React Server Components and client boundaries. Add the script to your root layout and use the search component in any "use client" component. There are no conflicts with streaming, Suspense, or partial prerendering.
What about SSG and static export?
Sprigr is an ideal search solution for statically exported Next.js sites. Since all search happens client-side, there is no server or API route required. Your exported HTML files work exactly the same as a fully dynamic deployment.
How do I update the search index when content changes?
Push updated records to the Sprigr REST API. You can do this from a build script that runs during next build, from a CI/CD pipeline, from a CMS webhook, or manually via the Sprigr admin dashboard. Sprigr recompiles your search index automatically after each update.
Can I use Sprigr with Remix, Gatsby, or other React frameworks?
Yes. Sprigr is framework-agnostic. It loads as a standard script tag and runs in the browser, so it works with any React-based framework including Remix, Gatsby, Astro with React islands, and plain Create React App.
Does Sprigr affect my Lighthouse score?
The Sprigr script is lightweight and loads asynchronously using the afterInteractive strategy. The search engine and your search index load on demand after the page is interactive, so they do not block rendering or impact your Core Web Vitals scores.
Add instant search to your Next.js app.
Free forever for small projects. Paid plans from $49/mo.