Why does Auckland Museum have an API?
For the past 160 years, our Curators, Collection Managers, and volunteers have been creating descriptions, classifications and taxonomies — meaning we have amassed a huge amount of data about the objects in our care.
One of the aims of Future Museum is to open up our collections and engage with online communities. The public API, which allows detailed open access to collection data, is a major part of our 'open first, closed by exception' approach that fulfils this aim.
This service allows you to search across approximately one million objects including Natural Science specimens, cultural collections, archives, library items and Online Cenotaph records.
What is an API?
An Application Programming Interface is essentially a set of instructions that tells two pieces of software how to communicate with one other — allowing you to build an app or integrate your website into another.
If you've used Collections Online, then you've already seen the API in action. When you put in keywords and hit enter, your browser makes a request to the API, which delivers the data as search results. With the API, you can bypass the website and send requests directly to the database that runs the website — particularly useful if you're a researcher or app developer.
How to get the data
You can access our data in several ways. Choose the method which best suits your project.
CSV export
Found on search results and individual record pages, this feature allows you to access a simplified version of the data about our records that can be viewed and manipulated in any standard database software.
Try it out
View our data as HTML
Our API provides an HTML view of every record, meaning you don’t need specialised software aside from the web browser you’re using right now. You can use our HTML webpage to view the raw data from our API in a standard browser. Here's the data for our Peafowl Pavo cristatus example:
Try it out
Call our API
Our API is ready and waiting when you need dynamic views of our data. We provide a REST-ish style interface to allow you to search against about 25 predefined fields (the same fields which power our Collections Online search) — giving you access to the media associated with Museum objects. Your calls will be returned as JSON or JSON-LD formatted data.
In order to view the data that the API sends back, you'll need some way to look at JSON-formatted data. Most modern browsers have extensions that can do this for you — here are some to get you started: Chrome, Safari, and Firefox. This kind of access would best suit mobile and web app developers.
Here's the result of a simple API call to find objects by place using 'auckland' as the parameter:
Try it out
Create queries using the SPARQL endpoint
Do you need to run detailed, SQL-like queries against the entire dataset (that's more than 600 fields!)? Then go ahead and fire up a client (like YasGui) and direct it at our SPARQL endpoint. This query service will allow you to grab large data dumps and would suit researchers who want to examine complex relationships between people, places, and objects referenced in our collection metadata.
Here’s an example that returns the number of records in each department:
Try it out
Get Started
Thanks for reading our introduction to the ways you can access Auckland Museum collection data. If you'd like to learn more, then please check out our full tutorial on Github.
Go to the tutorial
Tell us what you're working on
We encourage creative use of the API web services. Keep in touch; we'd love to hear how you're using our data. Contact us on Twitter or send us an email.
Te Reo Māori Search Translations
In 2020 the Museum launched te reo Māori user interfaces for both Collections Online and Online Cenotaph. This work was funded by an Internet NZ grant. In line with our commitment to open data, and recognising the budgetary constraints many fellow GLAM institutions face, we have released the translations so that they can be used and repurposed by other institutions.
Legal
Before you get started on your project, you'll need to read our API Terms and Conditions. This is where you will find important information about your access rights, cultural permissions, and what you can and cannot do with our data. If you'd like to talk to us about these terms, please get in touch.
Read our API Terms and Conditions