Books & Authors API
The Books & Authors API returns book and author data as clean JSON.
🤖 Using an AI assistant? Copy this link into ChatGPT / Claude / Cursor — it reads every endpoint and parameter instantly and tells you if this API fits your use case.
The primary book_detail endpoint returns a book's title, authors, covers, subjects, description, page count, publishers, languages and editions, and you can search, pull an author and their works, browse subjects and trending, list editions and get an ebook. It is built for reading apps, catalog tools and literary research that need book metadata without a scraper. One ReefAPI key, one shared credit pool, the standard envelope.
The four id shapes book_detail accepts, and which edition each one pins
Open Library separates a work, the abstract book, from an edition, a specific printing with its own ISBNs and page count. book_detail takes either, plus a raw ISBN, and what comes back differs. Every row below is a measured call on The Hunger Games, whose work has 143 editions.
| Id you pass | Example | What comes back |
|---|---|---|
| ISBN-13 | 9780439023528 | edition OL61276815M, Scholastic Inc., 2009, with isbn_10 0439023521 returned alongside |
| ISBN-10 | 0439023521 | the same edition. Either ISBN resolves the other, so you never need to convert one yourself |
| Edition OLID (OL...M) | OL61276815M | that exact printing, identical to the ISBN-13 result |
| Work OLID (OL...W) | OL5735363W | work-level fields plus whichever edition Open Library fronts. It returned OL62454015M, a 2024 Latvian printing with ISBN 9789934327070 |
| Gutenberg id (ebook action) | 1342 | Pride and Prejudice with formats.epub, .txt, .html, .kindle and .cover, plus download_url, read_url and download_count 183,505 |
| Author OLID (author, author_works) | OL1394359A | the author profile and their paginated bibliography. Search results carry it as author_olids |
A work spans translations, not just reprints. Paging the 143 editions of The Hunger Games returned Latvian, Portuguese and Spanish printings on the first page alone, each with its own title, publisher, ISBNs and page count. If you need the English hardcover, pass its ISBN. Passing the work OLID will not get you there reliably.
Real request and response JSON
Captured from the indexed primary action, search, on .
{
"method": "POST",
"url": "https://api.reefapi.com/books/v1/search",
"headers": {
"x-api-key": "$REEF_KEY",
"content-type": "application/json"
},
"body": {
"q": "the hunger games"
}
}{
"ok": true,
"meta": {
"api": "books",
"endpoint": "search",
"mode": "live",
"latency_ms": 4352.3,
"record_count": 20,
"bytes": 38505,
"cache_hit": false,
"completeness_pct": 100,
"requests": 1,
"total": 204,
"page": 1,
"num_returned": 20
},
"data": {
"results": [
{
"title": "The Hunger Games",
"subtitle": null,
"authors": [
"Suzanne Collins"
],
"author_olids": [
"OL1394359A"
],
"olid": "OL5735363W",
"key": "OL5735363W",
"first_publish_year": 2008,
"edition_count": 142,
"covers": {
"small": "https://covers.openlibrary.org/b/id/12646537-S.jpg",
"medium": "https://covers.openlibrary.org/b/id/12646537-M.jpg",
"large": "https://covers.openlibrary.org/b/id/12646537-L.jpg"
},
"isbn": [
"[redacted-phone]",
"[redacted-phone]",
"[redacted-phone]"
],
"languages": [
"tur",
"fre",
"heb"
],
"subjects": [
"severe poverty",
"starvation",
"oppression"
],
"number_of_pages_median": 399,
"ratings": {
"average": 4.115,
"count": 539
},
"reading_log": {
"want_to_read": 5767,
"currently_reading": 458,
"already_read": 931
},
"ebook_access": "borrowable",
"has_fulltext": true,
"ia_id": "jieyouxi0000coll",
"first_sentence": "When I wake up, the other side of the bed is cold.",
"openlibrary_url": "https://openlibrary.org/works/OL5735363W"
},
{
"title": "The Hunger Games Trilogy (Hunger Games / Catching Fire / Mockingjay)",
"subtitle": null,
"authors": [
"Suzanne Collins"
],
"author_olids": [
"OL1394359A"
],
"olid": "OL15518787W",
"key": "OL15518787W",
"first_publish_year": 2010,
"edition_count": 29,
"covers": {
"small": "https://covers.openlibrary.org/b/id/12878880-S.jpg",
"medium": "https://covers.openlibrary.org/b/id/12878880-M.jpg",
"large": "https://covers.openlibrary.org/b/id/12878880-L.jpg"
},
"isbn": [
"[redacted-phone]",
"[redacted-phone]",
"[redacted-phone]"
],
"languages": [
"cat",
"pol",
"ger"
],
"subjects": [
"Romance",
"Drama",
"Young adult fiction"
],
"number_of_pages_median": 1136,
"ratings": {
"average": 4.529,
"count": 17
},
"reading_log": {
"want_to_read": 360,
"currently_reading": 15,
"already_read": 41
},
"ebook_access": "borrowable",
"has_fulltext": true,
"ia_id": "dietributevonpan0000suza_u1a0",
"first_sentence": null,
"openlibrary_url": "https://openlibrary.org/works/OL15518787W"
},
{
"title": "Mockingjay",
"subtitle": null,
"authors": [
"Suzanne Collins"
],
"author_olids": [
"OL1394359A"
],
"olid": "OL14908941W",
"key": "OL14908941W",
"first_publish_year": 2010,
"edition_count": 98,
"covers": {
"small": "https://covers.openlibrary.org/b/id/12646459-S.jpg",
"medium": "https://covers.openlibrary.org/b/id/12646459-M.jpg",
"large": "https://covers.openlibrary.org/b/id/12646459-L.jpg"
},
"isbn": [
"[redacted-phone]",
"[redacted-phone]",
"[redacted-phone]"
],
"languages": [
"vie",
"fre",
"pol"
],
"subjects": [
"New York Times bestseller",
"Sci-fi",
"Young Adult"
],
"number_of_pages_median": 424,
"ratings": {
"average": 3.775,
"count": 267
},
"reading_log": {
"want_to_read": 932,
"currently_reading": 56,
"already_read": 480
},
"ebook_access": "borrowable",
"has_fulltext": true,
"ia_id": "ziyouhuanmeng0000coll",
"first_sentence": null,
"openlibrary_url": "https://openlibrary.org/works/OL14908941W"
}
],
"numFound": 204,
"page": 1,
"start": 0,
"q": "the hunger games"
}
}What the Books & Authors API does
| Action | Description | Concrete use case | Key params |
|---|---|---|---|
| book_detail | merged book record by ISBN-10/13 or OLID (work OL..W / edition OL..M): title/authors/covers/subjects/description/pages/publishers/languages/editions/identifiers/ratings+distribution/reading-log; queried ISBN always injected | Content platforms call book_detail to get merged book record by ISBN-10/13 or OLID (work OL..W / edition OL..M). | id |
| search | search books: q OR fielded (title/author/subject/publisher/place/person/isbn/language); rich cards (ratings/reading-log/ebook_access/IA); sort=new|old|rating|want_to_read|editions; pagination | Research tools call search to search books. | q, query, title, author, subject, ... |
| author | author by OLID (OL..A) → bio/photo/dates/alternate-names/remote-ids(goodreads/wikidata/viaf/gutenberg)/links + include_works; or query/name → best-match-ranked author list | Community analysts call author to get author by OLID (OL..A) → bio/photo/dates/alternate-names/remote-ids(goodreads/wikidata/viaf/g…. | id, query, name, q, include_works, ... |
| author_works | full paginated bibliography of an author (OL..A): every work with cover, first-publish year and subjects; page/limit pagination over the author's complete catalog | Media monitors call author_works to get full paginated bibliography of an author (OL..A). | id, olid, limit, per_page, page |
| subjects | browse a subject / genre / theme → ranked work cards PLUS facets (top authors, publishers, related subjects, people, places, time-periods) and work_count/ebook_count; optional ebooks-only and published_in year-range filters; page/limit pagination | Content platforms call subjects to get browse a subject / genre / theme → ranked work cards PLUS facets (top authors, publishers, re…. | subject, name, q, genre, ebooks, ... |
| trending | most popular / trending books for a time window (now|daily|weekly|monthly|yearly) → ranked work cards (title, authors, cover, year, ebook access); page/limit pagination | Research tools call trending to get most popular / trending books for a time window (now|daily|weekly|monthly|yearly) → ranked wo…. | period, range, limit, per_page, page |
| editions | every printing / edition of a book (give a work OLID, an edition OLID, or any ISBN) → each edition's ISBN-10/13, publisher, format, publish date/place, page count, language and cover; page/limit pagination | Community analysts call editions to get every printing / edition of a book (give a work OLID, an edition OLID, or any ISBN) → each ed…. | id, olid, isbn, limit, per_page, ... |
| ebook | public-domain full-text (Project Gutenberg): query OR id=Gutenberg-id OR ids=batch; filters languages/topic/sort; returns formats{epub/txt/html/kindle/cover}+download_url+read_url; gutenberg.org OPDS fallback when gutendex is down | Media monitors call ebook to get public-domain full-text (Project Gutenberg). | query, search, q, id, gutenberg_id, ... |
Call search from your stack
curl -X POST https://api.reefapi.com/books/v1/search \
-H "x-api-key: $REEF_KEY" \
-H "content-type: application/json" \
-d '{"q":"the hunger games"}'import requests
r = requests.post(
"https://api.reefapi.com/books/v1/search",
headers={"x-api-key": REEF_KEY},
json={
"q": "the hunger games"
},
)
print(r.json()["data"])const res = await fetch("https://api.reefapi.com/books/v1/search", {
method: "POST",
headers: {
"x-api-key": process.env.REEF_KEY,
"content-type": "application/json",
},
body: JSON.stringify({
"q": "the hunger games"
}),
});
const { ok, data, meta, error } = await res.json();Ask your MCP-connected assistant: call reefapi.books.search with {"q":"the hunger games"}.Who uses this API and why
- Reading apps call book_detail to enrich a title with cover, subjects and edition data.
- Catalog tools use search and editions to resolve a work across ISBNs and formats.
- Discovery products use trending and subjects to surface books by theme.
Questions developers ask before integrating
Do I have to convert ISBN-10 to ISBN-13 before calling?
No. Both resolve, and each returns the other. A call with 9780439023528 and a call with 0439023521 returned the same record, the same work OL5735363W, the same edition OL61276815M, and both isbn_10 and isbn_13 populated as arrays. They are arrays because one Open Library edition can carry several ISBNs. Index on the work OLID if you want a stable key across printings, and on the edition OLID if you care which printing it is.
Why did a work OLID give me a Latvian edition?
Because a work is the abstract book and has no single canonical printing. Asking for OL5735363W returned title The Hunger Games with editions_count 143, and for the edition-level fields it filled in OL62454015M, a 2024 Zvaigzne ABC printing with ISBN 9789934327070 and publish_date 2024. The work-level answer is correct, the edition attached to it is arbitrary. Pass an ISBN whenever the printing matters, and use the editions action to see the full set.
Where are the Dewey and Library of Congress numbers?
On the edition, and only when a cataloger recorded them, which is far more common for academic titles than for fiction. Measured: 9780262033848 returned dewey_decimal 005.1 and lc_classifications with four entries including QA76.6 .I5858 2009, and 0596007124 returned dewey_decimal 005.1 with QA76.76.D47 H427 2004. The Hunger Games and a Penguin Pride and Prejudice both returned dewey_decimal null and lc_classifications as an empty list. Note the shapes differ: Dewey is a single string or null, LC is a list that can be empty.
Why is number_of_pages null on one edition and filled on another?
It is per-edition and per-cataloger, not per-work. The 2009 Scholastic edition of The Hunger Games returned number_of_pages null, while a Portuguese edition of the same work returned 260 and a Spanish hardcover 368. physical_format behaves the same way and is free text rather than an enum, so the same page returned paperback in lowercase on one edition and Hardcover capitalized on another. Normalize the case before you group on it.
What is the difference between ratings and reading_log?
ratings is the star data, with average, count and a full 1-to-5 distribution: The Hunger Games returned average 4.127 over 550 ratings distributed 15, 25, 86, 173, 251. reading_log is shelf activity and is much larger, because shelving does not require rating: 5,888 want_to_read, 470 currently_reading, 955 already_read and 1 stopped_reading. Rating counts here are in the hundreds, so treat the average as a weak signal rather than a consensus.
How are cover image URLs built?
Every record returns covers as an object with small, medium and large keys, and the size is the suffix -S, -M or -L on the filename. Two forms appear. Most records use the cover id, as in covers.openlibrary.org/b/id/15168460-S.jpg. Some editions instead use the ISBN, as in covers.openlibrary.org/b/isbn/9788427246003-S.jpg. Both are returned fully formed, so use the string you were given rather than assembling one from a cover id you assume exists.
How is this different from the goodreads engine?
goodreads is keyed on numeric Goodreads book ids and is where the reader community lives: reader reviews, literary awards, series ordering, Listopia lists and quotes. This engine is keyed on ISBNs and Open Library ids and is the bibliographic side: every printing of a work with its own ISBNs, publisher, format and page count, library classification codes, subject, people, place and time facets, and Project Gutenberg full text. If you need to know which printing a customer is holding, or want a legal EPUB download, that is here, not there.
Which books can I actually download?
Only the public-domain ones, through the ebook action, which reads Project Gutenberg. Gutenberg id 1342 returned copyright false, public_domain true and direct EPUB, plain-text, HTML and Kindle URLs. For everything else, book_detail returns an ebooks object whose availability was restricted on both titles measured, with a preview_url pointing at Internet Archive and read_url null. Search results express the same thing as ebook_access, which came back as borrowable for The Hunger Games.
What is the Books & Authors API?
Books & Authors API is a ReefAPI endpoint group for book details, search, authors and free ebooks. It returns live JSON through POST requests under /books/v1.
Is the Books & Authors API free to try?
Yes. ReefAPI starts with 1,000 free credits, no card required. Books & Authors calls use the same shared credit balance as every other ReefAPI engine.
Do I need a Books & Authors login or account?
No login to Books & Authors is needed for the API response. You call ReefAPI with your x-api-key header, and the playground can run live examples before you create a production key.
How fresh is the Books & Authors data?
The page example is captured from a live book_detail call, and production requests fetch live data through ReefAPI rather than a static sample.
How many credits does the Books & Authors API use?
Books & Authors actions currently cost 1 credit per successful call. Failed or blocked calls are free, and all APIs draw from one credit pool.
Can I call Books & Authors from an AI assistant or MCP client?
Yes. Connect ReefAPI once through MCP and your assistant can call books actions with the same key, credit pool and JSON envelope used by normal REST requests.