[Playground] Change Default Selector in Export Code for Google Sheets
Customers typically try to copy and paste the Google Sheets formula from Export to Code into their Google Sheets and expect it to work as is. Currently the default selector is always "suggestions.0.value" which leads to an error for most engines.
While the customer would still need to learn about how to modify the selector to get the data points they are interested in, at a minimum we can provide a different selector depending on which engine is used.
Potentially we could also have this change based on which element or key the user has clicked in the iFrame or JSON. However this might require more work.
This continues to be a source of confusion for Google Sheets users.
A user recently opened a Public Roadmap issue due to this:
https://github.com/serpapi/public-roadmap/issues/1335
As part of #1406 I changed this to organic_results.0.title, on the basis that it's more likely to work on typical engines.
Just to clarify, it currently shows organic_results.0.title for all engines, including Google News.
I mentioned this since a customer confused about this. Intercom
I had a user run into some confusion with this, as well working with the Google Maps API
=SERPAPI_RESULT("engine=google_maps&type=search&google_domain=google.com&q=Coffee&ll=" & ENCODEURL("@40.7455096,-74.0083012,14z") & "&hl=en", "organic_results.0.title")
organic_results.0.title instead of local_results.0.title
Thank you for your work on that @zyc9012! It seems that doesn't work consistently:
Not sure if I'm missing something.
@marm123 Thanks for double-checking! I think it's due to Cloudflare caching. Looking into it.
Purged the cache and it should work now.
Thank you @zyc9012! Seems there is still an issue:
It works when not logged in/incognito:
Is this expected, or perhaps there is something me and our users need to do beforehand (e.g., clear browser cache)?
@marm123 yeah I guess it's browser cache, could you try clearing the cache and see if it fixes the issue?
Looks to be working well now, thanks @zyc9012!