UK Address & Postcode API: Lookup, Validation and Geocoding
Linda Koeleman, Customer Success Lead

UK Address & Postcode API: Lookup, Validation and Geocoding
Every wrong address costs money: a failed delivery, a support call, a re-send. The cheapest way to avoid those costs is to stop bad addresses from entering your system at all, and in the UK that starts with the postcode. A postcode API takes a postcode, or a fragment of an address, and hands back the full, structured address behind it.
This guide is the hub for everything we publish on UK address data. It covers what a postcode API does, what a good one returns, where UK address data comes from, and how lookup, validation, autocomplete and geocoding relate to each other.
What a UK postcode API does (and when you need one)
A postcode API is a web service. You send it a postcode, or a postcode plus a building number, and it returns the address: street, town, county and usually coordinates. Instead of asking a customer to type four or five fields correctly, you ask for two and fill in the rest.
You need one as soon as addresses enter your system and have to be right:
- Checkout and e-commerce: fewer abandoned baskets, fewer failed deliveries.
- CRM and customer data: clean records on the way in, rather than a cleanup project later.
- Logistics and field service: reliable addresses and coordinates for routing and service areas.
- Onboarding and account forms: faster entry, fewer typos, better completion rates.
The common thread is that you want the question "which address is this postcode" answered by software, not by the person filling in the form.
Postcode lookup: from postcode to full address
UK postcodes have two halves. The outward code (SW1A) identifies a postcode area and district; the inward code (1AA) narrows it to a small group of addresses, usually somewhere between one and a hundred delivery points. A postcode on its own therefore rarely identifies a single property, which is why a postcode lookup normally returns a list of addresses and asks the user to pick theirs.
That is the pattern almost every UK checkout uses: the customer types a postcode, presses "find address", and selects from a short list. Add a building number to the request and most APIs will narrow it to one result directly. If you want to know what each part of a postcode means, see how the UK postcode format works.
Address lookup and address search: the other direction
Postcode lookup is only half the job. An address lookup API works from any fragment: part of a street name, a building name, a company name, or a partial postcode. It is what powers a single search box instead of a postcode field plus a dropdown.
In practice, most teams end up using both. Search-as-you-type handles the messy start of the interaction, and a postcode lookup handles the customer who already knows their postcode and just wants to get on with it. If you want the search box to complete the address while the customer is still typing, that is a different technique again: autofill addresses as the user types.
What the API returns: fields, coordinates and UPRN
A minimal response gives you street, town and postcode. A useful one gives you more:
- Structured components: building number, building name, sub-building, thoroughfare, locality, town, county.
- Coordinates: latitude and longitude, or an easting and northing on the British National Grid.
- UPRN: the Unique Property Reference Number, a stable identifier for a specific addressable location in Great Britain. If you need to match your records against another system later, this is the field that makes it possible. UPRN and PAF in plain terms explains where it comes from.
- Delivery point data: whether the address is a residential or organisation delivery point.
Ask what precision the coordinates have before you rely on them. "Rooftop" accuracy points at the building; a postcode centroid points at the middle of a postcode unit, which can be a street away. Both are legitimate, but they are not interchangeable, and the difference matters once you start turning addresses into coordinates for routing or catchment analysis. If the vocabulary here is unfamiliar, start with what geocoding actually means.
Where UK address data comes from
This is the part that surprises people coming from other countries: there is no single free, authoritative, openly licensed UK address file.
- Royal Mail PAF (Postcode Address File) is the postal delivery database. Most commercial UK address APIs license it, which is why they charge.
- Ordnance Survey AddressBase, served through the OS Places API, is built on PAF plus local authority data and is where UPRNs come from. It is licensed rather than open, with a separate arrangement for the public sector. We look at how OS Places API compares in more detail.
- ONS Postcode Directory and OS Open Names are genuinely open, and free services such as postcodes.io are built on them. They give you postcode-level data (centroid, administrative area) but not the individual delivery addresses inside a postcode.
- OpenStreetMap is the open exception at address level. Contributors map individual buildings with their house numbers and postcodes, and the data is published under an open licence that lets you store and reuse it. Coverage is strong in towns and cities and thinner elsewhere, and there are no UPRNs.
So when a UK address API returns addresses, ask where they come from. If the answer is PAF or AddressBase, the list of addresses in each postcode is as complete as it gets, and the price reflects the licence. If the answer is open data, ask how complete the coverage is where your customers live.
Getting started: your first call in five minutes
Most address APIs work the same way: you send the address and your key, and you get the address back in structured fields.
The parameters, the fields that come back and a ready-to-copy example are in the developer documentation.
Two things are worth doing on day one. Call the API from your server rather than the browser if the key is billable, and decide up front what you store: the raw input, the corrected address, or both. Keeping both is the only way to debug a complaint six months later.
Free tiers, paid plans and rate limits
Nearly every provider offers a free key so you can build against the real API before committing. What separates the tiers is usually volume, guaranteed freshness of the underlying data, and whether you get an SLA. Check three things before you choose:
- How the free tier ends. A hard stop mid-checkout is a very different failure mode from a soft throttle.
- What counts as a request. Some providers bill the search-as-you-type suggestions; others bill only the final retrieve.
- Latency, not just uptime. An address API that adds 400 ms to a checkout costs you the conversions it was meant to save.
Where Pro6PP fits
Pro6PP is a European address API that covers England: postcode lookup, address suggestions as the customer types, validation and geocoding, through the same endpoints and the same response shape as the rest of our countries. Scotland, Wales and Northern Ireland are not covered at address level yet.
To be specific about the data: our English addresses come from OpenStreetMap, combined with postcode and administrative data rebuilt from official ONS sources. A response gives you the street, house number, building name, postcode, town, local authority district and coordinates. It does not include a UPRN or Royal Mail delivery-point data, so if either of those is a hard requirement, a PAF or AddressBase provider is the better fit.
The practical difference is the integration. If you sell into England and into mainland Europe, you integrate once rather than stitching a UK specialist together with a European one and reconciling two response formats. Alongside England we cover the Netherlands, Belgium, Germany, France, Italy, Luxembourg, Denmark, Austria, Switzerland and Spain, with reverse geocoding available globally. Getting the most out of it starts with understanding the difference between validation and verification, and, if you are integrating rather than evaluating, with how to validate an address in a single request.
Selling across borders changes the requirement again, because an address form built for one country rejects valid addresses from the next one. Addresses beyond the UK covers what breaks and how to handle it.
Frequently asked questions
Is there a free UK postcode API?
Yes, for postcode-level data. Services built on the ONS Postcode Directory give you the postcode, its coordinates and its administrative areas at no cost. A complete list of the delivery points inside each postcode comes from licensed data, PAF or AddressBase, so those APIs charge, though most have a free development tier. OpenStreetMap also carries individual addresses under an open licence, with coverage that varies by area.
How many addresses are in one UK postcode?
Usually between one and around a hundred. A large office building can have its own postcode; a residential street may share one across both sides. This is why postcode lookup returns a list rather than a single address.
What is a UPRN and do I need one?
The Unique Property Reference Number is a stable identifier for an addressable location in Great Britain. You need it if you have to reconcile addresses across systems, or match against public sector data. For a simple checkout, you do not.
Can I just use a regular expression to check UK postcodes?
A regular expression tells you whether something is shaped like a postcode. It cannot tell you whether that postcode exists, or whether it matches the street the customer typed. Use it as a cheap first filter, not as validation.
Does Pro6PP cover the United Kingdom?
We cover England today. Postcode lookup, address suggestions, validation and geocoding are available for English addresses, on the same endpoints as our other countries. Scotland, Wales and Northern Ireland are not covered at address level yet. Beyond the UK we cover the Netherlands, Belgium, Germany, France, Italy, Luxembourg, Denmark, Austria, Switzerland and Spain, with reverse geocoding available globally.
Next steps
Start small. Put a lookup on one form, measure the change in completion rate and in failed deliveries, and expand from there.
