Search API Data Structure

What each field of the Search API response contains, from products and filters to sorters and banners.

Last updated

On this page

Overview

Each filter, active filter and paginator item contains a URL with predefined parameters. Include these parameters in the API call to activate filters, deactivate active filters or change pages. This single API call gives you all the information you need, with no further adjustments.

Fields inside products

Inside the products field, the Search API returns the following:

Field nameDescription
resultsArray of products with all information about them (configurable options, child products, attributes…).
amountsThe current page number, last page number, number of products per page, next page number, previous page number and total number of products.
active_filtersArray of active filters. Every active filter contains the name, label, type, id, url, url_path and url_params to remove that active filter.
filtersArray of enabled filters. Some filters contain a title that can be changed from the dashboard for every filter. Each filter contains arrays of options. Every option has option_value, option_label, option_key, count, url, url_path and url_params. Special filters, such as color and size, carry more information in every option.
sortersAthena XAI has some special sorters (newest, price asc, price desc, popularity, relevance). Every sorter has an option_key, option_value, option_label, url, url_params and information on whether it is selected.
ordersOrders can be set from the Athena Dashboard. One order represents how many products can show on the landing search page. Every order has an option_key, option_value, option_label, url, url_path, url_params and information on whether it is selected.
pagerArray of pages. Every element has the fields option_key, option_value, option_label, url, url_path, url_params, type and information on whether it is selected. The value of option_label can be “First”, “Last”, “Next” or “Previous”, or a page number. If the element doesn’t contain a URL, the page number is the current page.
collection_priceThe lowest and highest prices for this search.
visual_filterInformation about the visual filters.

Other response fields

The Search API also returns the following:

Field nameDescription
modesThere are two modes, grid mode and list mode. The current mode is the one that has selected set to true.
queryThe search query typed by the user.
suggested_textIf the initial search query doesn’t yield results, Athena XAI uses search suggestions to find a similar search query and sets this field to that suggestion.
used_suggestionsTrue if the initial search query didn’t yield results and Athena XAI used search suggestions to find a similar query. False in other cases.
bannersAn array of banners to show on the landing page.
current_urlThe current URL for this search, with the query parameter.
current_pathURL parameter with the active filter, sorter and order.