Everything the API answers today.

REST over HTTPS, JSON in and JSON out. This page is written from the routes the service actually registers, and it documents the public ones only.

Base URLhttps://api.thebooksapi.com/v1

Get API key

Your API keysAPI playground

Responses are UTF-8 JSON, and so is every error.

Every public endpoint, with its parameters, responses and errors, in one machine-readable file for client generators and API tools. OpenAPI 3.1 specification (JSON)

Quick start

  1. Create an account and an API key. Basic starts with a 7-day trial.
  2. Call /v1/search with the key in the X-API-Key header.
  3. Read results: each item is an edition. Send its search_id back when a reader opens it.
curl -G "https://api.thebooksapi.com/v1/search" \
  --data-urlencode "q=fría hortensia" \
  --data-urlencode "locale=es" \
  --data-urlencode "limit=1" \
  -H "X-API-Key: YOUR_API_KEY"

Authentication

Send your key in the X-API-Key header on every /v1 request; an Authorization: Bearer header is accepted as a fallback. Keys are created in your account dashboard. Cover images and the health check need no key at all.

Never ship a key in a browser or a mobile app — anyone who can read it can spend your allowance. Call the API from your own server, and rotate the key from your dashboard if it leaks.

X-API-Key: YOUR_API_KEY
Accept: application/json

# accepted as a fallback
Authorization: Bearer YOUR_API_KEY

Reading language

Pass locale=es, or send Accept-Language, and the ranking, the scores and the cached page are the ones for that language. Only the primary subtag is used: en, es, zh, ar, pt, fr, ja.

Empty values

A field with no value is still in the response, as null. The same field has the same type in every endpoint.

"isbn10":           "8420634484",
"subtitle":         null,
"publication_year": 1999

Errors

Every failure answers with a JSON object: error is one of the six codes below, and message is a sentence for a person reading a log. Branch on the status or on error, never on message.

{ "error": "invalid_request", "message": "at least one of q, title or author is required" }

Scroll horizontally to see every column.

StatuserrorWhat it means
400invalid_requestA parameter is missing or out of range: a search with no q, title or author; a limit above your page size; an offset over 1000; a has_cover that is not true or false; an ISBN that fails its checksum. The message says which.
401invalid_api_keyNo key, or a key that is not valid. Send it as X-API-Key (Authorization: Bearer is accepted too).
402payment_requiredThe key is genuine but its subscription is not paying. The message says where to settle billing: send the customer there, and keep the key.
404not_foundNothing matches, and no lookup is running for it. An unknown path or lookup id answers in the same JSON shape.
429rate_limitedA limit was reached: your key's per-second, daily or monthly allowance, or the per-IP limit that applies before the key is read. Retry-After says how many seconds to wait.
503service_unavailableSomething the request depends on — the rate limiter, or search itself — is unavailable. A busy or slow search on /v1/search answers 503 with Retry-After: 1. Retry after a short pause; a request a limiter rejects does not consume that limiter's allowance.

202: a lookup in progress

A 202 is not an error and has no error code. GET /v1/books/{isbn} and GET /v1/lookups/{id} answer 202 while a book we do not have yet is being looked up: status is processing (or partial, when nothing is in flight but another edition of the same work can be offered), lookup_id is what you poll, and retry_after and the Retry-After header give the seconds to wait. partial, when present, is marked unverified and carries that other edition with its own ISBN, never the one you asked for. A client that treats every status but 200 as a failure has to handle 202.

{"status":"processing","lookup_id":"lu_7Hq2mXa9KpR4","isbn13":"9788411328241","retry_after":5,"partial":null}

Rate limits and retries

A 429 carries Retry-After in seconds, together with RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset (seconds from now) and RateLimit-Policy. Wait the time you are given rather than retrying at once. Authenticated responses also carry X-Quota-Daily-Remaining and X-Quota-Monthly-Remaining, and X-RateLimit-Reset as a Unix timestamp.

402 is not 401

A 402 means the credential is fine and the subscription is not. Treat it as a billing problem in your own interface — show the customer the billing link in the message — and do not rotate or replace the key.

Plan limits

