Guide
Smart Search

Record search

2min

If you haven't gone through the prerequisites and the v2 structure, please have a look at Overview

The recordQuery object is used for searching for records. Use this for retrieving Products, Categories, CMS Pages or your own Custom Entity types when your customer has submitted a search query.

This is an example to fetch instant auto complete using APIs.
POST
Request
Body Parameters
id
required
String
Every suggestion request must have a unique identifier associated with it. When a result is retrieved, the ID of each query is associated with it's respective response.
typeOfQuery
required
String
The type of suggestion query. Specify 'AUTO_SUGGESTIONS' for typeahead autosuggestion predictions.
query
required
String
The search term or phrase for which the suggestions are retrieved from Klevu Search.
Request Body (JSON)
PHP
JS
Java
Node.js
Responses
200


Try it here!





Updated 30 Oct 2023
Doc contributor
Doc contributor
Did this page help you?