Goodreads Developers discussion

55 views
questions > Get all read books

Comments Showing 1-6 of 6 (6 new)    post a comment »
dateUp arrow    newest »

message 1: by Ana (new)

Ana (acoconut) Hi,

I want to get all read books by a given user.

I know that I can do this:

params = {'v': 2,
'key': SK.CONSUMER_KEY,
'shelf': 'read',
'per_page': 200}

response = session.get('https://www.goodreads.com/review/list...?', params=params).content

But that only gives me 200 read books by a given user, which for most users might be enough, but I want to cover all cases. How can I get ALL read books? Ideas?

Thanks!


message 2: by Jeff (new)

Jeff (jeffwong) | 75 comments Mod
If you look at the sample XML response in the API docs, the "reviews" tag will have a "start", "end", and "total" attributes. These attributes will describe the page bounds.

You can use the "page" parameter with a number to get subsequent pages.


message 3: by Ana (new)

Ana (acoconut) Right, but I can only retrieve a page per second, right? I'm very new to APIs, so I might be wrong...


message 4: by Michael (new)

Michael Economy (michaeleconomy) That's correct. Thanks for checking!


message 5: by Ana (new)

Ana (acoconut) So in my case, would it be a good idea to:

1. Get 200 books
2. Check if I actually retrieved 200 books
2.1. Yes, 200 books:
2.1.1. Wait 1 second, repeat.
2.2. No, less than 200 books:
2.2.1. Keep on working


message 6: by Michael (new)

Michael Economy (michaeleconomy) Yep.


back to top