Skip to main content

Interoperable data formats and profiles

The formats and data profiles in which you can obtain the Gallery's data, and how to access data in each of them.

General principles

The Gallery offers data in three formats:

  1. HTML
  2. JSON
  3. XML

Requests for HTML redirect to either a rich page for the entity on the Gallery's website, if one is available, or a stub page. For JSON and XML, we offer a default data profile for each published entity type; wherever possible, we have chosen a well-documented and ideally well-established standard.

Default data profiles

Default data profiles, by file format:

Additional data profiles

In addition, we offer the following profiles if data is available:

Retrieving data

Interoperable data is currently provided as a file per item, and can be retrieved using the item's PID. For the moment, PIDs need to be retrieved using our Elasticsearch API. Requests for interoperable data take the form:

{base URL}/{PID}{profile parameter}|{filetype extension}
  • Base URLhttps://data.ng.ac.uk
  • Profile parameter: “?profile=”, followed by one of the following values:
    • ciim-json
    • ciim-xml
    • dc
    • iiif
    • jskos
    • lido
    • linked-art
    • skos
  • Filetype extension: “.”, followed by one of the following values:
    • htm
    • html
    • json
    • xml

So https://data.ng.ac.uk/0F6J-0001-0000-0000?profile=lido returns the LIDO XML record for NG35, Titian, Bacchus and Ariadne.

Requests are processed in the order:

  1. profile parameter (filetype extension and request header are ignored)
  2. filetype extension (request header is ignored)
  3. HTTP request header ACCEPT value (one of text/html, application/json, application/xml)

In the absence of all the above, JSON is returned with data organised according to the CIIM profile. Invalid requests - i.e. for a profile which is not available for a particular entity type - will return an HTTP 400 error.

Known issues

The current endpoints are being released as a beta so that we can try and make sure they eventually meet users' requirements. If you spot any errors, incorrect mappings, or other issues, please let us know via hello@nationalgallery.org.uk. Known issues are:

  1. The delivery of CIIM-formatted XML is currently known to be flaky (we have encountered errors when returning data for places).
  2. HTML stub pages are still to be put in place for archive, DokuWiki, exhibition and some media records.
  3. IIIF image URLs, info.json data and manifests will not resolve, pending the introduction of our IIIF framework for collection images.

Re-use licences

The Gallery's data is made available for reuse under specific licences; for more information see Licences.