Google Maps API Geocode Postal Code and set Country code?

The documentation says that Region Biasing is based on CcTLDs, which would make Australia au (haven't tried it myself).

Although it also states this:

Note that biasing only prefers results for a specific domain; if more relevant results exist outside of this domain, they may be included.


The correct way to do this is not via region biasing but rather using component filtering:

https://maps.google.com/maps/api/geocode/json
    ?components=country:AU|postal_code:2340
    &sensor=false

Some demonstrations:

  • 2340
  • 93274

Please note that if you use the components parameter, you don't need to specify the address parameter.