Querying

Sort

Use the sort parameter to order results by a property:

# Works sorted by citation count (highest first)
https://api.openalex.org/works?sort=cited_by_count:desc

# Sources in alphabetical order
https://api.openalex.org/sources?sort=display_name

Common sortable fields

Field Description
display_name Alphabetical order
cited_by_count Number of citations
works_count Number of works
publication_date Publication date (works only)
relevance_score Search relevance (requires search filter)

Sort direction

By default, sort is ascending. Append :desc for descending:

# Ascending (default)
https://api.openalex.org/works?sort=publication_date

# Descending
https://api.openalex.org/works?sort=publication_date:desc

Multiple sort keys

Sort by multiple properties using commas:

# Sort by year descending, then by relevance score
https://api.openalex.org/works?search=bioplastics&sort=publication_year:desc,relevance_score:desc

Note: Sorting by relevance_score requires an active search. An error is thrown otherwise.

View as Markdown