0

According to the google book API documentation, the startIndex can be specified in URL for the start index of the collection(volumes). However, every time I perform the same query with different startIndex, the totalItems from the returned object defers. Not only that, there are always as many as 40 results in the returned object even though the startIndex has already exceeded Math.ceil(data.totalItems / 40(RESULTS_PER_PAGE). Is there anything I am missing for volumes search?

https://www.googleapis.com/books/v1/volumes?q=love+intitle:love&startIndex=0&maxResults=40
John Huang
  • 308
  • 1
  • 3
  • 11
  • 1
    `totalItems` appears to correlate to the total number of `startIndex`es (pagination results). As far as why the `totalItems` changes when requesting a different `startIndex`: that I cannot answer: you'd have to ask a knowledgeable Google engineer why the value changes (it shouldn't). In my testing, the value becomes more accurate as you approach the final `startIndex`. – jsejcksn May 30 '22 at 07:39
  • 1
    [check this question](https://stackoverflow.com/questions/68603938/django-google-books-api-totalitems-is-changing) it seems related to your question. – Khobizi Ilyes May 30 '22 at 07:46
  • Ok I figured it out already. Thanks – John Huang May 31 '22 at 04:12

0 Answers0