Discovering the secrets of API

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.

Screen Shot 2016-04-05 at 10.08.04 AM

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.

Screen Shot 2016-04-04 at 10.20.25 AM

Which is basically registering your email for a short time to make sure you aren’t a robot.


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…

Screen Shot 2016-04-04 at 11.20.55 AM

Easy Peasy!

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 and change it to include the collections/items you want in your query

Here we input the Uno Langamann Collection for collection metadata:

and this is the answer we got back:

Screen Shot 2016-04-04 at 10.34.35 AM

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.

Screen Shot 2016-04-05 at 10.29.08 AM

id in our query!


Screen Shot 2016-04-05 at 10.32.56 AM

searching Open Collections

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!


Post Comment

a place of mind, The University of British Columbia

Emergency Procedures | Accessibility | Contact UBC  | © Copyright The University of British Columbia