How to get the extra large cover image from google book API?

11.9k Views Asked by At

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 ?

5

There are 5 best solutions below

0
Harry On

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

2
Mathias Lykkegaard Lorenzen On

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

0
Imdad On

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

0
NIKHIL CHANDRA ROY On

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"> 

0
Dean Ward On

For anyone coming across this there is a simple way to solve this that works most of the time. You can add '&fife=w800' to the end of the request. Leave the zoom as it is. I experimented with really large numbers and found that the api will just give you the biggest image it has up to the number you set. You can also set the height if you need to using '&fife=h900' and both with '&fife=w800-h900'