Postcode API
A couple of weeks ago I quickly coded a basic webservice – using Merb – for Australian Postcode data. Just got hosting for it sorted out last night, so now I can blog about it.
Postie
The emphasis is on simple – you can search by postcode or suburb, and get the data back either as a HTML page, XML, or JSON. That’s pretty much it. The request urls aren’t complicated, either:
- auspostie.com/Brunswick
- auspostie.com/Brunswick.js
- auspostie.com/Brunswick.xml
- auspostie.com/2782
- auspostie.com/2782.js
- auspostie.com/2782.xml
Suburb requests use partial matching, so you don’t need the full suburb name. If you want the JSON returned with the MIME type of application/json, use the .json extension.
I’ve no plans at this point on using this, but perhaps it’s useful for someone out there – if so, would love to hear about it.
Comments
5 responses to this article
Ooh tastie indeed.
A cmd-line wrapper for the API would be like a tastie toasted sandwich.
Hey Pat,
This looks like a great tool indeed! Would you happen to know of any similar API’s/Plug-in’s for U.S. Postal Codes?
Heya Marston
It looks like the USPS has a couple of APIs that do the job – there’s “documentation on their site”http://www.usps.com/webtools/technical.htm
Not quite as simple as mine… but if you find a csv or similar of all the US zip codes and matching cities and states, I could look at building an equivalent service for it.

Subscribe to the RSS feed