-
Notifications
You must be signed in to change notification settings - Fork 6
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
Comments
The enterprise customer who reported this followed up with some more examples: |
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. |
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. |
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. |
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: |
An Enterprise Customer reported that some of their Google Hotels API searches return an empty response, even though they should have results.
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
The text was updated successfully, but these errors were encountered: