client-side search

Fast client-side search engine.

Sprigr hosts your records and compiles them into a binary index that a lightweight WebAssembly engine downloads once and queries in the browser. Keyword queries answered locally in under 10 ms on typical indexes, zero per-search costs.

sprigr · new workflow listening
Example run · 41 actions hover the gate to approve it yourself
the client-side search back office

Every keystroke runs locally in the browser. Under 10 ms per query on typical indexes, engine already loaded so no cold starts, zero per-query costs, keyword queries never leave the browser, and keyword search works offline after the initial load. Hybrid semantic mode sends each query to /1/embed for an embedding; analytics events are stored server-side only if you send them.

You focus on the work. Sprigr runs the paperwork.

what it handles
  • Sub-10ms on typical indexes
  • Keyword queries run locally
  • Isolated per tenant
  • Offline-capable
what it runs

Under the hood

The engineering inside the in-browser engine.

  • Bitmap-based filtering

    Facet filters are packed bitmaps combined with bitwise AND and popcount, so filtering across dozens of attributes costs a handful of word operations per record rather than a scan.

  • Typo-tolerant scoring

    Levenshtein distance with a length pre-filter that rules out impossible matches before the edit-distance pass. A single-row DP computes the rest. Words under 4 characters allow 0 typos; 4 to 7 allow 1; 8+ allow 2, tunable per index.

  • Compact compiled index

    A custom binary format with a shared string table, packed bitmaps, and varint encoding. Large indexes are split into shards that load in parallel for faster startup.

  • Prefix matching

    As-you-type prefix indexing means results appear from the first keystroke. Exact, prefix, synonym, and typo matches are scored in tiers so the closest match ranks first.

  • 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.

how it starts

How client-side search works

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

  1. 01

    Push your data

    Send records to the Sprigr REST API. Products, articles, docs, any JSON. Records are stored on Cloudflare, isolated per tenant. The API is familiar if you have used Algolia.

  2. 02

    We compile it into a search index

    Sprigr builds a compact binary index optimized for native speed in the browser. Indexes with semantic search enabled are larger because they carry the embedded vectors.

  3. 03

    Users search locally

    The lightweight search engine, compiled to WebAssembly, downloads the index once and answers keyword queries locally, typically in under 10 ms on typical indexes. Hybrid semantic mode fetches one query embedding from /1/embed per search and ranks locally.

Install @sprigr/browser, download your index once from GET /1/indexes/{index}/export/binary, and query it locally: import init, { SearchEngine } from "@sprigr/browser"; await init(); const engine = new SearchEngine(); engine.load_binary_index(bytes); const hits = JSON.parse(engine.search("keyboard", "", 20, 0));. Every keystroke after that is answered in the browser.

Read the docs →
questions

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 engine itself is a few hundred kilobytes of WebAssembly. The index size depends on your record count and text volume; indexes with semantic search enabled include vector embeddings and are larger. Large indexes are automatically split into shards that load in parallel. Serve the index with normal HTTP caching headers and repeat visits skip the download.

Does client-side search work offline?

Keyword search does. Once the engine and index are loaded, keyword queries, filters, and highlighting run locally with no network dependency, which suits PWAs and apps with spotty connectivity. Hybrid semantic mode needs a network call per query to fetch the embedding.

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.

client-side search

Try client-side search for free.

Paid plans from $49 a month.