One of the most intriguing parts of Open Collections is the API search function. API, Application Programming Interface, is a set of defined tools that people use to communicate with a software system.
Basically this translates to asking a data program questions in computerese* – and getting back defined answers on that data that a computer (and, with practice humans) can read and use for research.
*computerese here translating to : A request URL sent over in HTTP with data/text sent back. The URL has everything needed to make a response. It’s called a RESTful approach.
What does this mean for Open Collections though?
It means, that API can help users run queries and do advanced analysis on Open Collections data. Or if you are really technically inclined you can make custom views, apps, widgets etc with full access to all the Open Collections Data.
Cool, I’ll bite. I want to see this data for myself. How do I do it?
First step asks you to Register an API key.
Step two involves using your web browser URL to make a request ( aka your questions) you can access collection metadata information (about our collections as a whole) or collection item metadata (information about items individually.
There are a few ways to do this – use UBC’s Query Builder for an easy input…
OR you can make a URL to submit an a HTTP Open query.
That’s a lot of words, but basically you use a root URL https://oc-index.library.ubc.ca/ and change it to include the collections/items you want in your query
Here we input the Uno Langamann Collection for collection metadata: https://oc-index.library.ubc.ca/collections/langmann
and this is the answer we got back:
And step 3? That’s obvious — Profit!
… well not really. However, you can read the response that comes back! See the answers we posted above as examples.
In case you are curious – check out items (if you are searching by collection items) by copy pasting the item number – with parenthesis – in Open Collections to see the item for yourself.
OR check out our International Interoperability Image Framework (IIIF) documentation on querying IFF documents which gives you access to our images programmatically
If you are interested, UBC explains the whole thing wonderfully – and in more detail – here.
Our API is pretty famous, it was even mentioned regarding Open Collections in this article.
Give our API queries a try! You never know what you might find!