I have been googling this for hours and I have not found a solution. When I call:
"https://maps.googleapis.com/maps/api/place/autocomplete/json?input="+WebUtility.UrlEncode(MYADDRESSSPEC)+"&key="+MYAPIKEY;
I get things like:
123 Main St, Somewhere, Ohio United States
123 Main St, Somewhere Else, Indiana, United States
I've looked at the optional arguments and I cannot find one for ZIP/postal code. I noticed the textsearch API does return ZIP codes. I could run it through autocomplete as someone is typing the address and THEN run each result through the textsearch API but I want to accomplish this in just ONE web service call. Does anyone know how? Thanks in advance!
I don't think the autocomplete API supports returning postcodes in the predictions array. Your best bet (albeit cumbersome) is to do the autocomplete query and run a details query for each of the place_id entries returned.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With