The totalItems retrieved is infact, openSearch:totalResults
. According to openSearch specification,
The "totalResults" element
The number of search results available for the current search.
If the totalResults element does not appear on the page then the
search client should consider the current page to be the last page of
search results.
Restrictions: The value must be a non-negative integer. Default: The
default value is equal to the offset index of the last search result
on the current page. Requirements: The element may appear zero or one
time.
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
The tag identifies the number of items in
the result set for the feed. Please note that the tag value is an
approximation and may not represent an exact value. In addition, the
maximum value for this tag is 1,000,000. You should not use this value
to create pagination links.
Did you need totalItems
for pagination?