问题
I am using google map api to get address information by Postal code around the world [ not specific country].
https://maps.googleapis.com/maps/api/geocode/json?address=610&key=[apiKey]
I expected zip code is 610, but google response result for street number 610.
Is there any ways to get address by zip code only?
Thank you guys in advance for supporting.
回答1:
How about something along with this query
https://maps.googleapis.com/maps/api/geocode/json?components=postal_code:1441|country:PH&key=YOUR_API_KEY
This will get you the address kind of this format http://prntscr.com/ouwlq5
Key note here is the country. You need both of the postal_code and the country to make this work. Without country you'll get zero results.
来源:https://stackoverflow.com/questions/57566230/google-map-api-get-address-information-by-postal-code-but-it-response-result-by