National Archives Find Case Law: Public API (0.4.0)

Download OpenAPI specification:

The Find Case Law API allows you to access court judgments and tribunal decisions held in the Find Case Law service, operated by the National Archives.

Our API provides access to judgments and other documents held by The National Archives and published via the Find Case Law service.

Open Justice Licence

The National Archives has worked in collaboration with The Ministry of Justice and the Judicial Executive Board to design a new licensing framework for the reuse of case law as data. The Open Justice licence is designed to protect the personal data within the records while supporting the principles of Open Justice.

The Open Justice licence allows you to copy, publish, distribute and transmit case law data. It permits you to use the data commercially, for example, by combining it with other information, or by including it in your own product or application. There are certain conditions that apply under this licence.

You do not need to apply to re-use Find Case Law records if your re-use complies with the terms and conditions of the Open Justice Licence.

The Open Justice licence does not permit computational analysis. If you intend to do any programmatic searching in bulk across the Find Case Law records to identify, extract or enrich contents within the records you will need to apply to perform computational analysis. There are no application charges.

Document formats

Documents within Find Case Law are predominantly available as XML (and by extension HTML), although some are only available as PDFs.

XML

Where documents exist as XML, these have been submitted for publication by the courts as a Microsoft Word document. This has then been automatically converted to XML, marked up according to the international data standard (LegalDocML). This data includes:

  • Neutral Citation
  • Court / Chamber
  • Date
  • Case Name
  • Party Names
  • Judges' Names

XML documents are then automatically converted to HTML for publication on the Find Case Law website.

For documents which have been submitted directly to the National Archives our legal editorial team have checked data for consistency and accuracy. However, older documents have not always been checked in this way and you may discover inconsistencies in the metadata If you do, you can report data errors to caselaw@nationalarchives.gov.uk.

PDF

Some documents, particularly historic documents, may only exist as PDFs. In these cases we will provide as much metadata regarding the document as we are able, although this may not be as complete as in an XML document.

Identifying documents

Documents in Find Case Law are identified in two different ways, one which is better for machines and one which is better for humans:

Document URI

Every document in Find Case Law has a unique machine-readable identifier which is not designed to be human-facing. You should prefer using this identifier internally when referencing Find Case Law documents, as it is stable and globally unique. Document URIs can contain the characters a-z, 0-9, / and -.

Documents prior to April 2025

Documents which were submitted to the National Archives prior to April 2025 will have a URI in the form court/year/sequence, for example uksc/2024/123. Although this looks like it contains many attributes from a Neutral Citation Number, you should not treat it as such and attempt to extract information from it.

New-style URIs

Documents submitted to the National Archives from April 2025 onwards will usually have a URI which looks something like d-f11e093f-8a53-4e43-8dd8-1531b5d8f018. These will always begin with a d-.

Document identifiers

In addition to the Document URI, all documents will also have one or more "identifiers" which exist under different schemes. This currently includes Find Case Law Identifiers (for all documents) and Neutral Citation Numbers (for judgments which have them), but may be extended in future.

Each identifier will have – as a minimum – a type, a value and a slug which can be turned into a human-facing URL by appending it to https://caselaw.nationalarchives.gov.uk.

Identifiers are not guaranteed to be unique to a single document.

Examples

Type type Example value Example slug
Find Case Law Identifier fclid cw7s3kws tna.cw7s3kws
Neutral Citation Number ukncn [2024] UKSC 123 uksc/2024/123

Preferred identifier

Each document will have exactly one preferred identifier, determined by the Find Case Law system, which it will prefer for displaying to users and generating public-facing URLs. You must not make any assumptions about the type of this preferred identifier, as it may change.

Give us your feedback

We are still actively developing Find Case Law based on user feedback. This includes improving the experience of how data re-users can access the data.

You can provide feedback by using our feedback form.

Reading documents

Detecting content changes

We recommend setting the order parameter of the Atom feed to -transformation to detect changes made to judgments, as this will list the most recently changed documents first:

https://caselaw.nationalarchives.gov.uk/atom.xml?order=-transformation

Using the date

If you always want to have the latest XML of a document, even if the changes are only to markup and the content has not changed (for example, if we have made some formatting improvements) the easiest way is to store the date the document was last changed. You can find this as either:

  • The date attribute of the <FRBRdate name="transform"/> tag within the LegalDocML representation
  • The <updated> element of an <entry> in the Atom feed

You can then compare this stored date to the <updated> element in the Atom feed, and only take action if the Atom feed's date is more recent.

Using the content hash

If you are not interested in minor improvements to the XML document markup, and only care about changes to the document itself, you can use the content hash.

This hash is generated by removing all XML markup and leaving only the body text of the document, and then generating a SHA256 hash of that text. As such this hash should be stable across things such as formatting changes, and will only change if the text of the document does.

You can find the content hash as either:

  • The <uk:hash> element within the <proprietary> element of the LegalDocML representation
  • The <tna:contenthash> element of an <entry> in the Atom feed

By storing the content hash when you first retrieve a document you can then compare it in future to detect if the text has changed.

Get an Atom feed of documents

Return a list of documents in Find Case Law, ordered by date.

Without any parameters, this will order by the most recently handed down judgments and documents first. The parameters used are identical to those used for the advanced search at https://caselaw.nationalarchives.gov.uk/judgments/search: a link to the feed mirroring those search results is available on each search result.

Each differently named parameter filters out documents that do not match it.

The feed has multiple pages (see the link tag with a rel attribute of next for the next page).

Each entry element contains a different document's metadata. Not all documents will contain all tags.

