Per standard, Clerk.io sorts results in Search and Categories based on what most customers will be likely to buy, which is a great conversion booster.
However, the Search API and the Category Popular API has a built-in function that allows you to choose a specific attribute to sort by, which will still list products based on popularity, but at the same time sort them based on the attribute you select.
Here is an example:
data-orderby lets you choose the attribute to filter by. Any attributes sent to Clerk.io can be used for this.
data-order can be either
desc for ascending and descending order.
The sorting can also be used in direct API calls: