First, sign up for an API key using this link. Within a few minutes of completing the form, you will receive an email containing a unique code that allows you to access the museum’s data. Be sure to keep your API key private. Each key is unique to the individual requesting it and should be treated like a password.
To retrieve data from the API, you must build queries that tell the API what to look for. A query, taking the form of a URL, consists of multiple components that act as building blocks.
A query to retrieve all of the object data looks like this:
When you go to the URL query, the unformatted data may look unreadable—try downloading a browser extension that reformats JSON data:
The structure of a query follows a pattern. The four basic components are:
All of the objects made in the year 2000:
https://api.harvardartmuseums.org/ | object | ? | yearmade=2002 | & | apikey=0000-0000-0000-0000 |
URL | Resource | Filter | API |
Alongside Objects, the Harvard Art Museums also provides access to other resources such as Exhibits, Artists, and Publications. Here is a full list of all resources available.
All exhibits from the late 20th century:
https://api.harvardartmuseums.org/ | exhibition | ? | after=1975 | & | before=2000 | & | apikey=0000-0000-0000-0000 |
URL | Resource | Filter | Filter | API |