Geocoding and Reverse Geocoding API: Addresses, Postcodes and Coordinates
Eduard Ciociu, Full-Stack Developer

Geocoding and Reverse Geocoding API: Addresses, Postcodes and Coordinates
Addresses are how people describe locations. Coordinates are how software does. A geocoding API is the translation layer between the two, and once you have it, a whole class of features becomes possible: showing an order on a map, routing a van, deciding whether a customer falls inside a delivery zone, or grouping sales by area.
This article covers both directions of that translation and the accuracy question that decides whether the result is actually usable.
Geocoding: address to coordinates
Forward geocoding takes an address, or part of one, and returns a latitude and longitude. The interesting part is not the conversion; it is the matching. The geocoder has to work out which real place the text you sent refers to, and text is ambiguous. There are dozens of High Streets, several Newports, and plenty of house numbers that do not exist on the street they were typed with.
A good geocoder therefore returns more than a point. It tells you what it matched, at what precision, and how confident it is. Ignore those fields and you will eventually put a customer in the wrong county without noticing.
Reverse geocoding: coordinates to address
Reverse geocoding is the opposite: you have a latitude and longitude, from a mobile device, a vehicle tracker or a map click, and you want the address at that point.
The typical uses are a driver app confirming which building a courier is standing at, a service form pre-filled from the user's current location, and turning a stream of GPS points into something a human can read in a report.
Reverse geocoding has an inherent ambiguity that forward geocoding does not: a point in the middle of a road is near several addresses and inside none of them. Expect a nearest-match with a distance, and design around the possibility that it is the building opposite.
Geocoding from a UK postcode
In the UK there is a shortcut that is often good enough and much cheaper: geocode the postcode rather than the address.
Postcode-level coordinates are available as open data through the ONS Postcode Directory, and give you the centroid of the postcode unit. For catchment analysis, territory planning, store locators and heat maps, that is entirely adequate: postcode units are small.
It is not adequate for anything that has to arrive at a specific door. For that you need an address-level geocode. The authoritative source is Ordnance Survey AddressBase, which is licensed and is where the UPRN lives. OpenStreetMap also carries address points under an open licence, with coverage that varies by area.
How accurate is a geocode? Rooftop, street and centroid
Providers use different words for the same three ideas, and the difference between them can be a hundred metres or more:
- Rooftop or premise: the point is on the building. This is what you need for delivery and for anything measured in metres.
- Street or interpolated: the point is estimated along the street based on the house-number range. Usually within a few doors, occasionally on the wrong side of the road.
- Centroid: the point is the middle of a postcode, locality or administrative area. Precise enough for aggregation, useless for navigation.
Always read the precision field and decide what your feature needs before you decide what to buy. Paying for rooftop accuracy to draw a sales heat map is waste; using a centroid to route a courier is a failed delivery.
Free geocoding APIs and where they stop being free
Free geocoding falls into three categories, each with a real constraint:
- Open-data services, built on OpenStreetMap or national open datasets. Genuinely free, coverage and precision vary by area, and the usage policy usually forbids heavy automated use without running your own instance.
- Free tiers of commercial APIs. Generous enough for development, and they stop or throttle at a threshold that arrives faster than you expect once you are in production.
- Free with strings. Some map platforms allow geocoding only if the result is displayed on their map, and forbid storing the coordinates. That clause is easy to miss and expensive to breach.
If you plan to store geocodes, check the licence for a caching or retention limit before you build a pipeline that depends on storing them.
Where Pro6PP fits
Pro6PP returns coordinates with address lookups for England, the Netherlands, Belgium, Germany, France, Italy, Luxembourg, Denmark, Austria, Switzerland and Spain, and offers reverse geocoding globally. For England that includes geocoding from a postcode as well as from a full address, plus straight-line and road distance between postcodes.
English address coordinates come from OpenStreetMap address points. Most addresses have one; a few come back without a location, and a house-number range such as 81-87 shares a single point. Check for an empty coordinate before you route to it.
If the terminology is new, a plain definition of geocoding covers the concepts without the API detail. Geocoding rarely stands alone, and our guide to UK address and postcode APIs shows where it sits relative to lookup and validation.
Frequently asked questions
What is the difference between geocoding and reverse geocoding?
Geocoding converts an address into coordinates. Reverse geocoding converts coordinates into an address. Most providers expose them as two endpoints on the same service.
How do I geocode a UK postcode?
Send the postcode to a geocoding API and you will get the coordinates of the postcode unit, typically its centroid. Postcode-level coordinates for the UK are available as open data through the ONS Postcode Directory. For coordinates on a specific building you need an address-level geocode, built on AddressBase or on OpenStreetMap address points.
How accurate is postcode-level geocoding?
A UK postcode unit usually covers a small number of adjacent delivery points, so a centroid is typically within tens of metres in a town and can be considerably further in rural areas. It is fine for analysis and territory planning, not for navigation to a door.
Can I store the coordinates a geocoding API returns?
It depends entirely on the licence. Some providers allow it, some allow it only for a limited period, and some map platforms forbid storing results outside their own map. Check before you design a pipeline around cached geocodes.
Is there a free geocoding API?
Yes, both open-data services and free tiers of commercial APIs. The constraints are coverage, precision, request volume and, in some cases, restrictions on storing the result.
