14

According to Google doc, using this link can get the URL extra large for a book

Google doc

However, when I clicked https://www.googleapis.com/books/v1/volumes/zyTCAlFPjgYC , there are only 2 thumbnails (small and medium). So do I need to obtain a Google API key to get full information about a book ?

Harry
  • 303
  • 1
  • 6
  • 22

4 Answers4

10

I figured out that you can replace the &zoom=1 part of the URL with &zoom=0 for larger images, but only in some cases.

For an example, this is the Sherlock Holmes small thumbnail:

http://bks5.books.google.com/books?id=buc0AAAAMAAJ&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api

Now, by setting zoom to 0, I get a large thumbnail:

http://bks5.books.google.com/books?id=buc0AAAAMAAJ&printsec=frontcover&img=1&zoom=0&edge=curl&source=gbs_api

Mathias Lykkegaard Lorenzen
  • 15,031
  • 23
  • 100
  • 187
  • 1
    You also get the links directly in response to querying for a book, see https://developers.google.com/books/docs/v1/using#RetrievingBookshelf, there the response part contains 6 sizes "smallThumbnail" up to "extraLarge", like written here, distinguished by "zoom". 5 and 6 seem to be out of order, perhaps added later. – Andreas Reiff Jan 13 '15 at 17:55
  • 3
    Setting zoom to 0, seems to actually just give you the first page of the book. In some cases, that means the picture is vastly different. Check this example: https://books.google.com/books/content?id=ZxZ6_bBKdNcC&printsec=frontcover&img=1&zoom=1&source=gbs_api – Inrego Aug 14 '17 at 11:43
2

Actually with some books, google provides large image but some not.

Harry
  • 303
  • 1
  • 6
  • 22
0

set the zoom to 3 instead of 0 or 1 and it should work

Imdad
  • 41
  • 7
0

Just change zoom size in url.

let img = "https://books.google.com/books/content?id=54BEAAAACAAJ&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api"

let imgZoom = img.replace('zoom=1', 'zoom=10')
newImg.src= imgZoom;
<img src="" id="newImg"> 
NIKHIL CHANDRA ROY
  • 807
  • 11
  • 16