<!--
{
  "availability" : [
    "Apple Ads Platform API: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Apple-Ads-Platform-API",
  "identifier" : "/documentation/Apple-Ads-Platform-API/RecommendationSorting",
  "metadataVersion" : "0.1.0",
  "role" : "Object",
  "symbol" : {
    "kind" : "Object",
    "modules" : [
      "Apple Ads Platform API"
    ],
    "preciseIdentifier" : "data:apple-ads-platform-api:RecommendationSorting"
  },
  "title" : "Sorting"
}
-->

# Sorting

A sort specification used in a recommendation query request to order results.

```
object RecommendationSorting
```

## Discussion

The `Sorting` specifies one sort dimension in the `sorting` array of a QueryRequest. The `sorting` array supports multiple entries, which the system applies in order. The first entry is the primary sort, the second is the tiebreaker, and so on.

### Example

```json
{
  "field": "creationTime",
  "order": "DESC"
}
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)