Add Google Books previews to your site

One main goal of the Google Books Preview Programme is to make your books more discoverable on the web - and to make it easier for book buyers to preview your titles. In addition to including your titles on Google Books, we provide an API platform that lets websites, such as your own, feature book previews and full-text search capabilities. On this page, we'll explain how to add these features to your site.

Guidelines for implementation

  • When using a sample code snippet, make sure that you fill in the ISBN for your book.

  • When you an enter an ISBN, we automatically detect whether or not the book is in Google Books. If it's not, nothing will be displayed for that code snippet.

  • Each code snippet must specify a language. The examples below are set to English (en), but you may use any of the following language codes:

    • bg
    • ca
    • hr
    • cs
    • da
    • de
    • es
    • en-GB
    • fi
    • fil
    • fr
    • el
    • hi
    • hu
    • hy
    • id
    • in
    • is
    • it
    • ja
    • ko
    • lv
    • lt
    • nl
    • no
    • pl
    • pt-BR
    • pt-PT
    • ro
    • ru
    • sk
    • sl
    • sr
    • sv
    • th
    • tr
    • uk
    • vi
    • zh-CN
    • zh-TW

    Link to a Google Books Preview page

    <script src=""></script>

    [ Live demo ]

    Add a button that opens a preview in a pop-up window

    <script src=""></script>

    [ Live demo ]

    Embed a 500 by 400 pixel preview in-line, right in the page

    Note: if you embed this code into a service like Blogger, please make sure that no <br> tags have been introduced into your code before you publish.

    <script src=""></script>
    <script>GBS_insertEmbeddedViewer('ISBN:0738531367', 500, 400);</script>

    [ Live demo ]

    Link to a separate preview page for a book on your site

    <script src=""></script>
    <script>GBS_insertPreviewButtonLink('ISBN:0738531367', { 'alternativeUrl' : '' } );</script>

    [ Live demo ]

    Link to a Google Books Preview page on a Co-Branded Search site

    Note: When using this feature, you must include your Co-Branded Search name, (houghton in the example below). Once you've set up Co-Branded Search, this name corresponds to the text immediately following the /p/ in your URL, e.g.

    <script src=""></script>

    [ Live demo ]

    Further information about using this code is available at the Google Books APIs site.