V1 (deprecated)
1 min
The v1 APIs are now deprecated! If you are building a new implementation, we strongly recommend going through V2 by visiting Overview
Using Klevu’s category navigation API, you can now retrieve products for your individual categories, where the order of products is decided by Klevu’s trend-driven intelligent algorithms. If you have setup merchandising rules in the Klevu Merchant Center, all your settings are respected and the order of products is decided accordingly. The continuous learning in Klevu’s backend ensures regular updates on individual category pages reflecting the changing trends of your website.
Record search
Use this API method if you want not only the record IDs but also other details associated with the matching records. The method allows you to retrieve facets and autosuggestions as well.
GET
https://<cloudSearchURL>/cloud-search/n-search/search
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://eucs15.ksearchnet.com/cloud-search/n-search/search?ticket=klevu-156925593843210765&term=*&isCategoryNavigationRequest=true&category=KLEVU_PRODUCT%20watches&sv=20.0.0&paginationStartsFrom=0&noOfResults=2&enablePartialSearch=false&enableFilters=false&enableMultiSelectFilters=false&showOutOfStockProducts=true&responseType=json',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;