Search code examples
web-servicesgoogle-places-api

Google Auto Place Api - How to use multiple countries for auto address


I have seen in documentation that only 5 countries maximum allowed for auto address completion webservice. Can you kindly provide any option for multiple countries auto address search.

If any other google service can be use for this requirement, Let me know.

5 countries only allowed reference

enter image description here


Solution

  • Use Multiple Requests for more than 5 countries

    There's currently an open Feature Request in the Public Issue Tracker that asks for more than 5 countries. Please see the issue link here: https://issuetracker.google.com/issues/74602145

    You can star the feature request to get updates and leave comments for additional information. As that could help provide valuable feedback on the importance of the feature.

    With that said, initially there was no feature for the Autocomplete that would restrict the query to multiple countries. But because of that, a Feature Request (ref: https://issuetracker.google.com/issues/35821685) was made about adding this functionality and it was then implemented later on, but with the limitation of only 5 countries.

    The reason for this is to "keep the latency in check". (Mentioned in: https://issuetracker.google.com/issues/35821685#comment236)

    As a current workaround mentioned in (https://issuetracker.google.com/issues/35821685#comment235), you can simply use multiple requests for more than 5 countries.

    NOTE: More restricts means more expensive queries, so you should be aware of this.