<html>
<head>
<title>Books API Example</title>
</head>
<body>
<div id="content"></div>
<script>
function handleResponse(response) {
for (var i = 0; i < response.items.length; i++) {
var item = response.items[i];
// in production code, item.text should have the HTML entities escaped.
document.getElementById("content").innerHTML += "<br>" + item.volumeInfo.title;
}
}
</script>
<script src="https://www.googleapis.com/books/v1/volumes?q=harry+potter&callback=handleResponse"></script>
</body>
</html>
So, ok, great, now you can load that into a page and it will render a page that looks a little something like
OK, now lets try and do something a little more interesting with that. I looked into the Embedded Viewer API and using the first example as a guide, I made some simple modifications to our original code and added the ISBN number, and you can use something simple like
function initialize() { var viewer = new google.books.DefaultViewer(document.getElementById('viewerCanvas')); viewer.load('ISBN:0738531367'); }
to load the preview of the book into the browser.
See the example here: http://lloyd.s3.amazonaws.com/code/booksapi/client2.html