The Legislation API is the result of a project to combine legislation from the Office of Public Sector Information (OPSI) website and the UK Statute Law Database (SLD).
This new service initially provides an API for re-users of information from the two websites. It is the first step towards creating a new legislation website at legislation.gov.uk that will replace the two existing services. We believe this is the first time the UK Government has developed an online service by first releasing the API, months in advance of the end user-website.
The Application Programming Interface (API)
The legislation API is an experiment. It has been designed to open up the statute book, so that the information we hold is as easy to re-use as possible. There are some limitations to the service and it is provided for use on an “as is” basis. The information in the SLS is not currently being updated, although this will change when we move fully over to a new service. The information provided by the API is designed for re-use and is available free of charge.
We are keen to work with users of the API to understand how best to make legislative information available for re-use. You can follow development of this project on Twitter using #opsidev and on the PerSpectIves, the OPSI blog.
This API will underpin the government's legislation website. It also allows you to access content and develop functionality on top of that content.
The API sits on the www.legislation.gov.uk domain. The root directory of the legislation.gov.uk domain currently resolves to the OPSI website, but data can be accessed via specific http requests. More details are available in the Developer section of the site.