ISBN Search using Google Book Search API

I was asked to find a way to retrieve information about books by their ISBN number. My first try brought me to Amazon, but come to find out the only way you can use their API is if you are driving sales back to their website.

Round 2: I started checking out the Google Book Search API. It’s very easy to use and you can get it to return an xml file with a list of books matching your criteria. So to search for a book by ISBN, you simply visit this url:

http://books.google.com/books/feeds/volumes?q=isbn:isbn_you_are_searching_for

This appears to work for ISBN-10 and ISBN-13 numbers. Feel free to try it out now with the Guiness World Records 2011:

Also, as a side note, this does appear to perform faster if you stick your Google API key on the end of the query string.

One Option to Rule Them All!


Recently I attended a St. Louis WordPress meetup and Chris suggested using one option in the WordPress options table instead of multiple options. At first, that didn’t make much sense to me, but now it does – think database hits. If I have 10 options in my theme or plugin, that’s 10 separate queries to the database. Or, I can define one option, using it as an array, and call it on page load storing it as a global variable.

It makes lots of sense now!