An unofficial blog that watches Google's attempts to move your operating system online since 2005. Not affiliated with Google.

Send your tips to gostips@gmail.com .

September 22, 2008

Embeddable Google Books

Google made it easy to embed in a site any book available at Google Book Search. You can add a fully-functional widget using this code:

<script type="text/javascript" src="http://books.google.com/books/previewlib.js"></script>
<script type="text/javascript">
GBS_insertEmbeddedViewer('GkCpLIk7aisC',600,500);
</script>

where you should replace GkCpLIk7aisC with the corresponding book ID, which can be obtained from the URL. Here's the result for "David Copperfield" by Charles Dickens:


"As on the Book Search site itself, you can search within the book, zoom in and out on the page, and browse up to 20% of the book," explains Inside Google Book Search. The new widget is already used by online catalogs like WorldCat.org and social book sites like weRead to preview books.

This is just one of the three Google Books APIs that allow programmatic access to more than one million books.

This blog is not affiliated with Google.