Skip to main content

Retrieve search results

The Kameleoon Search service provides access to two different types of search results:

  • Instant (typeahead) search, which is displayed and updated as users type their search queries.
  • Full search, which returns complete and filtered search results after the user submits their search query.

Both options use the same endpoint. You'll use the type parameter to specify which of these two search types you want to use.

HTTP Request

GET https://api.products.kameleoon.com/search

Query Parameters

The following query parameters are used by both full search and instant search. There are also some additional parameters that only you can use with full search.

ParameterRequirementDescription
didRequiredDevice ID. You can get this ID from the cookie KameleoonProducts_device_id, which you can retrieve from the back-end before calling this endpoint.
shop_idRequiredYour Store Key. You can find this in Recommendations > Settings > Store settings in the Kameleoon app. You can also contact your Customer Success Manager for the key.
seanceRequiredThe temporary user session ID. You can find this ID from KameleoonProducts_session_code, which you can retrieve from the back-end before calling this endpoint.
typeRequiredSpecifes the type of search you want to perform. Use either instant_search or full_search.
search_queryRequiredThe current search query
locationsOptionalA comma-separated list of locations IDs.

Additional query parameters (full search only)

You can use the following additional parameters with full search requests (when type is full_search).

ParameterRequiredDescription
limitOptionalMaximum number of results you want the API to return.
offsetOptionalOffset of results.
category_limitOptionalMaximum number of categories for the sidebar filter to return.
categoriesOptionalComma separated list of categories to filter.
extendedOptionalAdds extended information about the product results. Supported values: 1 or empty. If value is 1, the API returns all of the information about the products. If empty, the API returns only the products IDs. For full search, we recommed setting this to true.
sort_byOptionalThe parameter you want to sort the results by. Supported values: popular, price, discount, sales_rate, date.
orderOptionalSort direction: asc for ascending or desc for descending. Default is descending.
brandsOptionalComma-separated list of brands to filter.
filtersOptionalOptional escaped JSON string with filter parameters. For example: {"bluetooth":["yes"],"offers":["15% cashback"],"weight":["1.6"]}
price_minOptionalMinimum price.
price_maxOptionalMaximum price.
colorsOptionalComma-separated list of colors.
excludeOptionalComma-separated list of products IDs to exclude from search results.
NameTypeDescription
search_querystringSearch query
categoriesarrayArray with information about categories. Each object has the following properties:
  • id – category id (string)
  • name – category name (string)
  • url – category url (string)
  • count – count of products in category (number)
filtersarrayArray with information about filters. Each object has the following properties:
  • filter – filter object. Has the following properties:
  • count – total count of products whith this parameters (number)
  • values – array of values (object). Has the following properties:
  • value – value label. (string)
  • count – cont of products whith this parameter (number)
htmlstringHTML-code of the block with products. The template is customized in the Kameleoon personal account.
price_rangeobjectMin and max price of products. Has the following properties:
  • min – min price (number)
  • max – max price (number)
productsarrayArray with information about products. Each object has the following properties:
  • description – product description (string)
  • url – absolute product URL (string)
  • url_handle – relative product URL (string)
  • picture – product's picture URL in the Kameleoon storage (string)
  • name – product name (string)
  • price – product price (number / int)
  • price_full – product price (number / float)
  • price_formatted – product price with currency (string)
  • price_full_formatted – product price with currency (string)
  • image_url - absolute product's picture URL in the Kameleoon storage (string)
  • image_url_handle - relative product's picture URL in the Kameleoon storage (string)
  • image_url_resized - product image resizes url (array)
  • currency – product currency (string, corresponds to the currency of the personal account in Kameleoon, or a custom value specified in the shop settings in the personal account)
  • id – product ID (string)
  • old_price – product old price (number / int, default - 0)
  • old_price_full – product old price (number / float)
  • old_price_formatted – product old price with currency (string)
  • old_price_full_formatted – product old price with currency (string)
  • Additional properties. If a parameter "extended" is passed in the request categories – product categories (array). Has the following properties:
    • id – category id (string)
    • name – category name (string)
    • parent_id – parent category id (string)
    • url - category url
    • category_ids - product categories ids (array).
search_query_redirectsarrayArray with information about redirects. Each object has the following properties:
  • query – search query (string)
  • redirect_link – Url for redirect (string)
  • deep_link – Url for mobile apps (string)
products_totalnumberTotal number of products
NameTypeDescription
brandsarrayArray with information about brands. Each object has the following properties:
  • name – brand name (string)
  • picture – brand picture (string)
categoriesarrayArray with information about categories. Each object has the following properties:
  • alias – category alias (string)
  • id – category id (string)
  • name – category name (string)
  • parent – parent category id (string)
  • url – category url (string)
filtersarrayArray with information about filters. Each object has the following properties:
  • filter – filter object. Has the following properties:
    • count – total count of products whith this parameters (number)
    • values – array of values (object). Has the following properties: * value – value label. (string), count – cont of products whith this parameter (number)
htmlstringHTML-code of the block with products. The template is customized in the Kameleoon personal account.
price_rangeobjectMin and max price of products. Has the following properties:
  • min – min price (number)
  • max – max price (number)
productsarrayArray with information about products. Each object has the following properties:
  • brand – product brand (string)
  • currency – product currency (string, corresponds to the currency of the personal account in Kameleoon, or a custom value specified in the shop settings in the personal account)
  • id – product ID (string)
  • is_new – product property (boolean, default - null)
  • name – product name (string)
  • old_price – product old price (string, default - 0)
  • picture – product's picture URL in the Kameleoon storage (string)
  • price – product price (number)
  • price_formatted – product price with currency (string)
  • url – product URL (string)
  • Additional properties if a parameter "extended" is passed in the request:
    • barcode – product barcode (string)
  • categories – product categories (array). Has the following properties:
    • id – category id (string)
    • name – category name (string)
    • parent – parent category id (string)
  • params – array with information about params. Each object has the following properties:
    • key – param name (string)
    • values – array of values (array)
products_totalnumberTotal count of products
search_querystringSearch query