# InstantSearch adapter: run InstantSearch.js, React, Vue and Svelte on Typemo

> Run your InstantSearch.js, React, Vue or Svelte InstantSearch UI on a new search backend by swapping the search client, with typo tolerance, merchandising and analytics behind your widgets.

Source: https://typemo.com/features/instantsearch

InstantSearch

# Keep your InstantSearch UI, upgrade the search behind it

Swap the search client and your InstantSearch.js, React, Vue or Svelte widgets run on your own collection, with typo tolerance, merchandising and analytics behind them. Templates, routing and styles stay as they are.

[Get started](https://typemo.com/register) [Read the guide](https://docs.typemo.com/developers/instantsearch/)

```tsx
import { instantTypemo } from '@typemo-org/instantsearch-adapter';

const { searchClient, insights } = instantTypemo({
  apiKey: 'sq_your_read_only_key'
});

export const Search = () => (
  <InstantSearch
    indexName="products"
    searchClient={searchClient}
    insights={insights}
  >
    <SearchBox />
    <RefinementList attribute="brand" />
    <Hits />
  </InstantSearch>
);
```

```vue
<script setup>
import { instantTypemo } from '@typemo-org/instantsearch-adapter';

const { searchClient, insights } = instantTypemo({
  apiKey: 'sq_your_read_only_key'
});
</script>

<template>
  <AisInstantSearch
    index-name="products"
    :search-client="searchClient"
    :insights="insights"
  >
    <AisSearchBox />
    <AisRefinementList attribute="brand" />
    <AisHits />
  </AisInstantSearch>
</template>
```

```svelte
<script>
  import { instantTypemo } from '@typemo-org/instantsearch-adapter';
  import { InstantSearch, SearchBox, Hits } from '@typemo-org/svelte-instantsearch';

  const { searchClient, insights } = instantTypemo({
    apiKey: 'sq_your_read_only_key'
  });
</script>

<InstantSearch indexName="products" {searchClient} {insights}>
  <SearchBox />
  <Hits />
</InstantSearch>
```

```ts
import { instantTypemo } from '@typemo-org/instantsearch-adapter';

const { searchClient, insights } = instantTypemo({
  apiKey: 'sq_your_read_only_key'
});

const search = instantsearch({
  indexName: 'products',
  searchClient,
  insights
});

search.addWidgets([
  searchBox({ container: '#searchbox' }),
  refinementList({ container: '#brand', attribute: 'brand' }),
  hits({ container: '#hits' })
]);

search.start();
```

One adapter for every flavour

* React InstantSearch
* Vue InstantSearch
* Svelte InstantSearch
* InstantSearch.js

How it works

## Switch in three steps

If your UI already runs on InstantSearch, the search client is the only thing that changes.

1. Install the adapter Add @typemo-org/instantsearch-adapter beside the InstantSearch flavour you use.
2. Create the search client One call with a read-only key returns the search client and the insights client.
3. Keep your widgets Pass both to InstantSearch with your collection as the index. Your widgets work as they are.

What you gain

## More than a drop-in backend

Standard widgets work unchanged, and the features a store needs are one setting away.

Search features

### Variants, pins and completions in one setting

Group a product’s colours and sizes into one card, pin items to the top, keep ruled-out filter values visible and add query completions, all from configure().

[Search parameters](https://docs.typemo.com/developers/instantsearch-adapter/#typemo-parameters)

configure

```ts
configure({
  typemo: {
    groupBy: 'parent_id',          // one card per product
    unavailableFacetValues: true,  // keep ruled-out values, marked
    pinIds: ['1001', '1002'],      // pinned to the top
    autocomplete: true             // query completions
  }
});
```

Merchandising

### Your merchandising team works without a deploy

Pins, boosts and redirects set in the dashboard shape every result your UI shows. A redirect arrives where InstantSearch expects one.

[Merchandising](https://typemo.com/features/merchandising)

![Custom results: Summer edit with four pins, Gift guide pinning by a rule, Returns page sending its query to a page](https://typemo.com/images/site/close-rules.jpg)

Analytics

### Analytics from the insights you already send

Searches, clicks, add-to-carts and purchases sent through InstantSearch insights fill your search analytics and the popularity that orders your results.

[Events](https://docs.typemo.com/developers/instantsearch-adapter/#events)

![Top five queries with their searches, clicks, CTR, average position and growth](https://typemo.com/images/site/close-queries.jpg)

## What you keep, and what you gain

### Your widgets

SearchBox, RefinementList, Hits, Highlight and Pagination work as they are, with your templates, routing and styles.

### Every flavour

One adapter for InstantSearch.js, React, Vue and Svelte, with server-side rendering in SvelteKit.

### Hybrid search

On paid plans, semantic search adds matches by meaning behind the same UI, with no new interface to build.

### Merchandising

Pins, boosts and redirects set in the dashboard apply to every request, without a deploy.

### Analytics

Searches, clicks and conversions sent through insights fill the dashboard, zero-result and no-click reports included.

### Hosted in the EU

Your collection is stored and searched in Germany, under EU rules.

FAQ

## Frequently asked questions

[Contact our team](https://typemo.com/contact)

### Which widgets work without changes?

SearchBox, RefinementList, Hits, Highlight and Pagination, and any widget that filters through facetFilters or numericFilters. RangeInput and RangeSlider need the field set as a range filter on the collection. A searchable RefinementList matches the typed text among the field’s first 1,000 values. Every attribute you filter by has to be set as a filter on the collection.

### How do sorting and SortBy work?

An index name is a collection id, and a sorted view is collection:field:asc or collection:field:desc, so a SortBy lists products and products:price:asc. Any other shape throws an error.

### How does highlighting work?

Name the text fields in highlightFields when you create the client, and the Highlight widget marks the typed words as before. A request that sets attributesToHighlight uses its own list.

### Do facet counts behave the same?

Counts are always disjunctive, lists with operator and included; their hits are right. Facet values come ordered by count, and a widget’s own sortBy overrides it.

### How many requests does a search make?

One per visitor action. InstantSearch’s per-facet sub-requests are answered from the same search, facet counts included, and a hierarchical menu stays at one request once its levels are declared.

### Is anything not supported?

The filters string and tagFilters (use facetFilters), and geo search: aroundLatLng, insideBoundingBox and insidePolygon. The adapter throws an error for each. View and filter events are not recorded.

### How is the region set?

The url option names the search host, and its default is https\://search.typemo.com. A project runs in one region, chosen when it is created; today that is the EU. A browser should call its region’s address directly, and searchUrl in https\://search.typemo.com/init/{key} names that address.

### Which key does it use?

A Read only key, which answers only on your allowed domains. The key rides in the request URL, so the adapter refuses a Write & Read key.

### How do my records get in?

The same way as any catalog: a store address, a feed, a database table or a push from your server. A push carries up to 1,000 documents per request, and id is the only field the API requires.

### Which InstantSearch flavours are supported?

InstantSearch.js, React InstantSearch, Vue InstantSearch and Svelte InstantSearch, with one adapter. The Svelte package needs Svelte 5.25 and SvelteKit 2.12 or later and renders the first page on the server.

### Can I use the API without InstantSearch?

Yes. The same collections answer the Search API and the TypeScript SDK, with the same ranking and rules.

## One index for your widget, your API calls and your agents.

[Get started](https://typemo.com/register) [See plans](https://typemo.com/pricing)
