The data.parliament application programming interface (API) enables you to embed and use our data in your applications.
This allows you to
- Offer a rich set of parliamentary open data directly to your customers.
- Build highly functional data-driven applications
- Analyse and interpret the data
- Link data to other open data sources such as DBpedia.
There are two ways of retrieving data from the platform
1) Retrieving data by consuming atom feeds and resources using the Feed APIs
All resources can be retrieved directly using methods described here for our feeds. This method is best used to get a stream of data into your own data-store for analysis and post processing, or alternatively set up RSS like feeds to process feeds in real time.. All datasets and resources published on to data.parliament can be retrieved using this method. The API calls returns XML Atom and JSON formats.
2) Retrieving data by calling the Linked Data APIs
This is a set of comprehensive APIs allowing developers to access and query data in real-time. This method is best used to retrieve data as one-off searching into an app or website. You can expose functionality directly to your end users using these APIs. Information about the APIs and how to use them can be found here. The quickest way to start using the API is through the our explore.data.parliament.uk tool and then view the API calls its making using the handy “API Link”. The explore toolkit is one of many applications that use the API. The API calls returns XML and JSON formats.
Developers have been using data.parliament to develop applications. These are some of them that we know about. If you would like to showcase your app here, please contact us.
- Mp Explorer at http://ddpdemo.azurewebsites.net was our first API demo using Members Names from Data.Parliament. It also shows how we are using Linked Data from Divisions, EDMs, Oral Questions, Written Questions and DBPedia. It uses a full range of API calls to retrieve data about how MPs contribute in Parliament. The source is available from Github here.
- Our AccHack 2014 submission http://swipeeswipee.azurewebsites.net a fun “Tinder” like application that allows users to compare their own views with that of MPs. The source is available from Github here.
- The explore.data.parliament.uk tool is our most comprehensive demonstration of the APIs capabilities. Our APIs use self describing documentation and this tool is built using the documentation to dynamically create search pages using the APIs. With a handy API viewer, a developer can quickly find the call to include into their own application. The source is available from Github here.
- Our Twitter Research Paper poster uses our Atom feeds to alert twitter of a new Research Briefing. The source is available from Github here.
- Parliament.UK’s Research Briefings area of the website uses DDPs APIs directly
- http://www.yourdemocracy.org.uk uses data from data.parliament. Your Democracy is about creating a reinvigorated relationship between people and politicians, for the benefit of both.
- Many of the Hacks entered for the AccHack14 used data from data.parliament.
- Have a look at http://www.reddit.com/r/ukgovbriefs/ which uses our RSS APIs to automatically submit new Parliamentary research briefings to Reddit! for discussion.