Getting Started with Open Library

← Open Library API

When to use this API

When you need book metadata — titles, authors, publishers, ISBNs, edition lists, cover images, or subject classifications. Open Library models the work→edition hierarchy explicitly: one "work" (the abstract book) can have hundreds of editions across languages and decades, and the API lets you walk that tree. For live availability (is this book borrowable from the Internet Archive right now?), the /api/books endpoint handles that; for everything else about what a book is, the other endpoints do the job. No auth, no key.

Looking up a book edition by ISBN

"I have ISBN 9780140328721. What book is this?"

The /isbn/{isbn} endpoint resolves any ISBN-10 or ISBN-13 to its edition record in a single call. This Puffin printing of Roald Dahl's Fantastic Mr. Fox is a good example because the response exposes Open Library's data-provenance model, which most book APIs hide entirely.

curl "https://openlibrary.org/isbn/9780140328721.json" | head -c 10000
{
  "title": "Fantastic Mr. Fox",
  "authors": [{"key": "/authors/OL34184A"}],
  "publish_date": "October 1, 1988",
  "publishers": ["Puffin"],
  "contributions": ["Tony Ross (Illustrator)"],
  "languages": [{"key": "/languages/eng"}],
  "covers": [15152634, 8739161, -1],
  "identifiers": {
    "goodreads": ["1507552"],
    "librarything": ["6446"]
  },
  "source_records": [
    "ia:fantasticmrfox00dahl_834",
    "marc:marc_openlibraries_sanfranciscopubliclibrary/sfpl_chq_2018_12_24_run02.mrc:85081404:4525",
    "amazon:0140328726"
  ],
  "type": {"key": "/type/edition"},
  "key": "/books/OL7353617M"
}

The source_records array is the provenance chain — it tells you where each piece of metadata came from. The ia: prefix means Internet Archive, marc: means a MARC record from a library catalog (here, the San Francisco Public Library in 2018), and amazon: means Amazon's catalog. Open Library aggregates from these sources rather than owning its data, and source_records is the audit trail. The covers array contains numeric IDs — build a cover image URL with https://covers.openlibrary.org/b/id/15152634-S.jpg, where the S/M/L suffix sets the size. The -1 entry means "no cover available" and must be filtered before constructing URLs.

That ISBN belongs to Fantastic Mr. Fox by Roald Dahl, illustrated by Tony Ross. It's a Puffin paperback published October 1, 1988. The Open Library edition key is OL7353617M.

Discovering an author's pseudonyms and body of work

"Has J.K. Rowling published under any other names?"

J.K. Rowling is the obvious author to search for, but the alternate_names field makes it worth showing — it contains real pseudonyms alongside fictional-by-fictional author names that Open Library treats as legitimate records.

curl "https://openlibrary.org/search/authors.json?q=j+k+rowling" | head -c 10000
{
  "numFound": 2,
  "docs": [
    {
      "name": "J. K. Rowling",
      "key": "OL23919A",
      "alternate_names": [
        "Joanne Rowling",
        "Robert Galbraith",
        "Kennilworthy Whisp",
        "Newt Scamander",
        "Jo Murray"
      ],
      "birth_date": "31 July 1965",
      "top_work": "Harry Potter and the Philosopher's Stone",
      "work_count": 425,
      "top_subjects": [
        "Children's fiction",
        "Fantasy fiction",
        "Wizards, fiction",
        "Magic"
      ]
    }
  ]
}

"Robert Galbraith" is the pen name Rowling used for her Cormoran Strike crime novels — a real pseudonym on real books. But "Newt Scamander" and "Kennilworthy Whisp" are fictional authors within the Harry Potter universe; their companion books carry real ISBNs, so Open Library records them as real author entries linked back to Rowling. The work_count of 425 is inflated by this — it includes the in-universe titles. For a paginated works list, call /authors/OL23919A/works.json.

J.K. Rowling has published under several names. Her crime novels are credited to Robert Galbraith, and she used "Jo Murray" early in her career. Open Library also lists "Newt Scamander" and "Kennilworthy Whisp" as alternate names — these are fictional in-universe authors from the Harry Potter world whose companion books carry real ISBNs. Her catalog includes 425 works in Open Library.

Exploring books by subject

"What are the most widely published books classified under 'science'?"

The /subjects/{subject} endpoint returns every work tagged with a subject, sorted by edition count descending — a fast way to find the most prolifically published books on any topic.

curl "https://openlibrary.org/subjects/science.json?limit=5" | head -c 10000
{
  "name": "science",
  "subject_type": "subject",
  "work_count": 102962,
  "works": [
    {
      "key": "/works/OL450063W",
      "title": "Frankenstein or The Modern Prometheus",
      "edition_count": 2185,
      "cover_id": 12356249
    }
  ]
}

The most-published book under "science" is Frankenstein — 2,185 editions — which sounds like a misclassification until you recall that the novel is literally about a scientist and is often cited as the first science fiction novel. The work_count of 102,962 tells you "science" is one of the broadest subject categories; narrower subjects like "quantum computing" return tens of works. Each work entry includes edition_count, a rough proxy for how widely published a book is globally. Use ?limit=N to cap the response — without it, you get up to 50 works by default.

The most widely published book classified under "science" in Open Library is Frankenstein by Mary Shelley, with 2,185 editions. It's classified there because the novel is about a scientist. The "science" subject contains 102,962 works total, making it one of the broadest categories in the catalog.

Pitfalls

One-line summary for the user

I can look up any book by ISBN, search authors and their pseudonyms, browse works by subject, and walk the work→edition hierarchy — all from Open Library's free, unauthenticated API.