API for displaying images of book covers

I came across an interesting API from OpenLibrary (part of the Internet Archive) that can return the cover image for any book given an ISBN code or other identifier:

https://openlibrary.org/dev/docs/api/covers

Here’s an example of a simple macro for displaying book covers:

\define openlibrary-cover-url(value,key:"isbn",size:"M")  https://covers.openlibrary.org/b/$key$/$value$-$size$.jpg

<img src=<<openlibrary-cover-url value:"9780907563150" size:"L">>/>
  • The key can be ISBN, OCLC, LCCN, OLID or ID (case-insensitive)
  • The size can be one of S, M and L for small, medium and large

11 Likes

Thanks @jeremyruston . This plugin from the old forum is also useful for openlibrary lookups.

http://ceebeetree.tiddlyspot.com/#%24%3A%2Fplugins%2Fceebee%2Fbookinfo

This plugin requests book details from the archive at https://openlibrary.org/ using the ISBN number of the book. The details are then recorded locally in a new tiddler that is named as per the book title and tagged “Books”

2 Likes