Browser SDK

A typed JavaScript client for AACsearch. Single search, federated multi-search, facets — under 50ms p99.

Search from the browser

NPM package. TypeScript types. Works in React, Vue, Svelte, Astro, or plain JS. No backend proxy required.

Full TypeScript types

Autocomplete on every method. No guessing response shapes. Types ship with the package — no @types/ needed.

Single search

search(indexSlug, query, options) → typed results. Facets, filters, sort, pagination — all in the options object.

Multi-search (federated)

multiSearch([...queries]) → typed results array. One HTTP request, parallel execution, independent facets.

Scoped token support

Initialise with a short-lived scoped token from your server. The SDK attaches it automatically to every request.

Typed error handling

Typed error objects with slug (search_failed, quota_exceeded, rate_limited). Catch and handle programmatically.

Under 5KB gzipped

Tree-shakeable ESM build. Only the methods you import are bundled. No runtime dependencies.

Launch Search OS in one evening

Create an index, add documents and connect search from your app. Free tier covers a prototype — data persists when you upgrade.