We are using Google Custom Search and we have found that often the total results iterates between two values, even for the same query. The different values can be slightly different or more than double.
The parameters I am using look like this:
https://www.googleapis.com/customsearch/v1? q=something cx=XXXXXXXXXX lr=lang_en siteSearch=www.mydomain.com start=1 fields=context%2Citems%28fileFormat%2CformattedUrl%2Clink%2Cpagemap%2Csnippet%2Ctitle%29%2Cqueries%2CsearchInformation%28searchTime%2CtotalResults%29%2Cspelling%2FcorrectedQuery key=YYYYYYYYYYYYYYY filter=0
This is problem because of calculating the number of result pages. How can I get the same results for the same query?