How do I match street addresses to UK postcodes?

Viewed 25107

U.K. sites that require addresses often ask the user to provide a postcode. The site then offers the user a choice between the different addresses that match that postcode.

How can I match a postcode to a street address?

12 Answers

I believe you need the Royal Mail Postcode Address File. From that link:

PAF is the only complete source of all known UK Postcodes.

Services do exist to handle requests for this info, such that it may be cheaper to use such services for small numbers of requests (obviously you have issues as and when such services aren't available for whatever reasons).

Contrary to the answers here, you do NOT need the very expensive PAF from the Post Office. There are a number of commercial services (presumably powered by the PAF) that return the streets and street numbers for a specified post code. They generally charged on a per-request basis. I do not have any experience with a particular vendor, but this is an example - capscan

To do this you need access to the Postcode Address File - this is something that is licensed for use on an annual basis from the post-office, usually via a third party.

You have a choice depending on your needs of buying a package to use locally or of using web services.

The Royal Mail's page is here: http://www.royalmail.com/portal/rm/jump2?mediaId=400085&catId=400084 and on that page are links to service providers.

You can either use the PAF or one of the commercial web services (there are a few) which licence the PAF. I think you usually buy "credits" or pay a flat rate for unlimited access.

To add to the answers already coming through:

In the paid for products typically you pay for either:

  • premise level - more detailed and can offer the user a list of premises at that postcode location

  • street level - simply matches the street at that postcode location - you or your user fills in "the first line of the address" usually house name or number

I believe this differentiation is built into the licencing by the Royal Mail at source. Premise level is substantially more expensive

If you're adding it into a website shopping cart or similar system, you can buy access to the data on a per-click basis. If you're using it for an internal system such as CRM, you need to buy a per-user license.

Either way, you can use the Data8 Postcode Lookup API via web services.

Related