Book metadata over HTTPS.
Look a book up by ISBN or by title and author, fix a record for everyone, or send an EPUB and get it back repaired.
Basics
The base URL is https://api.metadata.dev. Looking books up and repairing EPUBs need no key and no signup. Corrections and adding books need an API key, sent as Authorization: Bearer <key>. Responses are JSON unless the endpoint returns a file. CORS is open, so you can call it from a browser.
curl https://api.metadata.dev/books/9780441013593The book object
Every lookup returns books in this shape. A field we have no value for is null, or [] for the lists.
{
"id": "9780441013593",
"isbn": "9780441013593",
"title": "Dune",
"author": "Frank Herbert",
"description": "Set on the desert planet Arrakis…",
"cover_url": "https://api.metadata.dev/covers/9780441013593",
"page_url": "https://metadata.dev/book/dune-frank-herbert-9780441013593",
"series": "Dune",
"series_position": 1,
"genres": ["Science Fiction", "Classics"],
"page_count": 604,
"release_year": 1965,
"publisher": "Ace",
"published_date": "2005-08-02",
"language": "en",
"asin": null
}| Field | Type | Notes |
|---|---|---|
| id | string | The ISBN-13, or an id like t-762af8168f5b for a book we know only by title and author. Use it anywhere an ISBN is accepted. |
| isbn | string | null | ISBN-13, digits only. null when the book has no ISBN on record. |
| isbn10 | string | null | The same ISBN in its 10-character form, when it has one. Read-only. |
| title, author | string | author can be null. |
| description | string | null | Up to 6,000 characters. |
| cover_url | string | null | Always our hosted copy, at /covers/{id}. |
| page_url | string | The book's page on metadata.dev, for linking or sharing. https://metadata.dev/book/{id} also works and redirects here. |
| series, series_position | string, number | null | Position can be fractional, such as 1.5 for a novella. |
| genres | string[] | |
| page_count | integer | null | Print length. |
| release_year | integer | null | First publication of the work. |
| publisher | string | null | Of this edition. |
| published_date | string | null | When this edition came out: YYYY, YYYY-MM or YYYY-MM-DD, as much as is known. |
| language | string | null | Two-letter code, such as en. |
| asin | string | null | Amazon's identifier for this edition. |
Look up by ISBN or id
GET /books/{id}
Takes an ISBN-10, an ISBN-13 (hyphens are fine), or a book id. If we don't know the ISBN yet, we look it up in the outside catalogs before answering, so a first request can take a second or two.
curl https://api.metadata.dev/books/0-441-01359-7Returns one book object, or 404 when no catalog knows the ISBN.
Look up by title and author
GET /books?title=…&author=…
Returns { "books": [...] } with the matching book, or an empty list. author is optional but makes the match much more reliable. Without it you can get several books that share a title.
Matching ignores case, punctuation, accents, bracketed edition notes such as (Deluxe Edition), and "Last, First" name order. A spelling we don't recognise is sent to the outside catalogs, which forgive more. If they draw a blank too, we work out which book you most likely mean, so a typo, a half-remembered title or even "that andy weir book about the guy stuck on mars" can still land. The first such lookup can take several seconds; the answer is remembered.
curl -G https://api.metadata.dev/books \ --data-urlencode "title=The Hobbit [illustrated]" \ --data-urlencode "author=Tolkien, J.R.R."
Look up many ISBNs
GET /books?isbn=a,b,c
Up to 100 ISBNs, comma separated. Returns { "books": [...] } with the ones we already know. This call never asks the outside catalogs, so use the single lookup for anything it leaves out.
Search
GET /books?q=…
Substring search over the titles and authors already in the catalog. Up to 20 results, shortest title first.
Covers
GET /covers/{id}
The cover image for a book, as JPEG or PNG, cached for a day. Every cover_url in a book object points here, so you never link to another site's image. We keep our own copy of each cover; one we haven't copied yet is fetched and stored on its first request. 404 means the book has no cover or its source was unreachable.
Series
GET /books/{id}/series
GET /series?name=…&author=…
A series in reading order, from one of its books or from its name. Use it to show "next in series" or to see which volumes a library is missing.
curl https://api.metadata.dev/books/9780451458124/series{
"series": "The Dresden Files",
"author": "Jim Butcher",
"position": 2,
"books": [
{ "position": 1, "title": "Storm Front", "release_year": 2000, "id": "9780451457813", "isbn": "9780451457813", "cover_url": "https://…" },
{ "position": 2, "title": "Fool Moon", … },
{ "position": 3, "title": "Grave Peril", "release_year": 2001, "id": null, "isbn": null, "cover_url": null }
],
"next": { "position": 3, "title": "Grave Peril", … }
}- An entry with an
idis in the catalog: look it up for the full record. An entry with"id": nullis a volume the series has that we don't hold yet. nextis the book afterposition: the next whole-numbered one, skipping in-between novellas such as 2.5 unless nothing else follows. It isnullat the end of a series, and when you ask by name.- By name, pass
authoras well when you can; series names repeat. 404from the book form means the book isn't part of a series we know of. A name we can't place returns an emptybookslist.
Changes
GET /changes?since=…
Books in the order their details last changed, for keeping your own copy of the catalog current without re-reading all of it. Call it with no since to start from the beginning, then keep passing back the next value you were given.
curl "https://api.metadata.dev/changes?since=1794950203:9780451458124&limit=200"
{
"books": [ { "id": "9780441013593", … , "changed_at": 1794951877 } ],
"next": "1794951877:9780441013593",
"more": false
}Each book is a full book object plus changed_at, a Unix timestamp. limit is 200 by default and 500 at most. When more is true, call again straight away with next; when it is false you are up to date, and the same next is where to resume later. Treat the cursor as opaque.
Corrections
POST /books/{id}/corrections
Fix a record for everyone. Needs an API key. Send a JSON body with any of the book fields except id and isbn. Each change is checked against the current record before it applies.
curl https://api.metadata.dev/books/9780441013593/corrections \ -H "Authorization: Bearer $METADATA_KEY" \ -d '{"page_count": 612, "genres": ["Science Fiction", "Classics"]}'
{
"approved": true,
"reason": "The page count and genres are plausible for this book.",
"book": { … }
}- A rejected change returns
422with"approved": falseand the reason. - An applied fix is locked: later imports and lookups never overwrite it. Only another correction can.
cover_urlmust be anhttpsURL on a supported book-cover host. To have us find a cover instead, use instructions.- Limits: text up to 300 characters (description 6,000), lists of 1–12 items,
page_count1–20,000,release_year1000–2100.
Repair an EPUB
POST /epub
Send an EPUB and get it back with its metadata repaired: title, author, description, genres, series and its number, and the cover when it was missing or small. The ISBN, publisher, language and publication date are filled in when the file has none, and left alone when it does. The book's text is not touched.
Send the file either as the raw request body, with options in the query string, or as a multipart form with the file in the file field and options as fields.
curl https://api.metadata.dev/epub \ -F file=@book.epub \ -F "instructions=the cover of this epub is too small and low resolution" \ -o fixed.epub
curl "https://api.metadata.dev/epub?id=9780441013593" \ --data-binary @book.epub -o fixed.epub
| Option | Notes |
|---|---|
| file | The EPUB, up to 30 MB. Multipart only; otherwise it is the body. |
| id | Optional. The ISBN or book id to repair it as. Skips working out which book it is. |
| instructions | Optional. What is wrong, in plain words, up to 500 characters. See Instructions. |
We work out which book the file is from the ISBN in its metadata, then its title and author. If those are a mess, such as a filename used as the title, we read through them to identify the book.
The response is the repaired file (application/epub+zip) with two headers:
X-Book-Id: the book it was repaired as.X-Report: URL-encoded JSON,{ "issues": [...], "notes": [...] }, describing what was changed. Same shape as inspect.
404 means we couldn't tell which book it is. The body carries what we read from the file under extracted; send it again with id. When the title fits several books and nothing else in the file settles it, the body also lists them under candidates, each with an id to send back.
Inspect an EPUB
POST /epub/inspect
The same upload as repair, but it changes nothing and returns the diagnosis as JSON. instructions is ignored here.
{
"book": { … },
"extracted": { "isbn": null, "title": "dune_final (retail)", "author": "Herbert, Frank" },
"issues": [
{ "field": "title", "problem": "differs", "was": "dune_final (retail)", "now": "Dune" },
{ "field": "description", "problem": "missing", "was": null, "now": "Set on the desert planet…" },
{ "field": "cover", "problem": "low_resolution", "was": "200×300", "now": "1200×1800" }
],
"notes": ["Identified as \"Dune\" from the file's metadata and name."]
}cover, when present, is the image the repaired file will carry (url, width, height); it is null when the file keeps its own cover.
problem is missing, differs or low_resolution (a cover under 500 pixels wide). now is what the repair will write, or null when we have nothing to fix it with.
Instructions
The instructions option on repair takes plain English, and can do two kinds of thing.
Find a different cover
Say the cover is wrong, missing, blurry, too small or low resolution. We search the catalogs for other covers of that book, take the largest, and check that it actually shows this book. The cover that passes becomes the catalog's cover for everyone and is put into your file.
the cover for this epub is wrong the cover of this epub is too small and low resolution this has no cover, find one
State a correct value
Give the right value outright and it is written into your file. From the metadata.dev page, or with an API key, it is also treated as a correction: checked, and applied for everyone if approved.
the author is Ursula K. Le Guin it's book 2 of The Broken Earth and has 410 pages
A complaint without the right value ("the author is wrong") changes nothing, because we won't guess. What happened to each request comes back in notes.
Add books
POST /books
Adds books to the catalog in bulk. Needs an API key.
curl https://api.metadata.dev/books \ -H "Authorization: Bearer $METADATA_KEY" \ -d '{"books": [ {"isbn": "9780765326355", "title": "The Way of Kings", "author": "Brandon Sanderson"}, {"title": "A Psalm for the Wild-Built", "author": "Becky Chambers"}, {"isbn": "9781250236210"} ]}'
Send up to 500 entries per request. Each needs an isbn, a title (ideally with author), or both, and may carry any other book field you know. What you send only fills blanks; it never replaces what the catalog already has.
The call returns straight away. Covers, page counts, descriptions and genres are filled in afterwards, usually within ten minutes.
{
"added": 1, "queued": 1, "known": 1, "rejected": 0,
"results": [
{ "id": "9780765326355", "status": "added" },
{ "id": "t-d492b7c8341f", "status": "known" },
{ "id": "9781250236210", "status": "queued" }
]
}| Status | Meaning |
|---|---|
| added | New to the catalog. Look it up by the returned id. |
| known | Already in the catalog. Any fields you sent filled its blanks. |
| queued | An ISBN sent on its own. It appears once the outside catalogs identify it, and is dropped if none can. |
| error | The entry was rejected; error says why. The rest of the batch still goes through. |
Results come back in the order you sent them. Sending the same book twice is harmless.
Errors
Errors are JSON: { "error": "…" }.
| Status | Meaning |
|---|---|
| 400 | The request is malformed: a bad ISBN, an unknown field, a file that isn't an EPUB. |
| 401 | A correction or an add without a valid API key. |
| 404 | No such book, or an EPUB we couldn't identify. |
| 413 | The EPUB is over 30 MB. |
| 422 | A correction was reviewed and rejected. |
| 429 | You hit the rate limit. Wait a minute. |
| 503 | An outside catalog or the review step is busy. Nothing was recorded; retry after the Retry-After seconds. |
Limits
Per IP address: 120 reads a minute, and 20 writes a minute (corrections and EPUB uploads together). EPUBs are processed in memory and returned; the file is not kept.