Undata Api

UN Data API Project

Forum Thread: Sorting API Results

This thread looks at whether the UN Data API can return sorted results. It opened on 23 June 2009 and includes a reply from the team.

The Opening Question

Jamie found undata-api.org via Stephen's interview with Jon Udell and asked whether API results can be ordered. If ordering isn't possible yet, Jamie wonders whether it could be added as a feature.

Reply from the Team

Geoff Drake answered that ordering is planned. The probable approach is a parameter like ?sort=year, ?sort=country, ?sort=year,country or ?sort=country,year. It isn't available right away, but it is expected within the next few weeks.

Common Questions

Can results from the UN Data API be ordered?
Ordering is a requested feature covered in this thread. As the reply above notes, a sort parameter is planned, such as ?sort=year, ?sort=country, ?sort=year,country or ?sort=country,year. Check the documentation for the current status before depending on it.
Which sort fields are under consideration?
The thread mentions sorting by year and by country, and combining the two (for example ?sort=year,country or ?sort=country,year).
When will ordering be available?
The reply in this topic says it won't be immediate but will likely arrive within the next few weeks. Because this is an old thread, confirm against the current documentation.
Where do I find the current API parameters?
Visit the Documentation section of the site to see the parameters the API currently supports.
How can I ask a question about the API?
Start a new topic in the Forum, or use the Support link in the footer.

Browse the Site

Sorting is one of the most requested additions to the UN Data API. Until a sort parameter is confirmed in the documentation, results should be treated as unordered, and any ordering should be applied on your side after the response is received.