Get the data you want simply by constructing your URLs as follows:

Return data for a postcode

http://uk-postcodes.com/postcode/[postcode (no space)].['xml', 'csv', 'json'* or 'rdf']

Return data for the nearest postcode to a point

http://uk-postcodes.com/latlng/[latitude],[longitude].['xml', 'csv', 'json'* or 'rdf']

Return data for postcodes within x distance (miles) of a postcode or lat/lng

http://uk-postcodes.com/postcode/nearest?postcode=[postcode]&miles=[distance in miles]&format=[xml|csv|json]
http://uk-postcodes.com/postcode/nearest?lat=[latitude]&lng=[longitude]&miles=[distance in miles (up to a maximum of 5 miles)]&format=[xml|csv|json]

That's it! Be nice to the server and cache your requests!

* If using JSON, add '?callback=[some function call]' to the url to return JSONP

Helper Libraries

To make things even easier, a bunch of people have built helper libraries to make the process easier. Built one yourself? Drop me a line via Twitter.