Closed losredoe132 closed 2 years ago
So i found out, that there is an upper limit for using the next_page endpoint. "This role is not present if the current results are the last page. Note: This API returns up to the first 100 results only." (https://developers.google.com/custom-search/v1/using_rest)
"Note: The JSON API will never return more than 100 results, even if more than 100 documents match the query, so setting the sum of start + num to a number greater than 100 will produce an error. Also note that the maximum value for num is 10." (https://developers.google.com/custom-search/v1/reference/rest/v1/cse/list)
Does anybody know a way to get more image than 100 images to a query?
Hi,
The lib knows about that and queries 10 by 10 images, with offset each time, to get to the desired number. You can see in your error message that some of the params in the api query is num=1&start=212 - fetch one image with offset of 212.
So I guess it's not about the number of images.
Do you recognise any other patterns within this issue?
Looks like this is the issue: https://github.com/arrrlo/Google-Images-Search/issues/141
Hi, thank you very much for your implementation. Everything (expacially next_page) works fine for ~150 images but than a
<HttpError 400 when requesting https://customsearch.googleapis.com/customsearch/v1?cx=3fbe767c4e8c26f73&q=industrial+robots&searchType=image&num=1&start=212&safe=off&key=AIzaSyAM2Z62TrFvrhAs0I_y5vV0urzX6o78IR4&alt=json returned "Request contains an invalid argument.". Details: "Request contains an invalid argument.">
occurs.Did anybody observed a similiar behaviour? Below is my code:
That does not work either: