Hello friends, this is an API that provides data on books such as novels, comics, etc it's like API in website goodreads.com but you don't need authorize or log in first to Get API key so just hit endpoint and you will get a list of books. With over 500+ book titles available i took the data from the website it's called goodreads.com, this is a brief documentation on how to use it. Happy coding, self-taught enthusiasts!
- GET https://books-goodreads-api.vercel.app/api/book
- GET https://books-goodreads-api.vercel.app/api/book/popular
- GET https://books-goodreads-api.vercel.app/api/book/?genres={genre}
- GET https://books-goodreads-api.vercel.app/api/book/:id
- GET https://books-goodreads-api.vercel.app/api/book/type/:type
- GET https://books-goodreads-api.vercel.app/api/authors
- GET https://books-goodreads-api.vercel.app/api/authors/:slug
Endpoint : https://books-goodreads-api.vercel.app/api/book
Method : GET
Size : 20 Books
Note : The data will be sorted by latest release date.
Status : 200 OK
{
"size": 20,
"data": [
{
"id": 84604,
"title": "title example",
"slug": "slug-example",
"author": "authors example",
"cover_path": "https://images.gr-assets.com/books/1455000000m/84604.jpg",
"summary": "Summary example",
"score": 189,
"rating": 4.5,
"type": "Novel",
"release_date": "2021-04-20",
"genres": [
"Fiction",
"Adventure",
"Drama",
]
},
]
}
Status : 500
{
"status": 500,
"message": "Internal Server Error"
}
Endpoint : https://books-goodreads-api.vercel.app/api/book/popular
Method : GET
Size : 20 Books
Note : The data will be sorted by the highest score.
Status : 200 OK
{
"size": 20,
"data": [
{
"id": 84604,
"title": "title example",
"slug": "slug-example",
"author": "authors example",
"cover_path": "https://images.gr-assets.com/books/1455000000m/84604.jpg",
"summary": "Summary example",
"score": 111111,
"rating": 4.5,
"type": "Novel",
"release_date": "2021-04-20",
"genres": [
"Fiction",
"Adventure",
"Drama",
]
},
]
}
Status : 500
{
"status": 500,
"message": "Internal Server Error"
}
Endpoint : https://books-goodreads-api.vercel.app/api/book/?genres={genre}
Method : GET
Size : 20 Books
List Of Genres :
- fiction
- historical-fiction
- novels
- indonesian-literature
- classics
- literature
- asia
- childrens
- education
- young-adult
- romance
- historical
- islam
- religion
- inspirational
- love
- family
- magical-realism
- drama
- adventure
- action
- thriller
- crime
- contemporary
- fantasy
- science-fiction
- slice-of-life
- philosophy
- parenting
- humor
- travel
- mystery
- literary-fiction
- politics
- adult
- unfinished
- roman
- comedy
- chick-lit
- feminism
- queer
- psychology
- poetry
- cultural
- spirituality
- banned-books
- contemporary-romance
- film
- high-school
- asian-literature
- true-story
- classic-literature
- conspiracy-theories
- detective
- horror
- mystery-thriller
- short-stories
- epic
- teen
- anthologies
- collections
- audiobook
- science-fiction-fantasy
- music
- womens
- japanese-literature
- dark-fantasy
- history
- mira
- novella
- japan
- christian
- middle-grade
- dark
- speculative-fiction
- sports
- time-travel
- angels
Endpoint Example = https://books-goodreads-api.vercel.app/api/book/?genres=drama
Status : 200 OK
{
"size": 20,
"data": [
{
"id": 84604,
"title": "title example",
"slug": "slug-example",
"author": "authors example",
"cover_path": "https://images.gr-assets.com/books/1455000000m/84604.jpg",
"summary": "Summary example",
"score": 189,
"rating": 4.5,
"type": "Novel",
"release_date": "2021-04-20",
"genres": [
"Fiction",
"Adventure",
"Drama",
]
},
]
}
Status : 404
{
"data" : {
"status": 404,
"message": "Genre not found"
}
}
Status : 500
{
"status": 500,
"message": "Internal Server Error"
}
Endpoint : https://books-goodreads-api.vercel.app/api/book/:id
Method : GET
Note : Get a detail book by id.
Status : 200 OK
{
"data": {
"title": "title example",
"slug": "slug-example",
"author": "authors example",
"publisher": "publisher example",
"cover_path": "https://images-na.ssl-images-amazon.com/images/123123.jpg",
"year": 2010,
"summary": "Summary example",
"score": 189,
"rating": 4.5,
"total_pages": 312,
"from_country": "Indonesia",
"type": "Novel",
"release_date": "2010-02-01",
"genres": [
"Fiction",
"Romance",
"Family",
"Contemporary"
]
}
}
Status : 404
{
"data" : {
"status": 404,
"message": "Book not found"
}
}
Status : 500
{
"status": 500,
"message": "Internal Server Error"
}
Endpoint : https://books-goodreads-api.vercel.app/api/book/type/:type
Method : GET
Size : 20 Books \
Note : The book will be sorted by latest release date.
List Of Types :
- novel
Status : 200 OK
{
"size": 20,
"data": [
{
"id": 84604,
"title": "title example",
"slug": "slug-example",
"author": "authors example",
"cover_path": "https://images.gr-assets.com/books/1455000000m/84604.jpg",
"summary": "Summary example",
"score": 189,
"rating": 4.5,
"type": "Novel",
"release_date": "2021-04-20",
"genres": [
"Fiction",
"Adventure",
"Drama",
]
},
]
}
Status : 404
{
"data" : {
"status": 404,
"message": "Type not found"
}
}
Status : 500
{
"status": 500,
"message": "Internal Server Error"
}
Endpoint : https://books-goodreads-api.vercel.app/api/authors
Method : GET
Size : 20 Authors
Note : The data will be sorted by the most book of each author.
Status : 200 OK
{
"size": 20,
"data": [
{
"id": 5,
"name": "author example",
"slug": "author-example",
"avatar": "https://avatar example",
"total_books": 34
},
{
"id": 1,
"name": "author example",
"slug": "author example",
"avatar": "https://avatar example",
"total_books": 14
},
{
"id": 2,
"name": "author example",
"slug": "author example",
"avatar": "https://avatar example",
"total_books": 10
},
]
}
Status : 500
{
"status": 500,
"message": "Internal Server Error"
}
Endpoint : https://books-goodreads-api.vercel.app/api/authors/:slug
Method : GET
Note : Get a list of books by author and the books will be sorted by the highest score.
Status : 200 OK
{
"data": {
"id": 40,
"name": "auhtor example",
"slug": "author-example",
"avatar": "https://avatar example",
"total_books": 5,
"books": [
{
"id": 48411,
"title": "title example",
"slug": "slug-example",
"cover_path": "https://images-example.com/123123.jpg",
"summary": "Summary example",
"score": 645,
"rating": 4.5,
"type": "Novel",
"release_date": "2012-02-02",
"genres": [
"Fiction",
"Romance",
"Drama",
"Contemporary"
]
},
{
"id": 62060,
"title": "title example",
"slug": "slug-example",
"cover_path": "https://images-example.com/123123.jpg",
"summary": "Summary example",
"score": 377,
"rating": 4.5,
"type": "Novel",
"release_date": "2007-07-01",
"genres": [
"Fiction",
"Romance",
"Drama",
"Contemporary"
]
}
]
}
}
Status : 404
{
"data" : {
"status": 404,
"message": "Author not found"
}
}
Status : 500
{
"status": 500,
"message": "Internal Server Error"
}