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.

Example for Instant Typeahead Search

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
Icon/Activity Icon/Add Icon/API Icon/Arrow/Down Icon/Arrow/Left Icon/Arrow/Right Icon/Arrow/TopRight Icon/Arrow/Up Icon/Bento Icon/Billing Icon/Bin Icon/Book Icon/Bookmark/Default Icon/Bookmark/Filled Icon/Calendar Icon/Caret/Down Icon/Caret/Up Icon/Chavron/DownIcon/Chavron/LeftIcon/Chavron/RightIcon/Chavron/UpIcon/Checknox/CheckedIcon/Checknox/Unchecked Icon/Checklist Icon/Chip Icon/Clipboard / Copied Icon/Clipboard/Default Icon/Clock/Stopwatch Icon/CMD Icon/Data/Catalog Icon/Data/Engine Icon/Data/Group Icon/Data/Interact Icon/Data/Users Icon/Dive Icon/Docs/Key Icon/Dojo Icon/Email Icon/Env/Development Icon/Env/Playground Icon/Env/Prod Icon/Folder Icon/Fullscreen/Collapse Icon/Fullscreen/Expand Icon/Guides/Multiple Icon/Guides/Single Icon/Hashtag Icon/Heart/Outline Icon/Heart/Solid Icon / Cart z Icon / Click Icon / Clock Icon / Data Icon / Doc Icon / EmptyCart z Icon/Social/Facebook Icon / Genome Incognito Icon / Money Icon/Social/ProductHunt Icon / Search Icon/Social/Twitter Icon / User Icon/Info/Error Icon/Info/Info Icon/Info/Question Icon/Info/Warning Icon/Interact/Download Icon/Interact/Edit Icon/Interact/External v2 Icon/Interact/External Icon/Interact/Filter Icon/Interact/Logout Icon/Interact/Options Icon/Interact/Re-order Icon/Interact/Reload Icon/Interact/Remove Icon/Interact/Replace Icon/Interact/Search Icon/Interact/Shuffle Icon/Interact/Undo Icon/Interact/Upload Icon/Interact/Video Icon/Invoice Icon/Loading Icon/Loading Icon/Lock/Locked Icon/Lock/Unlocked Icon/Lock Icon/Mapping Menu Icon/Notification Icon/Overview Icon/Person/Team Icon/Person/User Icon/Plan/Enterprise Icon/Plan/Growth Icon/Plan/Startup Icon/Plan/Trial Icon/Recipe Icon/Rocket Icon/Settings/App Icon/Settings/User Icon/Settings Icon/Shrine Icon/Sidebar/Close Icon/Sidebar/Open Icon/Slideout Icon/Sort/Ascending Icon/Sort/Default Icon/Sort/Descending Icon/Star/Filled Icon/Star/Outlined Stopwatch Icon/Support Icon/Tag Icon/Interact/Thumb/Dislike Icon/Interact/Thumb/Like Icon/Tick Icon/Trend/New Icon/Trend/Trending Icon/Tutorial Icon/Lock/Unlocked Icon/View/Grid Icon/View/List Icon/Watchlist/Add