serpapi / public-roadmap

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

[Google Search API] Support `answer_box` on mobile in specific queries `organic_results` #1601

Closed vax-sa closed 1 month ago

vax-sa commented 1 month ago

Bug repro steps and comparison of mobile vs. desktop:

Bug: Notice that answer_box is not provided when using "mobile" as the device.

marm123 commented 1 month ago

Hi @vax-sa, thank you for opening an issue! Using your example, I've been able to get the answer_box for the mobile search in Google Search API. Please take a look below:

Playground

image

Please note that not all results return answer_box in the response, and you'll likely need to play with parameters, such as location or localization, to get the same results you see in your regular mobile search.

Feel free to reach out to contact@serpapi.com if you have any further questions. We'll be happy to assist.

vax-sa commented 1 month ago

Interesting. I see. As you pointed out, when a location is not provided, the results look very different. When I provide a location like Austin, Texas, United States, then it looks more like what you presented.

However, the results also then take significantly longer to arrive (2 seconds instead of 0.7 seconds) so I do not want or need to provide a location for a query that is not location dependent. See: https://serpapi.com/playground?q=Michael+Jackson+birth+place&gl=us&hl=en&device=mobile

So I believe this is still an issue. I can understand it might not be one you want the team to spend time on, but it is hampering the ability to use it reliably where the browser does not provide a location. I also say this because many google search queries take a longer time to get back when a location is provided and we want to get results with the lowest possible latency. image

Here are the different times it takes to get the results without and with the location which is why I do not want to provide a location: image

vax-sa commented 1 month ago

Just responded to the issue that was closed: https://github.com/serpapi/public-roadmap/issues/1601

On Sun, May 12, 2024 at 11:53 PM Bartek Marmołowski < @.***> wrote:

Hi @vax-sa https://github.com/vax-sa, thank you for opening an issue! Using your example, I've been able to get the answer_box for the mobile search in Google Search API. Please take a look below:

Playground https://serpapi.com/playground?q=Michael+Jackson+birth+place&location=Austin%2C+Texas%2C+United+States&gl=us&hl=en&device=mobile image.png (view on web) https://github.com/serpapi/public-roadmap/assets/28161162/329b1e99-2bf6-4a2c-9f55-12a50664476e

Please note that not all results return answer_box in the response, and you'll likely need to play with parameters, such as location or localization, to get the same results you see in your regular mobile search.

Feel free to reach out to @.*** if you have any further questions. We'll be happy to assist.

— Reply to this email directly, view it on GitHub https://github.com/serpapi/public-roadmap/issues/1601#issuecomment-2106784437, or unsubscribe https://github.com/notifications/unsubscribe-auth/BA3ROJBL5K5IGHCXSTZ7B3LZCBPNRAVCNFSM6AAAAABHPUIAQ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBWG44DINBTG4 . You are receiving this because you were mentioned.Message ID: @.***>

marm123 commented 1 month ago

Hi @vax-sa, yes, you are correct. The answer_box should also be available for the search you shared, as visible on the HTML. I'm sorry for not noticing it earlier. I'm opening this thread and labeling it for our team to look into it.

aciddjus commented 1 month ago

This issue has been fixed.

We are now properly extracting the answer_box.

image

Playground