---
title: "Sorting resource"
slug: "sorting-resource"
abstract: ""
---
# Sorting resource

The Sorting Resource is a **json** resource that contains the information related to the sorting of the current search results:

| Name | Type | Description |
| --- | --- | --- |
| properties | Object | A dictionary object containing the properties and values. If a sorting was already applied on the search results, properties include title of the sorting configuration and the order. |
| ascending | [Search Link](https://doc.sitecore.com/ch/en/developers/cloud-dev/search-link.html) | A hyperlink to the Search resource with results sorted in ascending order. Present only if a sorting was already applied on the search. |
| descending | [Search Link](https://doc.sitecore.com/ch/en/developers/cloud-dev/search-link.html) | A hyperlink to the Search resource with results sorted in descending order. Present only if a sorting was already applied on the search. |
| sort_options | Array | An array of [search links](https://doc.sitecore.com/ch/en/developers/cloud-dev/search-link.html) representing the options for the sorting of the search results that the user can choose among. |

Example:

```json
{
    "properties": {
        "title": "Title",
        "order": "ascending"
    },
    "ascending": {
         "href":"http://<hostname>/api/search?q=myQueryForAscending&skip=20&take=10"
    },
    "descending": {
        "href":"http://<hostname>/api/search?q=myQueryDescending&skip=20&take=10"
    },
    "sort_options": [
        The array of sort options search links

    ]
}

```