Book cover API

Big Book API puts a cover image URL in the image field of every search result, full book record and similar-book entry, whenever a cover is known. You get the cover in the same call as the title, authors and rating, whether you searched by title, by topic or by ISBN-13.

How it works

Search for books the way your app already does and read image from each result. This is the documentation example for /search-books:

curl -H "x-api-key: $BIG_BOOK_API_KEY" \
  "https://api.bigbookapi.com/search-books?query=books+about+wizards"

The response, abridged to one result:

{
    "available": 6049,
    "number": 10,
    "offset": 0,
    "books": [
        [
            {
                "id": 16384516,
                "title": "Harry Potter and the Goblet of Fire",
                "image": "https://covers.openlibrary.org/b/id/12775900-M.jpg",
                "authors": [ { "id": 14136020, "name": "J. K. Rowling" } ],
                "rating": { "average": 0.9120000004768372 }
            }
        ],
        …
    ]
}

To get the cover for a known edition, search with isbn= and an ISBN-13 instead of a query (see the ISBN lookup API). A search by title or topic returns up to 100 books, each with its cover URL when one is known, and counts as one request.

Where the image field appears

EndpointPath to the coverReturned with it
/search-booksbooks[i][j].imageid, title, subtitle, authors, rating.average
/{id}imageidentifiers, authors, publish date, page count, description, rating
/{id}/similarsimilar_books[i].imageid, title, subtitle

Cover sizes and the Open Library Covers service

In the documentation examples the cover URLs point to the Open Library Covers API by cover ID, in the form https://covers.openlibrary.org/b/id/12775900-M.jpg. The letter before .jpg picks the size. Open Library describes S as small, suitable for use as a thumbnail, M as medium, suitable for a details page, and L as large; it gives no pixel dimensions. To show a larger cover, swap the suffix:

// Only rewrites URLs that end in -S.jpg, -M.jpg or -L.jpg.
function coverSize(url, size) {
  return url.replace(/-[SML]\.jpg$/, '-' + size + '.jpg');
}

coverSize('https://covers.openlibrary.org/b/id/12775900-M.jpg', 'L');
// https://covers.openlibrary.org/b/id/12775900-L.jpg

The ID-based form matters for rate limits: Open Library's documentation says lookups by cover ID are not rate-limited, while lookups by ISBN and other keys are limited to 100 requests per IP every 5 minutes. It also says the service is meant for showing covers on public websites, not for bulk download, and that a courtesy link back to Open Library is appreciated. Loading an image from that host does not count against your Big Book API quota.

Showing a cover in HTML

Give the image fixed dimensions so the layout does not jump while it loads, let the browser load it lazily, and describe the book in the alt text:

<img src="https://covers.openlibrary.org/b/id/12775900-M.jpg"
     width="180" height="270" loading="lazy" decoding="async"
     alt="Cover of Harry Potter and the Goblet of Fire by J. K. Rowling">

Not every book has a known cover, so test for an empty or missing image and show a placeholder of the same size. The same placeholder covers a URL that fails to load:

function renderCover(book) {
  const author = book.authors && book.authors.length ? ' by ' + book.authors[0].name : '';
  if (!book.image) return placeholder(book.title);

  const img = document.createElement('img');
  img.loading = 'lazy';          // set before src so the lazy hint applies
  img.width = 180;
  img.height = 270;
  img.alt = 'Cover of ' + book.title + author;
  img.onerror = () => img.replaceWith(placeholder(book.title));
  img.src = book.image;
  return img;
}

function placeholder(title) {
  const div = document.createElement('div');
  div.className = 'cover-placeholder';
  div.style.cssText = 'width:180px;height:270px';
  div.textContent = title;       // textContent, so titles are never parsed as HTML
  return div;
}

Call the API from your server so the API key stays private, as the terms require, and pass the book list to the page. For a complete widget built on /{id}/similar, see a similar-books widget in JavaScript.

Limits and pricing

Covers cost nothing extra: each call to /search-books, /{id} or /{id}/similar counts as one request. The free plan allows 50 requests a day at 1 request per second, for non-commercial use with a backlink, and returns 402 once that is used up. Paid plans are $6, $29 and $99 a month for 500, 5,000 and 50,000 requests a day, then $0.04, $0.02 or $0.005 per extra request (pricing, quotas). The terms do not allow storing the returned data, cover URLs included; caching for up to an hour needs written permission.

When another option is a better fit

Frequently asked questions

Is there a free book covers API?

The Open Library Covers API is free and needs no key; lookups by ISBN are limited to 100 per IP every 5 minutes. Big Book API's free plan gives 50 requests a day, and a single search can return up to 100 books with their cover URLs.

Which cover sizes are available?

For Open Library cover URLs like the ones in our documentation, change the suffix before .jpg: -S for a thumbnail, -M for a details page and -L for large.

Can I get a book cover by ISBN?

Yes. Call /search-books with isbn= and an ISBN-13, and read image from the result. ISBN-10s need converting first; see the ISBN lookup API.

What happens when a book has no cover?

The image field only carries a URL when a cover is known. Check for an empty or missing value and show a placeholder of the same size, as in the code above.

Do cover images count against my API quota?

No. The quota counts calls to Big Book API. A cover URL that points to covers.openlibrary.org is loaded from Open Library.

Get covers with your book data on the free plan: 50 requests a day.

Get a free API key Read the docs