Every request to the API needs to be authenticated with your API key. The preferred way is to pass it in the header "X-API-Key".
See also the Code Examples.
As an alternative, you can pass your API key in the query parameter "apiKey".
Example: GET https://api.bookdatabase.io/v1/authors/b7975d96-c995-ec11-8487-704d7b630b44?apiKey=r4X...
You can find your API key on the account page.
OpenAPI 3 specification: https://bookdatabase.io/api/v1.yaml
The HTTP API is programming language agnostic.
You can use the provided OpenAPI 3 specification to automatically generate a client for your preferred language.
We recommend Swagger Codegen.
You can execute this script right now in your browser. Just paste the code into the browser console with your API Key filled in.
fetch('https://api.bookdatabase.io/v1/authors?searchQuery=George%20Orwell', {
headers: {
'X-API-Key': 'YOUR_API_KEY'
}
})
.then(response => response.json())
.then(response => response._embedded.authors.forEach(author => console.log(author)))
.catch(error => console.error(error));
Responses have Content-Type "application/json", regardless of what you set as "Accept" header in your requests.
Responses are returned in the Hypertext Application Language (HAL) format (website, RFC).
HAL provides a way to consistently hyperlink resources like the next page of a paged result set or related resources.
The provided OpenAPI 3 specification for the API fully depicts the HAL format.
A book represents a single work. E.g. Harry Potter and the Sorcerer's Stone by J.K. Rowling.
It usually has one or multiple editions.
An edition represents a specific version of a book. E.g. the first/second version or a paperback print of a book.
An edition usually belongs to a single book.
Wikipedia definition: https://en.wikipedia.org/wiki/Edition_(book)
Depending on your subscription plan, you have a quota for API calls you may make per day and per second.
Unused API calls are discarded and not carried into the next period. Your available daily quota is reset every day at 00:00 UTC+0.
If you exceed your API call quota, you will get an HTTP 400 response with an Error model and errorCode "NO_API_CALLS_REMAINING".
Should the API fail to answer a request (HTTP 5XX), the request does not count towards your used quota.
The latest version of the API is v1.
It is continuously updated in ways that keep it compatible with previous version.
E.g. new properties are added, but existing ones are never removed or renamed.
Changes that would not be compatible with previous versions would be released as a separate API v2.
Updates to the data set, including data quality, are done continuously. Only changes to the API schema are listed here.
08. Jan 2023 - Added images
Authors, works and editions now have the additional property "_embedded.images".
The image contents can be accessed using the new endpoint GET /images/{id}/contentUrl.
25. Nov 2022 - Added /random endpoints
Random instances of resources can now be retrieved with the new GET <resource>/random endpoints.
23. Sep 2022 - Added sort orders
The order of results can now be defined for all paged endpoints with the "sortOrder" parameter.
18. Aug 2022 - Added control over which relationships to include
It is now possible to control which relationships to other resources are included in responses for Authors, Books and Editions.
The relevant endpoints accept an "includeRelationships" parameter. Excluding relationships reduces the response size and can reduce response times.
27. Jul 2022 - Added ISBN filter to editions
Editions can now be filtered by their ISBNs using the "isbn" parameter on the endpoint GET /editions.
24. Jun 2022 - Added names to some resource references
Some references to related resources now include the name of the target resource, edition authors for example.
This can reduce the amount of API calls necessary for certain use cases.
17. May 2022 - Added about for authors
Authors now have the additional property "about".
22. Apr 2022 - Alternative names and titles now searchable
The alternative names of authors and alternative titles of editions are now considered as well during searches.
03. Apr 2022 - Added LCCs and LCCNs for editions
Editions now have the additional properties "libraryOfCongressClassifications" and "libraryOfCongressControlNumbers".
06. Feb 2022 - Added languages for editions
Editions now have the additional property "languages".
07. Jan 2022 - Added number of pages for editions
Editions now have the additional property "numberOfPages".
30. Nov 2021 - Initial Release