I was talking to Phil (the creator of a while ago, and suggesting that he should look at using geolocation on his site to work out where you are and thus find cars near you.

Once you have the lat lon, I said, it shouldn’t be too hard to get the UK postcode for that location, and then pre-fill the user’s location in. Well, as it turns out there are a few services that will give you the lat lon for a given postcode, but none that will take a lat lon and try to guess your nearest postcode for you. Well, none that I could find anyway (for free).

So, that was my excuse for writing a simple app in node.js to do this for you :) The idea behind it is a simple API that you can pass a lat,lon, and you get back a postcode. The postcodes are all available fromĀ, albeit without Northern Ireland and a few other places.

I’m not far from finishing this, so I’ll post about it when I get it done. I’m going to be using Node.JS and MongoDb to store the postcodes and associated lat/lon.


  1. mr-dev posted this