Lasking
Lasking

Reputation: 11

How to retrieve an url to a book cover only knowing its isbn

is there a way to obtain an URL to a cover of a book when only knowing the book's API?

I have tried two approaches yet. First, https://openlibrary.org/dev/docs/api/covers which does not work for me since they did not find any covers for the relatively new german books that I need the cover links for

Then I tried the google books API https://developers.google.com/books/docs/v1/using which was more promising. It is possible to search via ISBN there and the Google API found data for the books I'm interested in.

Unfortunately, the google API returns a JSON object. This JSON object contains a link to the book's cover. However, I cannot use Javascript/php or something in my application to retrieve the cover URL from the JSON object.

I can only use HTML and therefore need a direct link to a cover when providing a book ISBN instead of a JSON object containing the URL.

Ideally, a cover URL for a book with ISBN XXX would look like this https://some_text/XXX/some_text such that I can directly use it as src in an HTML image container.

Does anyone have an idea on how to approach this problem? Thanks in advance!

Upvotes: 1

Views: 1173

Answers (0)

Related Questions