DEV Community

Cover image for How I used the Goodreads API to pick my next read

How I used the Goodreads API to pick my next read

Tara on October 14, 2019

Introduction I like to read. A lot. I also (shockingly enough) like to code. So a little while ago when I had the idea to combine these ...
Collapse
 
berniwittmann profile image
Bernhard Wittmann

I just couldn't hold my fingers still and had to setup a basic site where it does exactly what you did but in the form of a web UI.

berniwittmann.github.io/pick-a-book/

GitHub logo BerniWittmann / pick-a-book

Pick your next book from your Goodreads reading list

Welcome to Pick a Book 👋

Version Build Status License

Pick your next book to read from your Goodreads To-Read shelf on berniwittmann.github.io/pick-a-book/

Demo Video

Use it online

Use it online on berniwittmann.github.io/pick-a-book/

Install

npm install
Enter fullscreen mode Exit fullscreen mode

Usage

npm run serve
Enter fullscreen mode Exit fullscreen mode

Author

👤 Bernhard Wittmann

Show your support

Give a ⭐️ if this project helped you!

Inspiration

Huge thanks to @thackley for the inspiration I got from her blogpost

Questions

If you have any questions, don't hesitate to drop me a message






And since a lot of people here had some ideas I wanted to share it and hope for some contributions (in the sake of #hacktoberfest 😉).

Collapse
 
tara profile image
Tara

YAY THIS IS AWESOME.

Collapse
 
jkimexploring profile image
JkImExploring

This is so cool! I've been meaning to do something like this! I also wanted to add a randomizer button so that I could pick from a specific shelf. Ex: If I wanted a tbr nonfiction book I could pick the nonfiction shelf and it would pick one from that.

Collapse
 
tara profile image
Tara

Thank you! And yes, I totally agree with a randomizer button, it would be cool to be able to pick a book with more specific limitations. I also thought about doing some additional things like only returning books that have been released since I know I've got at least a handful of ones that aren't set to come out for a few months.

Collapse
 
jkimexploring profile image
JkImExploring

True. I think I have a couple like that from favorite authors but I'm so bad at keeping up with new releases. There's so much you can do with it!

Collapse
 
skelcat profile image
Cat

Greetings,

This is so cool, being a Goodreads user for years myself, I never imagined doing something like this, is so nice when you get to see the technical side of the things you use on your day to day.

Thanks,
Best Regards

Collapse
 
chintukarthi profile image
Karthikeyan Dhanapal

Hey Tara, I am trying to get a list of reviews for a book based on the ID using the Goodreads API, but all I am getting is a reviews_widget. Any idea on how to get this? I tried link method.

Collapse
 
berniwittmann profile image
Bernhard Wittmann

Thank you for the inspiration Tara. I didn't know Goodreads had an API and I'm definitely going to fiddle around with it myself now :)

Collapse
 
tara profile image
Tara

So glad it was useful! The Goodreads API isn't the most robust but I think there's a lot of potential to do some cool things with what they do have. I was poking around just before this trying to see if they have any endpoints for their yearly reading challenges (they don't) but I think their existing endpoints will still allow me to do what I want to do, it'll just take a bit more work on my end.

Collapse
 
jelveby profile image
Mikael Jelveby • Edited

One thing that should be noted about the Goodreads API is that it is pretty slow and is also rate limited to 1 request per second (per endpoint, I believe).

I've been fiddling around with the API for a while now, but the idea that I had for it would require potentially quite a lot of requests so I keep putting it off.

Goodreads Terms of Service

Collapse
 
tara profile image
Tara

Yep! The rate limit was a non-issue for me since I didn't need to make multiple requests for what I wanted to accomplish

Collapse
 
moopet profile image
Ben Sinclair

I've been wanting to do something with a book-related API for a while but haven't had a good idea.

Collapse
 
tara profile image
Tara

If you have a Goodreads account or are open to making one, I'd definitely recommend seeing what you can do with their API. There's also the Google Books API that I've used before that could be helpful!

Collapse
 
tara profile image
Tara

Thank you! Yes, please, definitely use it! Maybe if we get enough people on there, they'll make a more robust API we can use 👀