The Book Search API searches and filters over 4 million books. Send a free-text query, or filter by author, genre, rating, publish year, ISBN or OCLC number. The query is semantically parsed using our own large ontology. That means you can search paranormal books and the ontology knows that Aliens, Werewolves, Ghosts, and Shapeshifters fall into that category.
The response contains total_results, the number and offset of the page, and a books list in which each entry is an array of book objects. Each book has an id, a title, an optional subtitle and an image URL of the cover. Get up to 100 books per call with number, page through results with offset, and order them by publish date or rating with sort.
A search costs 3 tokens. This books API works with the same API key as every other API League API, and the free plan includes 50 tokens a day, enough for 16 searches. Typical uses are a book search box in a reading or library app, an ISBN lookup when a user enters a book's code, or lists of top-rated books in a genre.
This API wraps the search books endpoint by Big Book API.
To look up one book, pass its 13-digit ISBN in isbn, for example 9781781257654, and only the matching book is returned. oclc works the same way for OCLC numbers.
These are all the book genres you can use in the genres filter:
| Name | Example | Description |
|---|---|---|
query | books about wizards | The search query. |
earliest-publish-year | 2022 | The books must have been published after this year. |
latest-publish-year | 2023 | The books must have been published before this year. |
min-rating | 0.8 | The minimum rating the book must have gotten in the interval [0,1]. |
max-rating | 0.99 | The maximum rating the book must have gotten in the interval [0,1]. |
genres | nonfiction | A comma-separated list of genres. Only books from any of the given genres will be returned. |
authors | J.K. Rowling | A comma-separated list of author ids or names. Only books from any of the given authors will be returned. You can retrieve author ids from the search authors endpoint. Pass author names is slower and if two authors have the same name you can't disambiguate. |
isbn | 9781781257654 | Only the book matching the ISBN-13 will be returned |
oclc | 864418200 | Only the book matching the OCLC will be returned |
sort | rating | The sorting criteria (publish-date or rating). |
sort-direction | DESC | Whether to sort ascending or descending (ASC or DESC). |
group-results | false | Whether to group similar editions of the same book. |
offset | 0 | The number of books to skip in range [0,1000] |
number | 10 | The number of books to return in range [1,100] |
api-key | abcd1234 | Your API key. |
{
"total_results": 5999,
"number": 10,
"offset": 0,
"books": [
[
{
"id": 17200576,
"title": "Journey to Hogwarts",
"image": "https://covers.openlibrary.org/b/id/2520429-M.jpg"
}
],
[
{
"id": 15954006,
"title": "Inside Hogwarts",
"subtitle": "Magical Paintbook",
"image": "https://covers.openlibrary.org/b/id/2520430-M.jpg"
}
],
[
{
"id": 16384516,
"title": "Harry Potter and the Goblet of Fire",
"image": "https://covers.openlibrary.org/b/id/12775900-M.jpg"
}
],
[
{
"id": 14296534,
"title": "Harry Potter and the Order of the Phoenix",
"image": "https://covers.openlibrary.org/b/id/11416565-M.jpg"
}
],
[
{
"id": 14530450,
"title": "Great Gatsby (Silver Screen Edition)",
"image": "https://covers.openlibrary.org/b/id/12791857-M.jpg"
}
],
[
{
"id": 18810398,
"title": "The Hobbit",
"subtitle": "or, There and back again",
"image": "https://covers.openlibrary.org/b/id/394001-M.jpg"
}
],
[
{
"id": 13597674,
"title": "The Name of the Wind",
"subtitle": "The Kingkiller Chronicle : day one",
"image": "https://covers.openlibrary.org/b/id/6282709-M.jpg"
}
]
]
} Copy Code
curl -X GET 'https://api.apileague.com/search-books?query=books+about+wizards' \ -H 'x-api-key: myapikey'
Response Headers:
Content-Type: application/jsonX-API-Quota-Request: The number of tokens used by the requestX-API-Quota-Used: The number of tokens used in total todayX-API-Quota-Left: The number of tokens left today (depends on your plan)Yes. The API League free plan includes 50 tokens a day at no cost. A book search costs 3 tokens, so that is 16 searches a day. The free plan is for non-commercial use and requires a backlink to apileague.com. Paid plans start at $7 a month for 500 tokens a day.
Yes. Pass a 13-digit ISBN in the isbn parameter and only the matching book is returned. You can also look up a book by its OCLC number with oclc.
You can search with a natural language query and filter by author, genre, minimum and maximum rating, earliest and latest publish year, ISBN and OCLC. The query is parsed semantically, so a search for paranormal books also finds books about ghosts or werewolves.
The API searches over 4 million books across all the genres listed on this page.
Yes. min-rating and max-rating take values between 0 and 1, for example min-rating=0.8 for well-rated books. You can also sort the results by rating with sort=rating.
The Search Books API allows you to find books using keywords, authors, genres, or ISBNs, while the Find Similar Books API recommends books based on their similarity to a specific book you provide.