

Ask HN: What to use for world zip codes? - goldham

I'm developing a website and need postal codes for as many countries as possible. All I need is City, State, and zip/postal code. I found zipcodeworld.com but, they're products are a lot more than I need. Wondering if anyone knows of a low cost solution?
======
rmc
Address formats are different all over the world. Lots of places call them
"postcodes" not zip codes (e.g. the UK). Some places have no postcodes (e.g.
Ireland). Lots of places don't have 'states'. And the US has lots of 'cities'
whereas lots of places would have local towns or counties.

You usually need addresses to send someone something. I'd suggest just putting
in a text field and letting the user just type it in freeform.

~~~
pierrefar
And you can check that the address is sane using a geocoder. Both Google Maps
and Yahoo! Maps have freely-accessible APIs for that.

~~~
cianestro
I asked the same question several weeks ago. Google's reverse geocoding api is
a great solution. Instead of inserting hundreds of thousands of records into a
database and juggling different tedious validation techniques it's a much
better idea to only use latitudes and longitudes for locating people
geographically. However, the project's details may require other routes but
still thought I would share:

[http://code.google.com/apis/maps/documentation/examples/geoc...](http://code.google.com/apis/maps/documentation/examples/geocoding-
reverse.html)

Users just click on their location on the map and Google hands off the nearest
address info.

------
leftnode
Also, keep in mind, don't make the Zip Code required. Some countries (Ireland
being the most prominent) don't have them.

~~~
henrikschroder
Also, don't make state required, most countries don't have them.

~~~
moe
Generally don't make too many assumptions about the address format if you're
dealing with international customers.

Many of the address forms on US-sites are a bit challenging to europeans
because even after selecting "Other" in the State-dropdown we're still left
with a bunch of input fields that don't quite fit our local address format.

Most people (including myself) are probably used to that by now and just
duplicate stuff as needed (City/State) and leave others blank. But I wonder
what the bounce rate amongst less savvy users is for these forms.

------
po
What language are you using? I don't know of a datasource for it but I'm
familiar with the Django project's localflavor contrib app:

[http://docs.djangoproject.com/en/dev/ref/contrib/localflavor...](http://docs.djangoproject.com/en/dev/ref/contrib/localflavor/)

You can also try searching through programmable web:

<http://www.programmableweb.com/apis/directory>

------
yarone
The best resource that I know of is addressdoctor.com.

See their demo here:
<http://www.addressdoctor.com/lookup/default.aspx?lang=en>

Via a web service, they enable you to produce the right address form fields on
a country-by-country basis. I've met with their CEO in person and kicked the
tires and would highly recommend them.

------
niklas
Here's a few <http://www.geonames.org/postal-codes/>

~~~
sigil
Geonames is great. It doesn't get any freer than this (in both senses of the
word).

------
lsc
I use what came with freeside, my billing system.
<http://www.freeside.biz/freeside/> but it's not complete, so a better
solution, if someone has one, would be great.

------
paulgerhardt
<http://en.wikipedia.org/wiki/List_of_postal_codes>

------
henrikschroder
What do you need the postal codes for? How are you going to use them?

