Top of page

Making API Requests

How to craft a request to the JSON/YAML API for

Content Covered by the API

Most of the collections content on the website is presented on parts of the website, called endpoints, that are implemented via the API. There are a number of subsites on that were not implemented with the API and so do not provide API responses. A few examples of sites that do not provide API response are:

There are other parts of the website that are implemented using the API, such as the Library's events site and the Library's visitors site, but which do not provide simple search or item responses and are not discussed in the following documentation.

Base URL

The API response underlying any page displayed may be exposed by adding an API response format parameter, ?fo=json, to the end of any page that is implemented using the API. Requests to the JSON/YAML API use the base url{endpoint}/?fo=json. To return data in YAML format, simply change fo=jsonto fo=yaml.

The base url can be adjusted by changing the endpoint and/or adding parameters to the query string, i.e. the portion of the url following a ? A query string uses query parameters to narrow search results. Multiple parameters, also known as key value pairs, can be used in the same query string and are conjoined by an &, e.g.

An explanation of the search endpoints (/search, /{format}, /collections, and /collections/{collection}) and the item / resource endpoints (/item, /resource) follows in the API Endpoints documentation. An explanation of some of the query parameters available with the API follows in the API Parameters documentation.