[Google Images API] Searches with `ijn` sometimes have long response times
Google Images searches with ijn are sometimes taking more than 15 seconds to respond.
With a very small sample size of tests in the Playground, it appears about 3/10 searches with ijn have response times longer than 10 seconds. This includes using ijn=1. Whereas, searches without ijn seem to have normal response times.
Public links: Playground 1 | Playground 2
Internal links: Intercom | Search Inspect 1 | Search Inspect 2 | Search Inspect 3 | Search Inspect 4
I have done some preliminary analysis with ab testing.
From my tests the parameter ijn do not influence the response time:
Taking for example ijn=4 (endpoint: /search.json?engine=google_images&q=Coffee&gl=us&hl=en&ijn=4&device=desktop&no_cache=true) with sample size of 100 gives me this connection times (in ms):
which are quite reasonable and do not seems to have abnormal values.
Doing the same experiment with no ijn (endpoint: /search.json?engine=google_images&q=Coffee&gl=us&hl=en&device=desktop&no_cache=true) gives me the following connection times:
which are comparable with the one using the ijn parameter.
I have done also some tries directly in the playground with similar results (trying also different ijn).
It could have possibly been some temporary problem. @schaferyan can you please retry testing it?
Working with @schaferyan on this, it seems that the issue is resolved and no one else has reported it.
Putting this issue on freezer.
A customer reported that searches are currently failing when using the ijn parameter. I can confirm this on the playground.
cc @vedovati-matteo
A user reported this. And a report on using Google Search API with tbm=isch https://github.com/serpapi/public-roadmap/issues/2728
While waiting for the fix, feel free to try our new API: Google Images Light API
Doc: https://serpapi.com/google-images-light-api
Example: https://serpapi.com/playground?engine=google_images_light
For this API, we can use the start parameter to paginate the results. You can increase the start parameter by 20 for each page. I hope it helps.
A customer reported this issue and mentioned that the searches with ijn parameter essentially aren't successful many times. I noticed a couple searches returning "We couldn't get valid results for this search. Please try again later." - but work when retried. Playground | Search Inspect
Thank you for fixing this issue @vedovati-matteo !