UK Postcodes is a webservice for postcodes in Great Britain and Northern Ireland. As well as geographical information, it also returns information about council areas and constituencies.
Currently, there are no limitations on usage, but I may introduce rate limiting in future.
LicensingGreat Britain postcode data may be used under the terms of the OS OpenData licence. Northern Ireland postcode data may be used under the terms of the ONSPD licence
If you want to host your own version of UK Postcodes, then you can clone the source on Github. There's a rake task that downloads the necessary data and sets everything up. See the README for more information.