The Nationalmuseum API18th February 2020
Nationalmuseum, the national gallery of Sweden has had an API for about two and a half years (I think),but it has yet to have any public documentation. So I decided to write down its features and some random tips.
The API is able to return specific objects as well as returning all objects through pagination. Many objects also link to their external IIIF manifest.
Retrieving an object
Pagination through all objects
The API has two parameters for pagination
limit sets the number of objects you get per page, the default is 50 and allowed values range from 1-100.
Get the 100-200 objects:
The response also returns you the URLs for the previous and next pages taking the limit parameter into account.
The URLs to items can seem daunting when you browse Nationalmuseums online collection but there is an alternative that’s easy to link to with the identifier you get from the API:
A great way to find interesting objects in the collection and connect it to other sources is to ask Wikidata: Objects in Wikidata with Nationalmuseum IDs
Finally, for some inspiration, you could check out the Nationalmuseum VIKUS Viewer instance.