Notable tags and elements include:

  • <published>: The date the document was first published by the court (for judgments, the 'handed down' date)
  • <updated>: The date the XML of the document was last updated in Find Case Law. This may include not only changes to the text, but also minor changes to markup such as formatting or annotations.
  • <link rel="alternate"/>: A link to the document's page on Find Case Law (with HTML representation, where one exists)
  • <link rel="alternate" type="application/akn+xml"/>: A link to an XML representation of the document
  • <link rel="alternate" type="application/pdf"/>: A link to a PDF representation of the document
  • <tna:uri>: The Document URI in Find Case Law.
  • <tna:identifier>: One element per identifier known to relate to this document.
  • <tna:contenthash>: A hash of the text in the document. See Content Hash for more.
query Parameters
query
string

Full text search of a judgment. "financial records" will only find judgments with those two words in that order. Multiple space-separated words will only find judgments that have all those words.

court
string

A court code. Currently there are two forms of court code, one used in the URL structure (ewhc/fam) and one used in the XML court tag EWHC-Family. Either can be searched for. If multiple courts or tribunals are given, results from all those courts may be returned.

tribunal
string

A tribunal. Identical to the court codes above.

party
string

A full-match for a word in the name of a party to the judgment.

judge
string

A full-match for a word in the name of a judge or similar involved in the judgment

order
string
Default: "-date"
Enum: "date" "-date" "updated" "-updated" "transformation" "-transformation"

Which of the dates within the document to use for ordering. Prepend a - to sort by newest first.

  • date: The date the document was first published by the court
  • updated: The last date the document was updated in the Find Case Law system, including any changes to its metadata
  • transformation: The date the body of the document was last modified, including changes to either the body text, XML markup, or both
page
integer >= 1
Default: 1

Where results are across multiple pages, the page of results to return.

per_page
integer
Default: 50

How many results to list per page.

Responses

Response samples

Content type
application/xml

An example of a complete response, with only one entry.

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="/static/atom.xsl" type="text/xsl" ?>
<feed xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom" xmlns:tna="https://caselaw.nationalarchives.gov.uk">
    <title>Latest documents, sorted by date the document was first published by the court (newest first)</title>
    <link href="https://caselaw.nationalarchives.gov.uk/atom.xml" rel="alternate"/>
    <link href="https://caselaw.nationalarchives.gov.uk/atom.xml" rel="self"/>
    <id>https://caselaw.nationalarchives.gov.uk/atom.xml</id>
    <updated>2025-04-30T15:00:00+00:00</updated>
    <author>
        <name>The National Archives</name>
    </author>
    <rights>https://caselaw.nationalarchives.gov.uk/open-justice-licence</rights>
    <link href="https://caselaw.nationalarchives.gov.uk/atom.xml?page=1" rel="first"/>
    <link href="https://caselaw.nationalarchives.gov.uk/atom.xml?page=6675" rel="last"/>
    <link href="https://caselaw.nationalarchives.gov.uk/atom.xml?page=2" rel="next"/>
    <entry>
        <title>Jarndyce v. Jarndyce</title>
        <link href="https://caselaw.nationalarchives.gov.uk/uksc/2024/123" rel="alternate"/>
        <published>2025-04-30T00:00:00+00:00</published>
        <updated>2025-04-30T09:54:24+00:00</updated>
        <author>
            <name>Upper Tribunal (Lands Chamber)</name>
        </author>
        <id>https://caselaw.nationalarchives.gov.uk/id/d-9b51d493-65ba-471f-8f08-c369ec66e3f8</id>
        <summary type="html"/>
        <tna:contenthash>d1b2a59fbea7e20077af9f91b27e95e865061b270be03ff539ab3b73587882e8</tna:contenthash>
        <link href="https://caselaw.nationalarchives.gov.uk/uksc/2024/123/data.xml" rel="alternate" type="application/akn+xml"/>
        <tna:uri>d-9b51d493-65ba-471f-8f08-c369ec66e3f8</tna:uri>
        <tna:identifier slug="uksc/2024/123" type="ukncn">[2024] UKSC 123</tna:identifier>
        <tna:identifier slug="tna.r8d6ps87" type="fclid">r8d6ps87</tna:identifier>
        <link href="https://assets.caselaw.nationalarchives.gov.uk/d-9b51d493-65ba-471f-8f08-c369ec66e3f8/d-9b51d493-65ba-471f-8f08-c369ec66e3f8.pdf" rel="alternate" type="application/pdf"/>
    </entry>
</feed>

Get a single document

Retrieve the XML of a single document based on its identifier.

path Parameters
document_uri
required
string
Example: ewhc/tcc/2022/42

The unique identifier for this document within Find Case Law.

Responses

Get a list of recently published or updated documents Deprecated

Deprecated -- will now redirect to /atom.xml with relevant parameters

Less specific feeds can be gained by omitting the components e.g. /, /2022/, /ewhc/ and /ewhc/ch/ are all valid prefixes to atom.xml.

Note that a {court} is required if there is a {subdivision}.

path Parameters
court
required
string
Example: ewca

The court code to return results for.

subdivision
required
string
Example: pat

The court subdivision code to return results for.

year
required
integer
Example: 2022

The year to return results for.

query Parameters
order
string
Default: "-date"
Enum: "date" "-date" "updated" "-updated" "transformation" "-transformation"

Which of the dates within the document to use for ordering. Prepend a - to sort by newest first.

  • date: The date the document was first published by the court
  • updated: The last date the document was updated in the Find Case Law system, including changes to its metadata
  • transformation: The date the body of the document was last modified, including changes to either the body text, XML markup, or both
page
integer >= 1
Default: 1

Where results are across multiple pages, the page of results to return.

Responses