Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Google Hotels API] Searches return empty results even thought results are available via regular search #2101

Open
schaferyan opened this issue Nov 6, 2024 · 5 comments
Assignees
Labels
status: triage Review and triage needed type: bug Something is broken

Comments

@schaferyan
Copy link

An Enterprise Customer reported that some of their Google Hotels API searches return an empty response, even though they should have results.

Screenshot 2024-11-06 at 9 56 11 AM

The customer shared an example, and I've asked for more examples if possible. I was unable to replicate it in the Playground, despite numerous retries.

Public links: Playground

Internal links: Front | Search Inspect

@schaferyan schaferyan added type: bug Something is broken status: triage Review and triage needed labels Nov 6, 2024
@marm123 marm123 changed the title [Example Search API] (omit if not an API) Short summary of the bug [Google Hotels API] Searches return empty results even thought results are available via regular search Nov 6, 2024
@schaferyan
Copy link
Author

The enterprise customer who reported this followed up with some more examples:

Front

@sanj-directbooker
Copy link

What's the endpoint that the Hotels request is running against? I'd like to know if it is different than the one being used for Maps.

@sanj-directbooker
Copy link

I have an idea of what might be happening.

The autocomplete mechanism that Google uses defaults to returning a full (over-qualified) name for what the user enters.

You need to explicitly specify that you want the "name" field: https://developers.google.com/maps/documentation/javascript/reference/places-service#PlaceResult.name

This is the field that the Google Hotels input field expects.

As an example, Google Hotels fails on the fully qualified name for the Berlin hotel (Dorint Kurfürstendamm Berlin, Augsburger Straße, Berlin-Charlottenburg-Wilmersdorf, Germany) but succeeds on the shorter name (Dorint Kurfürstendamm Berlin). This is the name shown as part of the hotel's display in Google: https://www.google.com/travel/search?q=Dorint%20Kurf%C3%BCrstendamm%20Berlin&qs=CAAgACgA&ved=0CAAQ5JsGahgKEwiA29H71OuJAxUAAAAAHQAAAAAQmwI&ts=CAEqBwoFOgNVU0Q&ap=KigKEgnuQR5ZFEBKQBGp-gzjIKkqQBISCbeKF8-eQEpAEan6DCPBqipAMAA

The same thing happens with my other example: the fully overqualified name fails on Google Hotels (H10 Port Vell, Pas de Sota Muralla, Barcelona, Spain), but the short name works (H10 Port Vell).

NOTE: This is an issue for individual hotel names not for cities. For individual hotels, Google Hotels expects the user to select an entry from the list of autocomplete elements, not simply hit return.

@sanj-directbooker
Copy link

tl;dr: Google Hotels is expecting a selection from its autocomplete set whereas you're given it a search term. This works for cities, but not for individual hotels.

@schaferyan
Copy link
Author

Thanks for the additional information @sanj-directbooker! I've opened an issue to support scraping Google Hotels Autocomplete suggestions. This could include support for extracting an ID from each autocomplete suggestion, then using that to query the Google Hotels API.

You can find that issue here:

#2159

@tanys123 tanys123 self-assigned this Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: triage Review and triage needed type: bug Something is broken
Projects
None yet
Development

No branches or pull requests

3 participants