Guides
for everything Geocodio
Guides
for everything Geocodio
Which county is a UK address in?
Ask what county Edinburgh is in and you can get three answers. The council is the City of Edinburgh. The Lord-Lieutenant represents the City of Edinburgh too. The historic county is Midlothian, and some Edinburgh residents will tell you so. None of them is wrong, because the UK runs three county systems at once, and the address on an envelope does not say which one it means.
Geocodio's gazetteer append returns all three for any UK address, postcode, or coordinate pair: county.ceremonial, county.historic, and the administrative tier as authority.local and authority.regional, each with the agency that publishes it and, for the administrative tier, the official GSS code.
Why does the UK have three kinds of county?
Counties started as units of government and stayed as units of identity after the government moved on. The 1974 local government reforms in England and Wales (1975 in Scotland) redrew the administrative map, created new counties like Greater Manchester and Avon, and in places abolished names that had been in use for a thousand years. Later reforms undid some of that: Avon, Cleveland, and Humberside were split into unitary authorities in 1996, and Cumbria County Council was abolished in 2023. Through all of it, the counties people identify with changed far less than the ones that collected the rates.
The result is three overlapping systems.
| System | What it is | Who defines it | What Geocodio returns |
|---|---|---|---|
| Ceremonial county | The area a Lord-Lieutenant represents the Crown in. In England these are the counties on most modern maps. Scotland calls them lieutenancy areas and Wales calls them preserved counties. Northern Ireland uses its six traditional counties. | Ordnance Survey Boundary-Line, and Land and Property Services (OSNI) in Northern Ireland |
county.ceremonial with a name and source
|
| Historic county | The counties as they stood before the 1974 reforms, which many residents, sports bodies, and heritage groups still use. | Historic Counties Trust, Definition A |
county.historic with a name and source
|
| Administrative (local authority) | The council that serves the address: a unitary authority, non-metropolitan district, metropolitan district, London borough, Scottish council area, or Northern Ireland local government district. | Office for National Statistics |
authority.local with name, type, gss_code, and source
|
| Administrative (county council) | The upper tier in the parts of England that still have two tiers, such as Hampshire and Devon. Everywhere else there is only one tier. | Office for National Statistics |
authority.regional with name, type, gss_code, and source, or null where there is no county council
|
What do the three systems look like for real addresses?
Every value below is a live Geocodio response.
| Address |
Town (geographic_town)
|
Ceremonial county | Historic county | Local authority | County council |
|---|---|---|---|---|---|
| Winchester Cathedral, SO23 9LS | Winchester | Hampshire | Hampshire | Winchester (non-metropolitan district) | Hampshire |
| 10 Downing Street, London SW1A 2AA | City of Westminster | Greater London | Middlesex | Westminster (London borough) |
null
|
| Manchester Town Hall, M2 5DB | Manchester | Greater Manchester | Lancashire | Manchester (metropolitan district) |
null
|
| 1 Princes Street, Edinburgh EH2 2EQ | Edinburgh | City of Edinburgh | Midlothian | City of Edinburgh (council area) |
null
|
| Cardiff Castle, CF10 3RB | Cardiff | South Glamorgan | Glamorgan | Cardiff (unitary authority) |
null
|
| Great Langdale, Ambleside LA22 9JU | Chapel Stile | Cumbria | Westmorland | Westmorland and Furness (unitary authority) |
null
|
| 1 Donegall Square North, Belfast BT1 5GB | Belfast City | Antrim | Antrim | Belfast (local government district) |
null
|
A few things stand out:
Winchester is the easy case. Hampshire is a two-tier county, so Hampshire County Council is the regional authority, and Hampshire is also both the ceremonial and the historic county. The three systems agree.
The big cities are where they diverge. Manchester has been a metropolitan district of Greater Manchester since 1974, but its historic county is Lancashire. Westminster is in Greater London today and Middlesex historically. Middlesex has had no council since 1965 and no Lord-Lieutenant either, and still appears on letterheads, cricket scorecards, and in
county.historic.Scotland and Wales use their own ceremonial names. The City of Edinburgh is a lieutenancy area. South Glamorgan is a preserved county, kept for ceremonial purposes after the Welsh counties were replaced by unitary authorities in 1996. Welsh councils also carry their Welsh name: Cardiff's
authority.localhasnamesof{ "en": "Cardiff", "cy": "Caerdydd" }, while the ceremonial and historic counties are published in English only.Cumbria shows how the systems move at different speeds. Cumbria County Council was abolished in 2023 and replaced by two unitary authorities, so
authority.regionalisnullandauthority.localis Westmorland and Furness. Cumbria remains the ceremonial county, and Westmorland, the historic county that gave the new authority half its name, is whatcounty.historicreturns.The county council slot is only ever filled in England. Scotland, Wales, Northern Ireland, London, and every unitary and metropolitan area have a single tier, so
authority.regionalisnullthere.
Which county should I use?
It depends on what the column is for, and Geocodio returns all three so you do not have to pick in advance.
Joining to government data or routing by council: use
authority.localand itsgss_code. Almost every UK dataset published by local authority area, from council tax bands to planning statistics, keys on this code. The UK census geographies append returns the same code alongside the smaller statistical areas.A human-readable "County" column: use
county.ceremonial. It covers every UK address, matches what most people and most maps mean by county today, and changes rarely.Heritage, family history, sport, or anything that predates 1974: use
county.historic.Mailing: none of them. Royal Mail stopped requiring a county on addresses in the 1990s, and the post town plus postcode is all a letter needs.
How is a postal county different?
It is not any of the three. Until the mid-1990s Royal Mail published a postal county for each post town, chosen to help sorting rather than to reflect any boundary, and many address databases still carry those values. Royal Mail no longer maintains them, so a postal county in an old address list may name a county that no longer exists in any system. Replacing it with county.ceremonial from the gazetteer is a straightforward clean-up.
How do I get the counties for my addresses?
Add gazetteer to the fields parameter on a geocode or reverse geocode request in API v2.
curl "https://api.geocod.io/v2/geocode?q=1+Princes+Street,+Edinburgh+EH2+2EQ&country=GB&fields=gazetteer&api_key=YOUR_API_KEY"
{
"gazetteer": {
"geographic_town": {
"name": "Edinburgh",
"names": { "en": "Edinburgh" },
"type": "built_up_area",
"code": { "gss_code": "S45001942" },
"source": "Ordnance Survey"
},
"county": {
"ceremonial": { "name": "City of Edinburgh", "names": { "en": "City of Edinburgh" }, "source": "Ordnance Survey" },
"historic": { "name": "Midlothian", "names": { "en": "Midlothian" }, "source": "Historic Counties Trust" }
},
"authority": {
"local": {
"name": "City of Edinburgh",
"names": { "en": "City of Edinburgh" },
"type": "council_area",
"code": { "gss_code": "S12000036" },
"source": "Office for National Statistics"
},
"regional": null
},
"identifiers": {
"uprn": { "value": "906203376", "source": "Ordnance Survey" },
"usrn": { "value": "7903151", "source": "Ordnance Survey" }
}
}
}
The counties come with the rest of the gazetteer append: the town, the local authority with its GSS code, and the UPRN and USRN for rooftop matches. The append costs 1 credit per address on top of the geocoding lookup. Spreadsheet upload support is being released separately from the API.
UK access
UK lookups require a Flex plan or a UK-enabled Unlimited subscription. They are not available on pay-as-you-go. See country support.
Attribution
Ceremonial counties from Ordnance Survey and the Office for National Statistics codes are published under the Open Government Licence v3.0. The Historic Counties Trust asks to be credited when its data is used. The source on each value tells you who to name.
Frequently asked questions
Because county.historic is the historic county, and Edinburgh sits in Midlothian in that system. county.ceremonial and authority.local both say City of Edinburgh. Use whichever matches the question you are answering.
They were created in 1974 and abolished in 1996, and they are in neither slot. They were never historic counties, and they are no longer ceremonial ones. An address in the former Avon returns Bristol, Somerset, or Gloucestershire as its ceremonial county, and Somerset or Gloucestershire as its historic county.
Only the two-tier parts of England have a county council. London boroughs, metropolitan districts, unitary authorities, and all of Scotland, Wales, and Northern Ireland are single-tier, so authority.regional is null and authority.local is the only council.
UK county names are returned bare, as they are written in the UK. US counties in address_components.county and the census append keep their suffix, such as "Hartford County". Normalize before matching one against the other.
Not always. The six counties do not account for the Belfast and Londonderry county boroughs, and Belfast straddles Antrim and Down, so the ceremonial county for a Belfast address is an approximation.
Yes. Every address in the UK falls inside a ceremonial county and a historic county, and every address has a local authority. Only authority.regional can be null, and only outside two-tier England.
Yes. Every named place has a names map keyed by language tag, and name is the English form. For Cardiff, authority.local.names is { "en": "Cardiff", "cy": "Caerdydd" }, so names.cy ?? name gives you the Welsh name wherever one is published. Counties and Scottish councils have English names only. The gazetteer guide covers the names map for every country.