Depends on what catalog system your local library is using. Many use the open source Evergreen ILS. It has a very robust API that I've used quite a bit for discovery.
There are some others, just one example.
Point being though is that every library system is different.