This page holds the documentation for Europeana’s Record API.
The Record API provides direct access to the Europeana data, which is modeled using EDM. While EDM is an open flexible data model featuring various kind of resources and relations between them, the Record API (and the Europeana Collections Portal) supports the retrieval of a segment of EDM for practical purposes (a subgraph, to use strict terminology). These "atomic" EDM segments usually contain one Cultural Heritage Object (CHO), the aggregation information which connects the metadata and the digital representations together and a number of contextual resources such as the agents, places, concepts and time pertaining to the CHO.
Before starting to use this API, we recommend reading the introduction page for an overview of the EDM model, Registering for an API key, and reading the Terms of Use. If you want to get started with this API, go directly to the Getting Started section or try it out directly on the Console.
Getting Started
Every call to the Record API is an HTTPS request in the following URL signature:
https://api.europeana.eu/record/v2/[RECORD_ID].[FORMAT]
Where the variables in the URL path mean:
RECORD_ID | The identifier of the record which is composed of the dataset identifier plus a local identifier within the dataset in the form of "/DATASET_ID/LOCAL_ID", for more detail see Europeana ID. |
FORMAT | The file extension corresponding to one of the supported output formats, namely: .json, .jsonld, .rdf. See next section on Output Formats |
Additional parameters may apply to the request above such as the API key and Browser access.
Supported Output Formats
The Record API supports 3 serialization formats, namely: JSON, JSON-LD and RDF/XML. The primary and default output supported by this API is JSON which also means that some fields are only available in this format. Both JSON-LD and RDF/XML are formats to represent Linked Data which used predefined transport schemas for serializing RDF data. To request a record in either of these formats, just alter the extension of the call to the desired format. The table below explains each of the formats and their respective extensions.
Error Responses
An error occurring during processing of an API method is reported by (1) a relevant HTTP status code, (2) a value of the success field and (3) a meaningful error message in the error field. The following table shows the fields appearing within an error response:
The following kinds of errors can be returned by the API:
Retrieving a record in the default format (JSON)
JSON is the primary output format of the Record API. It uses a Europeana specific schema for representing EDM data which is explained in this Section.
A response in JSON will always contain a number of fields that present information about the handling of the request, while the concrete information about the record is presented in the "object" field.
Object
Gathers all the information contained within a EDM metadata record.
JSON Structures and Fields for EDM
The JSON structures and fields defined in this section all represent classes and properties that are defined in EDM. We advise all readers who are not familiar with EDM to first have a look at our/wiki/spaces/EF/pages/2385313809 where we explain the model. The fields listed in the table below have direct links to where they are explained in the introduction page for quick help.
JSON Datatypes
The JSON output of this API uses the following datatypes:
Retrieving a Record in the JSON-LD format
JSON-LD stands for JSON for Linking Data and is one of the Linked Data formats that the Record API supports. The basic structure of the JSON-LD response is similar to the default JSON format of the Record API:
The big differences between JSON and JSON-LD are
JSON-LD makes use of Internationalized Resource Identifiers, IRIs as property names. This ensures that each statement of a record matches a standard vocabulary. In Europeana's implementation the properties are qualified names (in the format of "namespace_prefix:property_name" such as "dc:creator") for the sake of brevity. In the normal JSON response we use non-standard camel case ("dcCreator") property names. In the JSON Section you can find the connections between our camelCase property names and the JSON-LD and RDF qualified names.
JSON-LD has a
@context
part, which links object properties in a JSON document to concepts in an ontology. In our JSON-LD this lists the used namespaces and their prefixes.JSON-LD makes a distinction between values that are string literals from values that are other resources.
Retrieving a Record in the RDF/XML format
The XML output is primarily based on RDF/XML format for RDF serialization but following the EDM XSD schema (the same schema is also used for data ingestion to Europeana).
The structure of an RDF/XML document formated using the EDM XSD schema is as follows:
The root element of the XML document is "rdf:RDF". This element will have declared all the namespaces required for the qualified names of all classes and properties being using within the document. A list of all supported namespaces can be view in our /wiki/spaces/EF/pages/2385313809.
Within the root element, all instances of EDM classes are declared using the qualified name of the classes as the label for the XML element. An "rdf:about" attribute is present indicating the IRI of that instance.
Retrieving thumbnails from Media Resources
The Thumbnail API is an extension of the Record API to allow the retrieval of cached thumbnails that are generated upon ingestion of the metadata by Europeana. Thumbnails are only generated for media resources that are referred through by edm:isShownBy, edm:isShownAt or edm:object properties which are then supplied using the edm:preview property.
Request
The Thumbnail API doesn't require any form of authentication, providing your API key is optional. It always returns an image, whether the thumbnail exists or not. To use the Search API to verify whether a thumbnail exists you can add has_thumbnail=true to your search query, or check if the edmPreview field in the search or record response has a value (which is the URL of the thumbnail).
Every call to the Thumbnail API is an HTTP request in the following URL signature:
https://api.europeana.eu/thumbnail/v2/url.json?uri=URI&type=TYPE&size=SIZE
where the variables in the URL path mean:
Parameter | Datatype | Description |
---|---|---|
size | The size of the thumbnail, can either be w200 (width 200) or w400 (width 400). | |
type | Type of the default thumbnail (media image) in case the thumbnail does not exists, can be: IMAGE, SOUND, VIDEO, TEXT or 3D. | |
uri | The URL of the media resource of which a thumbnail should be returned. Note that the URL should be encoded. |
Response
The thumbnail API call responds with an image in the given size. If the thumbnail does not exist, the API returns a 'default' image which is specific to the 'type' that is provided.
Datatypes for request parameters
The following datatypes are defined for the request parameters used in this method.
Datatype | Description |
---|---|
String | Values are preserved as they are present in the data. |
Deprecation Information
The following will be deprecated per the given date, ensure that your API clients are updated accordingly:
Date | Deprecation Details |
---|---|
January 2018 | As the API supports SSL now for a while, we will start to redirect all non-SSL traffic for the API to SSL. Ensure your applications follow redirects if needed or adjust the hostname to use SSL. |
Roadmap and Changelog
We deploy new versions of the portal and API quite regularly, but not all new versions result in changes in the interface. The current version of the Record API is 2.9.0 (2019-07-15). To see the changes made for this version and also all previous releases, see the API changelog in the project GitHub.
Add Comment