Book Search API

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.

Search books by ISBN

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.

Book genres

These are all the book genres you can use in the genres filter:

  • action
  • adventure
  • anthropology
  • astronomy
  • archaeology
  • architecture
  • art
  • aviation
  • biography
  • biology
  • business
  • chemistry
  • children
  • classics
  • contemporary
  • cookbook
  • crafts
  • crime
  • dystopia
  • economics
  • education
  • engineering
  • environment
  • erotica
  • essay
  • fairy_tales
  • fantasy
  • fashion
  • feminism
  • fiction
  • finance
  • folklore
  • food
  • gaming
  • gardening
  • geography
  • geology
  • graphic_novel
  • health
  • historical
  • historical_fiction
  • history
  • horror
  • how_to
  • humor
  • inspirational
  • journalism
  • law
  • literary_fiction
  • literature
  • magical_realism
  • manga
  • martial_arts
  • mathematics
  • medicine
  • medieval
  • memoir
  • mystery
  • mythology
  • nature
  • nonfiction
  • novel
  • occult
  • paranormal
  • parenting
  • philosophy
  • physics
  • picture_book
  • poetry
  • politics
  • programming
  • psychology
  • reference
  • relationships
  • religion
  • romance
  • science_and_technology
  • science_fiction
  • self_help
  • short_stories
  • society
  • sociology
  • space
  • spirituality
  • sports
  • text_book
  • thriller
  • travel
  • true_crime
  • war
  • writing
  • young_adult
  • action
  • adventure
  • anthropology
  • astronomy
  • archaeology
  • architecture
  • art
  • aviation
  • biography
  • biology
  • business
  • chemistry
  • children
  • classics
  • contemporary
  • cookbook
  • crafts
  • crime
  • dystopia
  • economics
  • education
  • engineering
  • environment
  • erotica
  • essay
  • fairy_tales
  • fantasy
  • fashion
  • feminism
  • fiction
  • finance
  • folklore
  • food
  • gaming
  • gardening
  • geography
  • geology
  • graphic_novel
  • health
  • historical
  • historical_fiction
  • history
  • horror
  • how_to
  • humor
  • inspirational
  • journalism
  • law
  • literary_fiction
  • literature
  • magical_realism
  • manga
  • martial_arts
  • mathematics
  • medicine
  • medieval
  • memoir
  • mystery
  • mythology
  • nature
  • nonfiction
  • novel
  • occult
  • paranormal
  • parenting
  • philosophy
  • physics
  • picture_book
  • poetry
  • politics
  • programming
  • psychology
  • reference
  • relationships
  • religion
  • romance
  • science_and_technology
  • science_fiction
  • self_help
  • short_stories
  • society
  • sociology
  • space
  • spirituality
  • sports
  • text_book
  • thriller
  • travel
  • true_crime
  • war
  • writing
  • young_adult
GET
https://api.apileague.com/search-books

Parameters

NameExampleDescription
query
s o q
books about wizardsThe search query.
earliest-publish-year
n o q
2022The books must have been published after this year.
latest-publish-year
n o q
2023The books must have been published before this year.
min-rating
n o q
0.8The minimum rating the book must have gotten in the interval [0,1].
max-rating
n o q
0.99The maximum rating the book must have gotten in the interval [0,1].
genres
s o q
nonfictionA comma-separated list of genres. Only books from any of the given genres will be returned.
authors
s o q
J.K. RowlingA 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
s o q
9781781257654Only the book matching the ISBN-13 will be returned
oclc
s o q
864418200Only the book matching the OCLC will be returned
sort
s o q
ratingThe sorting criteria (publish-date or rating).
sort-direction
s o q
DESCWhether to sort ascending or descending (ASC or DESC).
group-results
b o q
falseWhether to group similar editions of the same book.
offset
n o q
0The number of books to skip in range [0,1000]
number
n o q
10The number of books to return in range [1,100]
api-key
s r q
abcd1234Your API key.
Example Request and Response
GET
https://api.apileague.com/search-books?query=books+about+wizards
{
    "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 Codecurl -X GET 'https://api.apileague.com/search-books?query=books+about+wizards' \ -H 'x-api-key: myapikey'

Headers

Response Headers:

  • Content-Type: application/json
  • X-API-Quota-Request: The number of tokens used by the request
  • X-API-Quota-Used: The number of tokens used in total today
  • X-API-Quota-Left: The number of tokens left today (depends on your plan)

Frequently Asked Questions

Is there a free books API?

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.

Can I look up a book by ISBN?

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.

What criteria can I use to search?

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.

How many books are in the database?

The API searches over 4 million books across all the genres listed on this page.

Can I filter by rating?

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.

How is the Search Books API different from the Find Similar Books API?

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.

Questions? Need Help? Ask Away

Quotas

Calling this endpoint costs
3 tokens