Skip to main content


Note: The URL requires the API key and parameter(s) to function properly. See below for more information on example URL requests.

Description: Get type ahead suggestions for a keyword prefix.


Note: All paramets are case sensitive.

Name Required or Optional Description
apiKey Required

A unique key that identifies the site. Each RichRelevance client has a unique API key to separate data and traffic from other clients. This is provided by RichRelevance.

Example: apiKey=4faeaf752ee40a0f

search Required

The prefix search term.

Example Request

NOTE: This is only an example to indicate the proper syntax of the request. In order to make this work you must replace the api key and search terms.


In this example, the request would return up to 5 suggested search terms that start with the prefix “de”.

Example Response

{ "score": "1", "term": "depth 4-door refrigerator with flexzone&trade", "id": "RF24FSEDBSR/AA", "type": "product" }
{ "score": "5", "term": "depth 4-door flex&trade french door", "id": "RF23J9011SR/AA", "type": "product" }
{ "score": "4", "term": "depth french door refrigerator stainless", "id": "RF18HFENBSR/AA", "type": "product" }
{ "score": "3", "term": "depth side-by-side food showcase refrigerator", "id": "RH22H9010SR/AA", "type": "product" }
{ "score": "2", "term": "depth side-by-side refrigerator stainless steel", "id": "RS22HDHPNSR/AA", "type": "product" }

Example web implementation

We have provided reference code (JavaScript, HTML and CSS) that you can use to integrate the type ahead suggestion user experience into your existing search box. We expect you to modify this code to conform to the UX principles and guidelines of your website.

The following is a sample page that demonstrates how to retrieve and display the suggested search terms and product recommendations.

    <script src="typeAhead_reference.js"></script>
    $(document).ready(function () {
        inputWidth: '400',
        setInputValueOnSelection: true,
        fadeTime: 0,
        debug: false,
        imageHeight: 80,
        imageWidth: 80,
        removeImageProtocol: true,
        sourceIsInstantSearchBooleanQueryParam: 'fromInstantSearch',
        termsUrl: '<API_KEY>?search=',
        productsUrl: '<API_CLIENT_KEY>&apiKey=<API_KEY>&placements=search_page.typeAheadSearch_1&jsonp=true&searchTerm=',
        productsJsonpCallbackParameterName: 'jcb'
      <div id="Search_Example" class="container">
        <div class="main-app">
          Instant Search   
          <form action="" class="search-form">
            <input id="search-input" class="search-box" name="q" id="example-box" size="48" placeholder="Search" autocomplete="off">
            <input type="hidden" name="fromInstantSearch" value="false"/>

Download: typeAhead_reference.js

  • Was this article helpful?