limit defaults to 20 and may not exceed your plan's page size. offset accepts 0 to 1000. As on ISBNdb, the daily and monthly allowances count records: a lookup counts 1, a batch 1 per ISBN, a search 1 per result returned, and covers count nothing. The per-second limit counts calls.

Scroll horizontally to see every column.

PlanRequests / dayRequests / monthRequests / secondResults / page
Basic10,000300,0002200
Premium30,000900,00062,000
Pro100,0003,000,000102,000
Academic / Non-profit4,000120,000220

Basic's 7-day trial runs on Basic's own limits: 10,000 requests a day. Monthly allowances reset on the first of the month, UTC.

Endpoints

Public endpoints only. The admin and publisher routes are internal, and nothing you build needs them.

GETAPI key required#

/v1/books/{isbn}

Look up one edition by ISBN-10 or ISBN-13.

Returns the edition with its contributors, cover URLs, licence information and the work's reading signals. A book we do not have yet answers 202 while it is being looked up: a lookup_id to poll on /v1/lookups/{id}, a retry_after in seconds and, when one exists, another edition of the same work marked unverified. When nothing is being looked up, or the sources have already answered, it answers 404.

Parameters

path

isbnstringrequired
ISBN-10 or ISBN-13. Hyphens, spaces and an ISBN prefix are accepted; the checksum is validated and the value converted to ISBN-13.

query

search_idstring
The search_id of the search this book was opened from, so the click counts for that query. The X-Search-Id header does the same.
include_no_isbnboolean
true also returns editions without a valid ISBN-10 or ISBN-13. Off by default. Those editions have has_isbn false and an opaque id such as bk_4fK9xQ2mPa7Z; GET /v1/books/{id} answers that id only with this flag.
localestring
The language you are reading in: en, es, zh, ar, pt, fr or ja. It selects the language-aware ranking and the scores that come back.

Request

curl "https://api.thebooksapi.com/v1/books/9788420634487" \
  -H "X-API-Key: YOUR_API_KEY"
