# Sorting search responses

Objects are sorted by their ID value by default.  You can use the `sortOrders` array in a search request to order the objects in the result set. The below example sorts the results by their last updated date in ascending order (use **desc** for descending)

```javascript
{
  "keywords": "string",
  "query": {},
  "start": 0,
  "rows": 10,
  "cursorToken": "string",
  "sortOrders": [
    "last_updated asc"
  ],
  "parentQuery": {},
  "childQuery": {}
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api-docs.rightsline.com/search/pagination/sorting-search-responses.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
