Blazingly Fast Client-Side Search Engine

Sprigr compiles your search index into a lightweight engine that runs entirely in the browser. Sub-10ms queries, zero server calls, zero per-search costs.

Start Free — No Credit Card

How client-side search works

Three steps from your data to instant, in-browser search.

1

Push your data

Send records to the Sprigr REST API. Products, articles, docs, any JSON. The API is familiar if you have used Algolia.

2

We compile it into a search index

Sprigr builds a compact compiled search index optimized for native speed in the browser. A typical 10,000-record index is 1–5 MB for keyword search. Indexes with semantic search enabled are larger due to embedded vectors.

3

Users search locally

The lightweight search engine, compiled to WebAssembly, loads in the browser. Every keystroke is scored, filtered, and highlighted locally in under 10 ms.

Why client-side beats server-side search

Traditional search sends every keystroke over the network. Client-side search keeps everything local.

Server-side search

  • 100–300 ms per keystroke (network round-trip)
  • Cold starts on serverless platforms
  • Rate limits and per-query billing
  • User queries logged on third-party servers
  • Breaks when offline or on slow connections

Client-side search (Sprigr)

  • Sub-10 ms per keystroke (local computation)
  • No cold starts, engine is already loaded
  • Zero per-query costs, no rate limits
  • No user data leaves the browser
  • Works offline after initial load

Under the hood

The engineering that makes sub-10ms search possible in a lightweight, in-browser engine.

Bitmap-based filtering

Facet filters use bitwise AND + popcount operations, processing 64 results at a time. Filter 10,000 records across dozens of attributes in microseconds.

Typo-tolerant scoring

Levenshtein distance with length pre-filtering skips 90% of impossible matches. Single-row byte-level DP computes the rest. Words under 4 characters allow 0 typos; 4–7 allow 1; 8+ allow 2.

Compact compiled index

A custom binary format with a shared string table, packed bitmaps, and varint encoding. A 10,000-record product catalog compresses to 1–5 MB of keyword index data. Large indexes over 5,000 objects are loaded in parallel shards for faster startup.

Prefix matching

As-you-type prefix indexing means results appear from the first keystroke. Combined with trigram overlap scoring for partial and fuzzy matches.

Global edge deployment

Sprigr’s backend runs on a global edge network across 300+ locations. Your compiled search index is served from the nearest edge node, minimizing initial load time.

Highlight matching

Results include highlighted matches for exact, prefix, and fuzzy/typo matches. Even misspelled words are highlighted in the results so users understand why a result matched.

One script tag. Instant search.

Drop the Sprigr widget into any page. The search engine loads your pre-compiled index and searches locally.

HTML
<script src="https://cdn.sprigr.com/v1/sprigr.js"
        data-index="your-index-id"
        data-key="your-search-api-key"></script>

That is the entire client-side integration. The REST API handles data ingestion, and the in-browser search engine handles queries. No backend code required on your end.

Frequently asked questions

What browsers support client-side search?

All modern browsers support Sprigr's client-side search engine, covering over 96% of global users. This includes Chrome, Firefox, Safari, Edge, and mobile browsers on iOS and Android. For the rare legacy browser, Sprigr can fall back to a server-side REST API.

How large is the client-side search index?

The Sprigr search engine is lightweight and loads quickly. The search index size depends on your data, typically 1–5 MB for 10,000 records with keyword search. Indexes with semantic search enabled include vector embeddings and are larger. Large indexes are automatically split into parallel-loaded shards for fast startup. The index is cached by the browser, so subsequent visits are instant.

Does client-side search work offline?

Yes. Once the search engine and compiled index are loaded in the browser, all search queries run locally with no network dependency. This makes Sprigr ideal for PWAs, mobile apps with spotty connectivity, and offline-capable applications.

Can I fall back to a REST API for search?

Yes. Sprigr provides a standard REST API for server-side search alongside the client-side search engine. You can use the API for server-rendered pages, legacy browsers, or very large indexes that exceed the practical client-side size limit.

How does Sprigr compare to other client-side search tools?

Open-source tools like Stork Search (now unmaintained) and Tinysearch pioneered client-side search, but require you to host and compile indexes yourself. Sprigr is a managed service: you push data via API, and we handle index compilation, hosting, updates, and analytics. Learn more about migrating from Stork Search.

Try client-side search for free

Free forever for small projects. Paid plans from $49/mo.

Start Free — No Credit Card