Europeana is a portal that brings together over 50 million (58 million as of early 2020) digitised heritage items from around 40,000 cultural heritage institutions in Europe. It not only provides search and filter options for this material, but has been working the last couple of years on providing thematic collections of galleries, blogs and exhibitions on subjects that are relevant in the moment. For example a gallery of masks and head coverings (during the Covid-19 crisis 2020). Or for those who need something a bit more lighthearted to get through a lockdown – historic cat art turned turned into digital games and puzzles.
The collection with its 58 million items can be a bit daunting, if you don’t know what you are looking for. In this case you can explore the larger collection through the many smaller themed or topic related collections. For example a topic like “Women’s History” which gathers galleries, online exhibitions and blog posts about the subject in one curated gateway. Whereas a theme could be “Maps and Geography”, where you can search through 45,474 items related to this subject.
The idea behind Europeana can be traced back to 2005 where six European heads of state signed a letter asking the EU to support the development of a European Digital Library. Since the first version in 2008 it has undergone a transformation with the first years focussing on encouraging heritage institutions to provide their digital material to this collective portal. Since the launch of the newer version in 2016 there seems to be more of a focus; on one hand on encouraging reuse in different ways, and on the other hand, on curating this immense collection as described above. Reviewing the platform now, in the summer of 2020, it seems that there is a new Europeana experience being implemented, showing the Foundations ongoing commitment to empowering the cultural heritage sector in its digital transformation. (read more about Europeana)
Europeana’s online presence consists of two main entities 1) the Collections site (europeana.eu) – the main gateway for anyone interested in exploring the collection as it is curated by Europeana, and 2) the Pro site (pro.europeana.eu). The Pro site is where you find information for contributors to Europeana, about the Foundation, about the network, about using Europeana in education and most interesting for this tutorial, about the APIs (I will publish a tutorial about heritage APIs in general soon).
Europeana APIs consist of nine different entryways to access the collections metadata (I will publish a tutorial about heritage metadata soon). The API I will use here is what Europeana call the Search API. The idea is that you can extract metadata for a particular part of the collection as a dataset (in this case using the JSON format). In the following tutorial I will show you how to extract data and publish this in a different context on the web. This tutorial will use PHP, HTML and CSS (see links to posts explaining each coding language in more detail).
Step 1: apply for API key
In order to use the Europeana API you need to apply for an API key. When doing this you need to supply your email and full name. This is so Europeana can track your use of their API. If they for example are experiencing server overload, they can pinpoint the application it is coming from, or at least the person who applied for the key.
Step 2: Call up the API
The next step is to call up the API using a formatted URL. For the Europeana Search API the main address or base URL is:
For our first call we will simply add two parameters:
1) query = dog
2) wskey = your API key
https://api.europeana.eu/api/v2/search.json?query=dog&wskey=your API key
This will return the default first 12 records for this request.
Step 3: Understand the resulting data
If you copy/paste your URL into a browser you will most likely see a bundle of encoded text like the above.
This response is encoded using the JSON format and in a browser it can look quite daunting. Therefore, I suggest that you find a JSON code beautifier (I am using Code Beautify here) to paste the URL to see the JSON data in a more structured form, as below. Here you can search the data and find the paths to the items you need for your own website. For example the path to the image URL is:
► items ► 0 ► edmDatasetName ► 0
In step 4 we will use this path to show an image of the items we have retrieved.
Step 4: Display the result on a website
We have now come to the fun part – how we can display this retrieved data in a new and exciting way.
# some code print "Hello World"
If you wish to learn more about open heritage data then check out this post about my new book with that title (and a 40% discounts code).