Sort entity lists
Use the ?sort parameter to specify the property you want your list sorted by. You can sort by these properties, where they exist:
display_namecited_by_countworks_countpublication_daterelevance_score(only exists if there's a search filter active)
By default, sort direction is ascending. You can reverse this by appending :desc to the sort key like works_count:desc. You can sort by multiple properties by providing multiple sort keys, separated by commas. Examples:
All works, sorted by
cited_by_count(highest counts first)https://api.openalex.org/works?sort=cited_by_count:descAll sources, in alphabetical order by title:
https://api.openalex.org/sources?sort=display_name
You can sort by relevance_score when searching:
Sort by year, then by relevance_score when searching for "bioplastics":
https://api.openalex.org/works?filter=display_name.search:bioplastics&sort=publication_year:desc,relevance_score:desc
An error is thrown if attempting to sort by relevance_score without a search query.
Last updated