Open Data Portal API

We want to make accessing data in our portal as easy as possible, that’s why all the data in our Open Data Portal is accessible via an application programming interface (API).

Our Open Data Portal uses a feature-rich registry system called CKAN. CKAN can be accessed by users through browsing and searching the data through the site, or from machine-to-machine through the API.

CKAN's Action API is a powerful, RPC-style API that exposes all of CKAN's core features to API clients. All of a CKAN website's core functionality (everything you can do with the web interface and more) can be used by external code that calls the CKAN API. Each dataset has a “Link to JSON format” button that uses the API to download the complete metadata record for that dataset, delivering it to the end user in JSON format (JavaScript Object Notation). JSON is an easily manipulated, machine readable file but when used with a viewer (such as http://jsonviewer.stack.hu/ for example) can also be read by humans.

CKAN has extensive instructions on using its API, we’ve also provided some example code to search and query the API available in a public GitHub open source code repository. These examples include extracting data for a specific BNF code and looping through multiple months and combining the data into one table.

We encourage developers to innovate using the Open Data we release via our Open Data Portal. Are you using, or planning to use the Open Data Portal API? We’d love to hear from you.

If you have any questions, comments, or would like more information we’d love to hear from you too.

Feedback

Feedback is important to us, and helps us improve the system and services we provide.

We’re still developing our Open Data Portal so please tell us what you think.

You can send your feedback to: DataServicesSupport@nhsbsa.nhs.uk