Change header color 🎲 🎲

Jake Paris

in Maine, in 2024

Building an After-Market API for a library catalog

Recently, as a fun way to work on my Vue.js skills, I built an interface for the library catalog of our local libraries. Sadly, the system that the libraries use doesn’t have an API component (meaning a javascript interface like what I built would have no way to digest the data from the catalog).

So I had to build an “after-market” API to take the html the catalog displays (yucky html at that), and turn it into nice tidy json data. This aspect of the project ended up taking more time then the Vue part, but could actually have some real use as the base for something workable. I’ll be the first to admit that scraping html with php repeatedly to parse out bits of data that are different in every view is a ridiculous hack. But it was fun to get it working. Currently it’s one-dimensional — in other words, it will get the first page of results, and scrape the data from a search, but you can’t enter into a full-view of an item, or a marc-record view from a result returned through the API. Those are wish-list features.

Here’s the library interface built on Vue (work in progress).

The After-Market Minerva API lives here (also a work in progress).