Skip to main content
Sitecore Documentation
  • Learn
  • Downloads
  • Changelog
  • Roadmap
PersonalizeCloud Portal
Sitecore Personalize developer documentation
  • Developing with Sitecore Personalize
    • Base URL
        • Searching in a collection
        • Sorting search results
        • Paginating responses
    • Response codes
  1. Using a collection resource
  1. REST APIs
  2. Using a collection resource

Sorting search results

You can sort search results by specifying a sort query parameter and a corresponding sort value (ASC or DESC case sensitive) on a collection resource URL. The example cURL call returns all someCollection resources ordered by the following:

  • The someCollection resource createdAt date sorted ascending (case insensitive).

  • The someCollection resource label sorted descending (case insensitive).

Sorting search results in someCollection resources:

curl -X GET '<baseURL>/v2/someCollection?sort=createdAt::ASC|label::DESC'
If you have suggestions for improving this article, let us know!

Documentation Assistant

This assistant uses AI to generate responses based on Sitecore documentation. While it has access to official sources, answers may be incomplete or inaccurate and should not be considered official advice or support.
Powered by
k
kapa.ai
Protected by reCAPTCHA

© Copyright 2026, Sitecore A/S or a Sitecore affiliated company.
All rights reserved.

Privacy policySitecore Trust CenterTerms of use