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
1Create an account and an API key. Basic starts with a 7-day trial.
2Call /v1/search with the key in the X-API-Key header.
3Read results: each item is an edition. Send its search_id back when a reader opens it.
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.
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.
Status
error
What it means
400
invalid_request
A 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.
401
invalid_api_key
No key, or a key that is not valid. Send it as X-API-Key (Authorization: Bearer is accepted too).
402
payment_required
The key is genuine but its subscription is not paying. The message says where to settle billing: send the customer there, and keep the key.
404
not_found
Nothing matches, and no lookup is running for it. An unknown path or lookup id answers in the same JSON shape.
429
rate_limited
A 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.
503
service_unavailable
Something 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.
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.
Plan
Requests / day
Requests / month
Requests / second
Results / page
Basic
10,000
300,000
2
200
Premium
30,000
900,000
6
2,000
Pro
100,000
3,000,000
10
2,000
Academic / Non-profit
4,000
120,000
2
20
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.
Search the catalog by title, author or ISBN, with the staged relevance ranking and the language-aware scores.
Returns a page of editions, the total (approximate for a text query, exact for an ISBN) and the search_id to hand back when a reader opens one of them. An ISBN we do not have yet answers 200 with no results and an isbn_lookup object carrying its lookup_id.
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.
How the query is matched. fuzzy, the default, tolerates typos and accents across titles and author names. phrase (the words side by side, in that order), exact (the whole title) and words (every word, any order) read titles only and are usually faster. An ISBN is looked up exactly whatever you send.
Only for phrase, exact and words. strict, the default, keeps accented letters distinct — años is not anos; ignore treats them as the same letter. Case and punctuation are always ignored.
relevance, the default, is the ranked order. date_desc puts the most recent editions first and date_asc the oldest first, by publication year and then full date; editions without a known date come last. The matched set and total are the same as with relevance, which breaks ties.
Shortened for length. A field a record has no value for is still present in the response.
A key is shown in full only once, when you create or rotate it. Paste it here to run the endpoints that need one. It is held in this page's memory and nowhere else: never saved in your browser, never written to a log, never sent anywhere but the API. Reloading this page clears it.
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.
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.
{
"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.
A key is shown in full only once, when you create or rotate it. Paste it here to run the endpoints that need one. It is held in this page's memory and nowhere else: never saved in your browser, never written to a log, never sent anywhere but the API. Reloading this page clears it.
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.
Shortened for length. A field a record has no value for is still present in the response.
A key is shown in full only once, when you create or rotate it. Paste it here to run the endpoints that need one. It is held in this page's memory and nowhere else: never saved in your browser, never written to a log, never sent anywhere but the API. Reloading this page clears it.
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.
Shortened for length. A field a record has no value for is still present in the response.
A key is shown in full only once, when you create or rotate it. Paste it here to run the endpoints that need one. It is held in this page's memory and nowhere else: never saved in your browser, never written to a log, never sent anywhere but the API. Reloading this page clears it.
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.
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.
A key is shown in full only once, when you create or rotate it. Paste it here to run the endpoints that need one. It is held in this page's memory and nowhere else: never saved in your browser, never written to a log, never sent anywhere but the API. Reloading this page clears it.
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.