[Google Local API] No results for valid search
One of our high-volume customers reported the issue with Google Local. For some searches, they are not getting any results, and no HTML is rendered at all.
This looks to be related to other issue fixed with https://github.com/serpapi/SerpApi/pull/5536. @dsojevic can you take a look and see if it's the same issue?
Related Public Roadmap issue: https://github.com/serpapi/public-roadmap/issues/2147
Internal links: Intercom | Search Inspect 1 | Search Inspect 2
@marm123, I've just digging into this and have been unable to reproduce it.
It appears as though the example searches were from prior to https://github.com/serpapi/SerpApi/pull/5536 being rolled out so all searches on Google Local from ~2024-11-20 onwards should not be exhibiting any issues.
Going to mark this as completed and close it.
I'm re-opening this issue as the customer who reported this provided some recent examples:
I'm re-opening this issue as the customer who reported this provided some recent examples:
Thanks @schaferyan. I'm going to have to investigate further; unfortunately these new searches are affected by something unrelated to the issue that caused the original searches to fail/return empty.
@schaferyan @marm123, I've spent a fair bit of time digging into this and have been unable to find anything that would indicate this type of response back from the Google search might be something we can address on our side (i.e. Google is returning a "successful" response and they are indicating that they have no results for the query)
I've done large batches of testing with various parameters/setups to see if it perhaps prevalent with any particular combination and haven't encountered any issues in ~1,500 searches worth of testing.
I ran a final batch of testing with the same parameters seen in Inspect 3 and came out with the following results which had results returned in 100% of requests:
| Category | Number of Requests | Average Reported Time | Average Result Count |
|---|---|---|---|
| Overall | 200 | 2.1658 | 20.0 |
| Valid Requests | 200 | 2.1658 | 20.0 |
| Invalid Requests | 0 | - | - |
| Failed Requests | 0 | - | - |
When a user is performing searches with queries that they are confident should be returning results, the path forward might be for them to do one (or more, with a limit) retries when they encounter an empty result set.
I'm not sure there's much else we can do at this time until we're able to reproduce the issue on demand.
It might also be worth considering the implications of us passing along informational notices in the error key in our responses as I can see it being somewhat confusing. For example, here is a search for a UUID that you would expect to have no results returned:
Thanks, @dsojevic! I let the customer know.
It might also be worth considering the implications of us passing along informational notices in the error key in our responses as I can see it being somewhat confusing.
Do you mean this information should be included in a different key than error? I can confirm that this confuses customers. It's not really an error if the search engine itself returns empty results.
Do you mean this information should be included in a different key than
error? I can confirm that this confuses customers. It's not really an error if the search engine itself returns empty results.
Correct, @schaferyan! Perhaps in this case it can even be fully omitted because the same information is also conveyed under search_information.local_results_state with "Fully empty"?
@dsojevic I think the goal of this message is to clarify that is the search engine itself that didn't return any results, not an issue on our side. Whereas search_information.local_results_state: "Fully empty" leaves more ambiguity whether it's a failure on our side or Google's.
I agree though that providing it in error is counter to that purpose.
Maybe we should open a separate internal issue to discuss this?
Another customer reported this. I was able to replicate it with ~10 retries. They believe it may be related to omitting the country from the location parameter, but I was able to replicate the issue regardless of whether that is included.
Another customer reported this. In this case the HTML was loaded but empty results. Customer performed the exact same search after and received results.
Intercom Inspect - Successful Search | Inspect - Empty results
Customer report: Intercom
Report: Intercom
Another report: Intercom
HTML is returned, but JSON shows:
"search_information":
{
"local_results_state":
"Fully empty"
},
"error":
"Google Local hasn't returned any results for this query."