English | Site Directory

Google Book Search APIs

Getting Started Guide

The Book Search APIs let you bring Google Book Search features to your site or application. For example, the Data API lets you perform most of the operations a normal user can on the Book Search website. Using JavaScript, the Dynamic Links feature lets you reliably and dynamically link to Book Search previews, while the Embedded Viewer API lets you embed the content directly into your site. Lastly, there are wizards and tools that you can use to include these interactive features on your site, even if you are not a web programmer.

First, you should decide on which of our APIs and tools best suits your needs. The table below shows the recommended tools based on your level of technical experience:

BasicMediumAdvanced
Wizards and tools Linking to Book Search and the Embedded Viewer API Data API

We also recommend you review the Terms of Service before and after you've completed your implementation, as they contain important information about your use of the Book Search APIs.

Wizards and tools

Widgets are JavaScript components that you can place in your webpage to enhance it with content from the Book Search index. Unlike the Embedded Viewer and Data API, these wizards and tools require only basic understanding of HTML and JavaScript. Currently, we provide the Book Bar and the Preview Wizard.

Book Bar

The Book Bar is a simple way to insert a strip of book thumbnails on your site. After clicking on a thumbnail, the user is taken to the book preview or information page on Book Search. To get started, use the simple wizard, and refer to the Programming Guide for advanced book bar techniques. For example, you can customize the orientation of the bar, programmatically change the search term used to generate the bar, and cycle through different sets of books.

Preview Wizard

With the Preview Wizard, you can quickly and reliably add book previews to your site. With just a few lines of code on your HTML page, you can embed a book, add a "Google Preview" button that opens a preview in a popup, and more. You can even customize the code generated by the wizard if you are familiar with basic JavaScript.

The Preview Wizard is actually built on top of our Dynamic Links and Embedded Viewer APIs. If you are an advanced developer, consider using the underlying APIs directly for customized integration.

We also provide a number of ways to reliably link to Google Book Search pages from your site. Whether you are a publisher in our Partner Program, a library looking to direct users to Book Search from your online catalog, or a developer of a book enthusiast site, it's easy to link to the right page on Book Search.

  • Linking to search result pages. As with most Google properties, it's easy to create a search results URL using the query term of your choosing. For example, you can link to all the books by a certain author.
  • Generating URLs to a particular book. Sometimes you want to link to a specific title or edition of a book. Using Static Links, you can create URLs to books based on International Standard Book Numbers (ISBNs), Library of Congress Control Numbers (LCCNs), and Online Computer Library Center (OCLC) record numbers. These URLs can be edited to return to the "About This Book" page, front cover, thumbnail image, copyright page, and more.
  • Dynamically displaying links to Book Search. Using Javascript and the Dynamic Links feature, you can create and customize links to Google Book Search from your site. Most commonly, this technique lets you include "smart" links that appear on your site only when a particular book is in our index. It can also be used to indicate to your users whether a book preview is available. As with the static book links, this feature works with standard identifiers such as ISBNs and OCLC numbers. (If you are a basic user, you should check out the Preview Wizard, which simplifies the most common uses of Dynamic Links.)

Embedded Viewer API

The Embedded Viewer API lets you embed book content from Google Book Search directly in your web pages with JavaScript. Similar to the Google Maps API and the YouTube Embedded Player, this allows you to build your own user experience around book previews.

Adding book preview functionality to your site is relatively simple, though it does require some knowledge of HTML and JavaScript. The Developer's Guide explains how the API can be loaded using the Google AJAX loader and drawn into a particular container on your page.

Once the embedded viewer has been added to a webpage, it can be controlled using JavaScript functions. This allows you to perform actions similar to what the user can do by clicking on the controls: you can go to the next page, zoom in or out, highlight search terms, and so on. You are also able to get the current page number, allowing your code react as the user navigates through the book.

More basic users should check out the Preview Wizard tool, which makes it even easier to embed a viewer on your site.

Data API

Using the Data API, a program can perform many of the operations available on the Book Search website, such as searching for books, gathering ratings, and more. A program can also authenticate as a user to manage his or her My Library collection, write book reviews, and more.

The Data API is primarily for developers who are used to programming in server-side languages. It gives you programmatic access to the book and user information stored on Book Search. With this, you can provide deeper integration with Book Search in any number of ways, such as:

  • personalizing your site or application with the user's existing information.
  • writing a web application that shows full-text search results from Book Search.
  • writing a desktop application that brings the Book Search experience to a new platform.

If you are curious about how the Data API works at the basic level using XML and HTTP, you can read the Google Data Protocol Guide. This guide details the requests and responses that the Book Search Data API servers expect and return. To learn more about the structure of the requests and responses expected and returned by the Book Search Data API, read the Google Data Reference Guide. This guide defines the API's feed types, HTTP request parameters, HTTP response codes, and XML elements. You might also want to read about the Google Data Protocol and the Atom Publishing Protocol, which are the standards upon which the Book Search Data API is built.

To make working with the API easier, we have a number of client libraries that abstract the API into a language-specific object model. These client libraries and sample code currently exist for Java, PHP, and JavaScript applications, and are open source under the Apache License 2.0. We also offer a version of the Developer's Guide that shows how to use the Java and PHP client libraries in particular.