Wednesday, December 21, 2011

General - The Google Book Search API v1

Searching book info with the The Google Book Search API v1 is as easy as it gets!
For example, I was asked to find the available info of a book from a given ISBN number.

Books API Example








The cute part being:
<script src="https://www.googleapis.com/books/v1/volumes?q=isbn:9789681848828&callback=handleResponse"></script>

Output from the above query:

Introducción a la lógica | Autor: Irving M. Copi,Carl Cohen | fecha de publicacion: 1999 | editorial : Limusa Noriega Editores

References
http://code.google.com/intl/es-MX/apis/books/
http://code.google.com/intl/es-MX/apis/books/docs/v1/using.html#query-params
http://code.google.com/intl/es-MX/apis/books/docs/v1/using.html#RetrievingVolume 

There are another quirks into handling this information, but I deemed the callback mechanism to be a very straightforward approach, nevertheless is not that smooth to store the results in this way.

Now, I'll enter this info into postgresql, I'll have tons of fun =-)
You can test this snippet by entering the ISBN you're interested in, save it as a html file and open it with firefox (is there another web browser?).

No comments:

Post a Comment