Example response200 OK
{
  "id": "9788420634487",
  "has_isbn": true,
  "isbn13": "9788420634487",
  "isbn10": "8420634484",
  "work_id": "01a1651b-caea-711b-b361-a9916b294a59",
  "title": "Fría Hortensia y otros cuentos",
  "subtitle": null,
  "language": "spa",
  "publication_year": 1999,
  "pages": 263,
  "created_at": "2026-09-12T08:41:03.117Z",
  "updated_at": "2026-10-24T19:05:44.802Z",
  "contributors": [
  …

Shortened for length. A field a record has no value for is still present in the response.

POSTAPI key required#

/v1/books/batch

Look up as many as a hundred ISBNs in one request.

Returns an object keyed by the ISBN you sent, each value an edition, an entry carrying an error or, for a book being looked up, the same document a 202 carries. The whole batch is one request against your quota.

Parameters

body

isbnsstring[]required
One to a hundred ISBNs. Each is validated on its own, and an invalid or unknown one gets its own entry in results.

Request

curl "https://api.thebooksapi.com/v1/books/batch" \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"isbns":["9788420634487","9788411328241","9780000000000"]}'
Example response200 OK
{
  "results": {
    "9788420634487": {
      "id": "880e8400-e29b-41d4-a716-446655440001",
      "isbn13": "9788420634487",
      "title": "Fría Hortensia y otros cuentos",
      "language": "spa"
    },
    "9788411328241": {
      "status": "processing",
      "lookup_id": "lu_7Hq2mXa9KpR4",
      "isbn13": "9788411328241",
      "retry_after": 5,
      "partial": null
  …

Shortened for length. A field a record has no value for is still present in the response.

GETAPI key required#

/v1/lookups/{id}

Poll an ISBN lookup that a 202 handed out.

Answers 202 with the same document while the lookup runs; 200 with status found and the edition once it is in the catalogue; 200 with status not_found when the sources had nothing. An unknown id answers 404.

Parameters

path

idstringrequired
The lookup_id from a 202 of /v1/books/{isbn}, an entry of /v1/books/batch or the isbn_lookup of /v1/search: lu_ followed by 12 letters and digits.

Request

curl "https://api.thebooksapi.com/v1/lookups/lu_7Hq2mXa9KpR4" \
  -H "X-API-Key: YOUR_API_KEY"
Example response200 OK
{
  "status": "processing",
  "lookup_id": "lu_7Hq2mXa9KpR4",
  "isbn13": "9788411328241",
  "retry_after": 5,
  "partial": null
}

Shortened for length. A field a record has no value for is still present in the response.

POSTAPI key required#

/v1/reports

Report a wrong record, a copyright concern or a removal request.

Stores the report and answers with a reference. We email a confirmation link to the address given, and the team reviews the report once it is confirmed.

Parameters

body

typestringrequired
What you are reporting: error, copyright or removal.
isbnstringrequired
The ISBN-10 or ISBN-13 of the book the report is about.
detailsstringrequired
What is wrong, in your own words.
emailstringrequired
The address we send the confirmation link to and answer on.

Request

curl "https://api.thebooksapi.com/v1/reports" \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"error","isbn":"9788420634487","details":"The page count is 263 on this printing, not 236.","email":"you@example.com"}'
Example response200 OK
{
  "message": "Report received. Confirm it from the email we sent; confirmed reports are reviewed within 48 hours.",
  "reference": "REQ-7KQ2M9XA4T",
  "status": "unconfirmed"
}

Shortened for length. A field a record has no value for is still present in the response.

GETNo key needed#

/v1/covers/{cover}

Cover images, from our own storage. No API key: a browser, a CDN and our own pages all load this directly.

Returns the image bytes with a long cache lifetime and an ETag. HEAD answers with the same status and headers and no body.

Parameters

path

coverstringrequired
Which image to serve: a cover id with its size, an edition id with its size, or an ISBN. The three shapes are listed below.

query

defaultboolean
false answers 404 instead of the placeholder image when we have no cover for the book.

Request

curl "https://api.thebooksapi.com/v1/covers/8231856-M.jpg"
Example response200 OK
HTTP/1.1 200 OK
Content-Type: image/jpeg
Cache-Control: public, max-age=31536000, immutable
ETag: "3b9f…c71a"

<binary image data>

Shortened for length. A field a record has no value for is still present in the response.

GETNo key needed#

/health

Liveness. No API key.

Returns a status and a Unix timestamp. /health/ready also checks PostgreSQL and Redis, and answers 503 when either is unreachable.

Parameters

No parameters.

Request

curl "https://api.thebooksapi.com/health"
Example response200 OK
{
  "status": "ok",
  "timestamp": 1793404800
}

Shortened for length. A field a record has no value for is still present in the response.

Relevance

A page of search results is ordered by match tier first, then by the work's standing in the catalog, then by the stored popularity and searchability blend for the request's language, then by whether we have a cover, and last by the clicks recorded for that exact query. Nothing below the tier can lift a weaker match above a better one.

popularity and searchability are 0 to 100, and are absent for a work nothing has scored yet. total_is_approximate tells you what the total means: false for an ISBN lookup, which is exact, and true for a text query, which counts the candidates the staged search kept.

Cover images

Covers are served from our own storage and never hotlinked from a source. Sizes are S, M and L, and the three URLs for one book also come back on the edition as cover_urls. A cover we do not have answers with a neutral placeholder image and status 200, so a layout keeps its shape; add ?default=false for a 404 instead.

  • /v1/covers/{cover_id}-{S|M|L}.jpg
  • /v1/covers/edition/{edition_id}-{S|M|L}.jpg
  • /v1/covers/{isbn}

Licence notices

A record carries an optional license_notice string. It is present only when a contributing source's licence requires attribution, and it holds the exact wording to reproduce — for example “Portions licensed under CC BY 4.0 – see https://thebooksapi.com/data-licences/”. When it is there, display it wherever you display the data and keep it with the record if you pass the data on.

Terms of use

You may not use the API to bulk-extract the catalogue, or to rebuild, recreate or replicate our database or a substantial part of it. When you redistribute data obtained from the API, keep each record's license_notice with it.

Something missing from this page?

If a parameter, a status or a field is not documented here, that is a bug in the documentation. Tell us and we will fix it.

Contact us