Instant Typeahead Search
With Instant Typeahead Search, you can provide autocomplete suggestions as the user is typing. Even if they've only typed one or two characters, Miso can anticipate what they're looking for and connect them with the right products on your site.
Introduction
Modern search engines such as Google and Bing have ushered in a new era of search functionality where users expect their queries to autocomplete as they type — even after a single character. Instant Typeahead Search, often referred to as Search as You Type (SAYT), Hot Search, or Incremental Search, anticipates what your users are looking for based on their real-time behavioral signatures and connects them with the relevant products on your site. Miso’s mission of democratizing search algorithms means that we can implement this feature on your site, personalized to your user data and product catalog.
Aside from modernizing your e-commerce site’s search experience, Instant Typeahead Search helps reduce spelling errors and abandoned searches by giving customers suggested queries that will guarantee relevant results or simply funnel them directly into a product detail page.
Here’s an example of a customer searching “ba” using Instant Typeahead Search:
Since real-time personalization is at the core of Miso, Miso’s Search Engine will learn, based on the real-time generated user insights, that a customer typing “ba” is likely looking for products related to “baby” and will therefore suggest products with “baby” in the title (as opposed to “baseball”, “barbasol”, or “bass guitar”).
Do it with APIs
To enable Instant Typeahead Search, incrementally call Miso’s Autocomplete API as the user is typing in the search bar (Note: Miso’s pricing model is set to charge every fifth Autocomplete API call since a query using Instant Typeahead Search usually requires multiple calls). Our previous example of a user typing “ba” would have an API request that looks like the following:
POST /v1/search/autocomplete
{
"q":"ba",
"user_id":"user-123"
}
The response might look like this:
{
"message": "success",
"data": {
"completions": {
"suggested_queries": [
{
"text": "baby wipes"
},
{
"text": "baby food"
},
{
"text": "baby bottle"
},
],
"title": [
{
"text": "Pampers Baby Wipes Sensitive 56ct",
"product": {
"product_id": "pampers-baby-wipes"
}
},
{
"text": "Pampers Diapers Baby-Dry Size 6 21ct",
"product": {
"product_id": "pampers-diapers-baby-dry"
}
},
]
}
}
}
(Note: the response has been condensed for illustrative purposes)
By default, Instant Typeahead Search only matches the user’s incomplete queries to product titles. However, you can specify the product attribute(s) to search against using the completion_fields
parameter. For example, suppose you want to search against the product title and brand. The API request would look like the following:
POST /v1/search/autocomplete
{
"q":"ba",
"user_id":"user-123",
"completion_fields": ["title", "brand"]
}
Additional Resources
For more information on Miso’s Search API, check out the official API Documentation.
For more recipes like this, visit the Recipes page on our Docs site.
Published Date: November 2nd, 2022
API Reference
Need more info on the API? Check out our dedicated API page with all the info you could ever want.
Read API Reference