Introducing the New Improved ONS API

You might not have heard about it, but the ONS has been working on opening up access to our datasets for developers via an API for a while now. We’ve just deployed a new release which introduces a great new flavour to the API, making things much easier to work with.

Previously the data was only available in SDMX, which is a very rich but rather cumbersome XML variant, but we are now pleased to report we are also offering the much lighter JSON-STAT format. JSON-STAT is a simple lightweight JSON format for data dissemination. It is based in a cube model that arises from the evidence that the most common form of data dissemination is the tabular form. Because it uses simple clean JSON it is very easy for developers to work with using just the standard tools available in most modern OO languages, We’ll  be looking into working with this data further in an upcoming post, but for now you can read more about JSON-STAT at your leisure.

To date, the API is still tagged as Beta which means we are still working on improvements and not all the features that we want are there yet,  However, we want to give you a chance to get your hands on it now and help to guide us forward through  providing feedback. We’ve started off with data from the 2011 census, but in the coming months we’ll be adding many more varied datasets from around the ONS. Iff there’s something you are particularly interested in then please let us know.

If you haven’t already, then we encourage you to register for an API key and take a look at some of our sample applicationsWe’ll be putting more of the example code onto GitHub and we’ve got a tag on Stack Overflow for technical questions and comments.

6 comments on “Introducing the New Improved ONS API”

  1. “….We’ve just deployed a new release which introduces a great new flavor to the API…”

    Flavor? —’Merkin’ English on a UK gov’t website. Tut! Tut!

  2. Some IPython Notebook examples of using packages such as pyjstat with the data would be useful: https://pypi.python.org/pypi/pyjstat/

    For example, here is one I found showing how to work with json-stat data from Statistics Norway: http://nbviewer.ipython.org/gist/predicador37/9736709e086f685939eb

  3. A significant improvement, hopefully the API will continue to get attention while all the small print issues get ironed out.

Comments are closed.