Access to legislation in JSON format

FOI request reference: F0060416
Publication date: December 2019

No information held


Request & response 

I am writing to you under the Freedom of Information Act 2000 (FOI), in regards to the information held on

I require several Acts, listed below:

. THEFT ACT 1968
. Criminal Justice and Immigration Act 2008
. Criminal Law Act 1967
. Criminal Justice Act 1967
. Sporting Events Act 1985
. Sporting Events Act 1985
. Criminal Attempts Act 1981
. Children Act 1989
. Children & young person’s act 1933
. Misuse of drugs Act 1971
. Police Act 1986

I require these acts and their sections in JSON format (each act in a single JSON file), an example has been attached on the format, I require these documents to be in.


I can confirm that The National Archives does not hold this information in the requested format.

Section 11(1) (a) of the FOIA concerns the provision to the applicant of a copy of the requested information in a permanent form or in another form acceptable to the applicant.

On this occasion we are unable to comply with your preference to receive the requested information in JSON format as we have determined that it is not reasonably practicable due to the cost and time needed to convert the requested information into JSON format.

As we are unable to provide you with the requested information in the preferred format we have provided instructions below on how to access the information via several alternate formats.


The legislation you require is available on via the following web links.


• Police and Criminal Evidence Act 1984:
• Criminal Justice and Public Order Act 1994:
• Theft Act 1968:
• Road Traffic Act 1988:
• Public Order Act 1986:
• Offences against Persons Act 1861:
• Criminal Justice Act 1988:
• Criminal Damage Act 1971:
• Crime and Disorder Act 1998:
• Mental Health Act 1983:
• Criminal Justice and Immigration Act 2008:
• Criminal Law Act 1967:
• Criminal Justice Act 1967:
• Sporting Events (Control of Alcohol etc.) Act 1985:
• Criminal Attempts Act 1981:
• Children Act 1989:
• Children & young person’s Act 1933:
• Misuse of drugs Act 1971:
• Police Act 1996:

As noted above the legislation you have asked for is not available in JSON. But you can access it in several different formats which are all accessible using the Legislation API detailed below:


Crown Legislation Mark-up Language (CLML) XML
CLML was designed and is used to represent UK legislation in XML. It is the base format for legislation published on the website. To access CLML XML versions of legislation add “/data.xml” to the URI for any legislation content page, e.g. to view the CLML XML for the URI would be .
A version of the CLML Schema, which is owned and maintained by The National Archives, can be accessed online at

This format will be most useful if one is looking for the most complete semantic information available for data analysis. It contains the most complete semantic information, but very little information relating to presentation of text.


The default display option for pages on the website is an XHTML rendering of the content, which is derived from the CLML XML, e.g.
This format is also accessible via the API by adding “/data.htm” to the end of the URI, e.g.
A plain view of the XHTML that displays pure legislation content without any additional functionality can also be accessed, e.g.

This format will be most useful if one wants to view or display the data as presented on the website.
It contains the full information required to display legislation text but very little semantic information.


Un-styled XHTML
This is the un-styled version of the default XHTML view for legislation content on the website, and it is derived from the CLML XML. This format can be accessed by adding “/data.xht” to any legislation content URI e.g.

This format will be most useful if you want to apply your own styling to pre-generated XHTML data.


Akoma Ntoso XML
Akoma Ntoso is an international standard for representing legal documents as XML. You can find more information about Akoma Ntoso at
To access the Akoma Ntoso XML versions of legislation add “/data.akn” to the URI for any legislation content page, e.g. to view the Akoma Ntoso XML for the URI would be
The AKN XML data is derived from the CLML XML but is somewhat simpler than the CLML XML version. However as the schema was not specifically designed for UK legislation, mark-up for some less common document structures may be more difficult to interpret.

This format will be most useful if one wants to work with an XML data format which is a little less complex than CLML or if one wants to relate UK legislation data to that provided by other international legislation publishers who use this format.
It contains fairly rich semantic information but very little presentational information.


The HTML5 format provides a serialization of the Akoma Ntoso XML in HTML5 that is it is derived from the AKN XML (rather than the CLML XML) and contains the full AKN XML mark-up in addition to the presentational information needed to display the text.
To access the HTML5 versions of legislation add “/data.html” to the URI for any legislation content page, e.g. to view the HTML5 for the URI would be

This format will be most useful if one is looking for an XML semantic mark-up and presentational information together.


PDF (Dynamically Generated)
The generated PDF format is a rendering of the XHTML view
designed for printing. To access the generated PDF versions of legislation add “/data.pdf” to the URI for any legislation content page, e.g. to view the generated PDF for the URI would be
Alternatively, it can be accessed using the “Print Options” button on the right-hand-side of any XHTML.

This format is derived directly from the CLML XML and will be most useful if one is looking for a version of the XHTML formatted for printing.


PDF (Queen’s Printer Versions)
This format consists of “Original Official Print” PDF versions of legislation documents that were published (as hardcopy) and laid before parliament (UK legislation). This format provides the best version of legislation for hardcopy printing and most accurately reflects text, formatting and layout of the originally drafted legislation documents. Newer PDFs will have searchable (extractable) text whilst older PDFs may not.
Website URIs for this PDF format do not follow the usual legislation API URI pattern, e.g.


Most of the legislation you have requested is up to date, but the following five Acts have outstanding amendments.

• Road Traffic Act 1988
• Mental Health Act 1983
• Children Act 1989
• Misuse of drugs Act 1971
• Police Act 1996

This means that although we have captured the changes required, we have not yet applied them to the text. You can find these outstanding amendments in two ways. You can use the feature called ‘Changes to Legislation’. This includes a facility which allows users viewing the legislation at the level of individual provisions (or Part level etc.) to view any outstanding effects yet to be applied to the legislation in a drop-down box at the top of the page. The listed effects all contain links to the amending legislation. This makes it quite easy to establish the current position of the provision. Although the amendments are not visible in the text of the particular provision, you can go to the pink ‘Changes to legislation’ box towards the top of the page, click on ‘View outstanding changes’, then on ‘Changes and effects yet to be applied to Section X – More’, and you will see listed all the amendments and other effects to date that have yet to be applied to the section. And you can also view a list of all changes to a particular piece of legislation using the Changes to Legislation tab – please see