I have a program in JAVA that sends an HTTP GET message to Google Books API.
I want to get books that answer the search criteria "cooking".
The max number of items in a response is 40 and this is the number I set in the GET message.
https://www.googleapis.com/books/v1/volumes?q=cooking&projection=full&startIndex=0&maxResults=40&key=/*My Key*/
In the response I get, the value of "totalItem" is about 450.
This looks very wrong because searching in google books GUI or "cooking" yields 5.8 million results.
Any one knows why is it like this?
Second issue:
The first request I send asks for results in index 0-39, after that 40-79… up to a 1000.
1000 is the daily limit of the curtesy queries of this API.
For some reason each time I get the JSON file, the "totalItem" value is different! always arround 450,
but I see no consistency in there.
Anyone knows something about that?
The totalItems retrieved is infact,
openSearch:totalResults. According to openSearch specification,This is not working for this API though, and if you decrease the maxResults to 1, your totalItems will soar to 590s. Nothing in the google documentation says anything about that explicitly. The closest one I got was at the youtube API documentation
Did you need
totalItemsfor pagination?