Sorting collections

Sorting collections

You can use the sort argument to order your query results in a particular order.

    "sort": "created_on"

Sort by metadata fields

It is possible to sort by the content items created, changed, published dates in either ascending or descending order.

The current values for sorting those fields are created_on, -created_on, changed_on, -changed_on, publish_on, -publish_on, title, -title.

Default ordering

If you don't pass an explicit order value the returned content items will be ordered descending by content item published timestamp -publish_on. This means that the most recently published content item will appear at the top of the list.

Was this article helpful?

We’d love to learn from your feedback