This page describes Courtfinder's alternate access methods, including its API. It also provides information about the machine-readable HTML markup used. Please note that these site features are experimental and may be modified, depending on data consumer requirements. We'll do our best to make all changes backwards compatible.

The Search API

Any search result is available as HTML or JSON

The format of the JSON version is self explanatory.

The API uses the usual HTTP response codes in case of errors:

  • If there are no results, the API returns a 200 response with an empty JSON array ([ ])
  • If the service is unable to fulfill the request (eg if the third-party postcode service isn't responding), it will return a 500 response, with explanations in the response body.
  • If the query is mal-formed (eg /search/results.json?postcode=), a 400 HTTP response is returned also with some explanations in the body.

Court and Tribunal data as JSON files

A complete JSON dump of the court data is available at: /courts.json.

Semantic Markup

The HTML version of court pages is augmented with metadata contained within tags in the HTML markup. Those tags aren't visible on the page, but can be used by scrapers to extract the data.

More information is available at MOJ Digital's blog entry on Open Data Markup. Or just look at the markup of any court page and look for the vocab, typeof and property attributes. Those attributes are part of the RDFa markup, and the attribute values use the schema.org vocabulary (in particular the Courthouse type).