gavel Public Scrutiny Office
What's going on in the UK Parliament

What's going on
in the UK Parliament

Public Scrutiny Office API

This site provides a simple API for Bills and allows you to fetch them as plain text and JSON.

As of 2016 we are looking to move the API to use an structured data schema for Bills and Members and Events and at ways to editorialise events in Parliament.

Fetch Bills before Parliament

You can fetch the list of Bills before Parliament (along with some metadata about each Bill) by using:

http://public-scrutiny-office.org/bills.json

You can also request just the most (or least) popular Bills and Bills yet to be published:

http://public-scrutiny-office.org/bills/popular.json
http://public-scrutiny-office.org/bills/unpopular.json
http://public-scrutiny-office.org/bills/pending.json

Fetching information about a specific Bill

You can use the .hasText property on a Bill to check if there is text available for it and the .htmlUrl and .textUrl properties on each Bill object to get the full text of an individual Bill.

If you know the URL for a bill you can get info for it in JSON, or just the bill text as HTML or plain text (UTF-8) directly by appending an appropriate file extention.

e.g. for http://public-scrutiny-office.org/bills/2015-2016/investigatory-powers

JSON: http://public-scrutiny-office.org/bills/2015-2016/investigatory-powers.json

HTML: http://public-scrutiny-office.org/bills/2015-2016/investigatory-powers.html

Plain Text: http://public-scrutiny-office.org/bills/2015-2016/investigatory-powers.text

Fetching information about an MP or Peer

There is currently not an API for members on this site, please see the UK Parliament - Members' Names Data Platform.

An API exposing some information about members and Bills they have sponsored (and related information) is planned in future.