serpapi / public-roadmap

Public Roadmap for SerpApi, LLC (https://serpapi.com)
53 stars 5 forks source link

[Google Maps API] Scrape order online options link for place result #2033

Closed alexbarron closed 4 days ago

alexbarron commented 1 week ago

We scrape the order online link for Google Maps search local_results (related: https://github.com/serpapi/public-roadmap/issues/897), but not when the results are a single business as place_results.

Actual Google Maps:

image

Our result:

image

Public links: Playground 1 | Google Maps

Internal links: Intercom | Inspect

btaunt commented 6 days ago

I'm not sure I am able to replicate this (unless I am misunderstanding). The Playground example provided has the order_online_link under place_results:

"order_online_link": "https://food.google.com/chooseprovider?restaurantId=/g/1hc7n5gff&g2lbs=AOHF13kZ0YbwZ4iaezQQyGL2CfMOcfRBrnUTCICrDQmN0Bg0ILkW7YygChy0_1fTpLT7ybPrFEIuE6oTKsVN9kujNqYkTrL5eQ%3D%3D&hl=en-US&gl=us&fo_m=MfohQo559jFvMUOzJVpjPL1YMfZ3bInYwBDuMfaXTPp5KXh-&utm_source=tactile&gei=e-oPZ4b7L-WMwbkP4_OhqAQ&ei=e-oPZ4b7L-WMwbkP4_OhqAQ&fo_s=OA,SOE&opi=79508299&foub=mcpp",

JSON Endpoint

cc. @alexbarron

alexbarron commented 5 days ago

I'm not sure I am able to replicate this (unless I am misunderstanding). The Playground example provided has the order_online_link under place_results:

"order_online_link": "https://food.google.com/chooseprovider?restaurantId=/g/1hc7n5gff&g2lbs=AOHF13kZ0YbwZ4iaezQQyGL2CfMOcfRBrnUTCICrDQmN0Bg0ILkW7YygChy0_1fTpLT7ybPrFEIuE6oTKsVN9kujNqYkTrL5eQ%3D%3D&hl=en-US&gl=us&fo_m=MfohQo559jFvMUOzJVpjPL1YMfZ3bInYwBDuMfaXTPp5KXh-&utm_source=tactile&gei=e-oPZ4b7L-WMwbkP4_OhqAQ&ei=e-oPZ4b7L-WMwbkP4_OhqAQ&fo_s=OA,SOE&opi=79508299&foub=mcpp",

JSON Endpoint

cc. @alexbarron

@btaunt Thanks for looking into this. I also can't reproduce it anymore.

Here's the inspect link for the search where I encountered the issue: https://serpapi.com/searches/670e4d1281bab78cc8c357ee/inspect

Anything jump out there as being different than our more recent attempts?

btaunt commented 5 days ago

@alexbarron

Anything jump out there as being different than our more recent attempts?

It seems as though the entire order_online "button" (along with its parent element) were never present in that initial inspect link example. My assumption would be that Google simply didn't render it, but maybe we should keep an eye out in the future (layout updates, separate requests needed?)

alexbarron commented 4 days ago

@btaunt Yeah perhaps it was just a blip. I'll close this for now, but we'll reopen it if we come across the issue again. Thank you for your investigation.

No need to follow up with customers since this only came up while I was investigating a customer's request for the Google Food link contents the Order Online button takes you to.