Skip to main content

Standard UK Address

Our APIs return all data contained in Royal Mail's Postcode Address File.

Postcode Address File dataset results are labeled with paf.

Example Record

FieldExampleType

Every field is documented below.

Essential Elements

With each address lookup, the API will automatically aggregate all the available addressing information for any given premise into a reliable 3 lined address format which meets Royal Mail's clear addressing specifications. These 3 address lines plus the Post Town and Postcode represent all the information needed to reliably identify a premise according to Royal Mail.

line_1 string
Line 1

First address line. Often contains premise and thoroughfare information. For a commercial premise the first line is the full name of the registered organisation. Never empty.

Example Prime Minister & First Lord Of The Treasury
line_2 string
Line 2

Second address line. Often contains thoroughfare and locality information. May be empty.

Example 10 Downing Street
line_3 string
Line 3

Third address line. Takes the address elements left after line_1 and line_2 are filled; where the address needs more than three lines the remaining elements are joined into line_3, comma separated. May be empty.

Example Empty in this example
post_town string
Post Town

The town or city used to route mail to the address. For UK addresses this is the Royal Mail post town, which is a routing instruction rather than the nearest town geographically. Present on every address.

Example London
postcode string
Postcode

Correctly formatted postcode. Capitalised and spaced. Empty ("") where the address has no postcode.

Example SW1A 2AA

Premise Elements

These elements identify a specific premise. A combination of building number, building name and sub-building fields may be present. We also provide a pre-computed premise field if you are unaware of how premise elements are combined.

building_number string
Building Number

Number identifying the premise on a thoroughfare or dependant thoroughfare. May be empty.

Example 10
building_name string
Building Name

Name of a residential or commercial premise. May be empty.

Examples:

  • The Manor
  • 1-2
  • A
  • 12A
  • K
  • Victoria House
Example Empty in this example
sub_building_name string
Sub-Building Name

Identifies a unit where a premise is split into flats, apartments or business units. Cannot be present without either building_name or building_number. E.g. Flat 1, A, 10B. May be empty.

Example Empty in this example
premise string
Premise

A pre-computed string which sensibly combines building_number, building_name and sub_building_name. Those three fields hold raw dataset values and can be difficult to parse if you are unaware of how they work together, so we also provide this single, simple premise string. Ideal if you want to pull premise information and thoroughfare information separately instead of using our address lines data.

Example 10
po_box string
PO Box

PO Box number for the address, occasionally a combination of numbers and letters. Allocated to Large User postcodes only. May be empty.

Example Empty in this example
organisation_name string
Organisation Name

Name of the business or organisation at this address. May be empty.

Example Prime Minister & First Lord Of The Treasury
department_name string
Department Name

Supplements organisation name to identify a department within the organisation. May be empty.

Example Empty in this example

Thoroughfare Elements

thoroughfare string
Thoroughfare

Also known as the street or road name. May be empty.

Example Downing Street
dependant_thoroughfare string
Dependant Thoroughfare

Supplements thoroughfare. Used where a thoroughfare name occurs twice in the same post town, to identify the address uniquely. May be empty.

Example Empty in this example

Locality Elements

dependant_locality string
Dependant Locality

A locality that qualifies the thoroughfare. Used where the same thoroughfare name occurs more than once in a post town and no dependant thoroughfare distinguishes them. May be empty.

Example Empty in this example
double_dependant_locality string
Double Dependant Locality

Supplements dependant locality. Supplied where the dependant locality itself occurs twice in the same locality. May be empty.

Example Empty in this example

Administrative Address Elements

Each address also comes with certain data points regarding its administrative authorities including county, district and ward.

Administrative data for postcodes is retrieved using Royal Mail, ONS and Ordnance Survey data. ONS and Ordnance Survey data is released every quarter. A very small percentage of new postcodes (less than 0.1%) will not have this information until the next release. In this scenario, the API will return an empty string.

Please note that county data is no longer required to identify an address and we strongly recommend discarding county data altogether. This data is provided primarily for users of legacy systems which require some county data. Since the use of county information has been deprecated for many years, this data can be inaccurate or missing.

county string
County

Whatever county data is available for the address. Normally the postal county. If that is not present it falls back to the administrative county, then to the traditional county. May be empty where none of the three is present.

Example London
postal_county string
Postal County

Postal counties were used for the distribution of mail before the Postcode system was introduced in the 1970s. The Former Postal County was the Administrative County at the time. This data rarely changes. May be empty.

Example London
administrative_county string
Administrative County

The current administrative county to which the postcode has been assigned.

A Unitary Authority name, where one is present. If there is no Unitary Authority, the County name is used. This information is not static, because County boundaries may change due to administrative changes.

Source: ONS. May be empty.

Example Empty in this example
traditional_county string
Traditional County

Traditional counties are provided by the Association of British Counties. It is historical data, and can date from the 1800s. May be empty.

Example Greater London
county_code string
County Code

Short code representing the county or province. May be empty ("")

Example Empty in this example
district string
District

The current district/unitary authority to which the postcode has been assigned. May be empty.

Example Westminster
ward string
Ward

The current administrative/electoral area to which the postcode has been assigned. May be empty for a small number of addresses.

Example St. James's
country string
Country

Full country names (ISO 3166)

Example England
Enum
248 possible values
  • "United Kingdom"
  • "England"
  • "Scotland"
  • "Wales"
  • "Northern Ireland"
  • "Isle of Man"
  • "Jersey"
  • "Guernsey"
  • "Channel Islands"
  • "Guam"
  • "United States"
  • "Puerto Rico"
  • "Ireland"
  • "Vatican City"
  • "France"
  • "Greenland"
  • "Netherlands"
  • "Luxembourg"
  • "Austria"
  • "Gibraltar"
  • "Liechtenstein"
  • "Finland"
  • "Iceland"
  • "Switzerland"
  • "Portugal"
  • "Belgium"
  • "Monaco"
  • "Italy"
  • "Faroe Islands"
  • "Norway"
  • "Denmark"
  • "San Marino"
  • "Malta"
  • "Andorra"
  • "Sweden"
  • "Germany"
  • "Spain"
  • "Svalbard and Jan Mayen"
  • "Bahamas"
  • "Belize"
  • "Bermuda"
  • "Canada"
  • "Costa Rica"
  • "Cayman Islands"
  • "Dominican Republic"
  • "Guatemala"
  • "Honduras"
  • "Haiti"
  • "Jamaica"
  • "Mexico"
  • "Nicaragua"
  • "Panama"
  • "El Salvador"
  • "British Virgin Islands"
  • "Australia"
  • "Cocos (Keeling) Islands"
  • "Christmas Island"
  • "Fiji"
  • "New Caledonia"
  • "Norfolk Island"
  • "New Zealand"
  • "French Polynesia"
  • "Tonga"
  • "Vanuatu"
  • "Aruba"
  • "Argentina"
  • "Saint Barthélemy"
  • "Bolivia"
  • "Brazil"
  • "Barbados"
  • "Chile"
  • "Colombia"
  • "Curaçao"
  • "Dominica"
  • "Ecuador"
  • "Guadeloupe"
  • "Grenada"
  • "French Guiana"
  • "Guyana"
  • "Saint Martin (French part)"
  • "Martinique"
  • "Peru"
  • "Paraguay"
  • "Suriname"
  • "Trinidad and Tobago"
  • "Uruguay"
  • "Venezuela"
  • "Taiwan"
  • "Brunei Darussalam"
  • "Indonesia"
  • "Cambodia"
  • "Myanmar"
  • "Malaysia"
  • "Philippines"
  • "Singapore"
  • "Thailand"
  • "Timor-Leste"
  • "Vietnam"
  • "Albania"
  • "Armenia"
  • "Azerbaijan"
  • "Bulgaria"
  • "Bosnia and Herzegovina"
  • "Belarus"
  • "Cyprus"
  • "Czech Republic"
  • "Estonia"
  • "Georgia"
  • "Greece"
  • "Croatia"
  • "Hungary"
  • "Kazakhstan"
  • "Kyrgyzstan"
  • "Kosovo"
  • "Lithuania"
  • "Latvia"
  • "Moldova"
  • "North Macedonia"
  • "Montenegro"
  • "Poland"
  • "Romania"
  • "Russia"
  • "Serbia"
  • "Slovakia"
  • "Slovenia"
  • "Turkey"
  • "Ukraine"
  • "Uzbekistan"
  • "Hong Kong"
  • "Bangladesh"
  • "India"
  • "Sri Lanka"
  • "Macau"
  • "Angola"
  • "United Arab Emirates"
  • "Burkina Faso"
  • "Bahrain"
  • "Botswana"
  • "Cameroon"
  • "Egypt"
  • "Ghana"
  • "Israel"
  • "Jordan"
  • "Kenya"
  • "Kuwait"
  • "Lebanon"
  • "Lesotho"
  • "Morocco"
  • "Mozambique"
  • "Mauritius"
  • "Mayotte"
  • "Namibia"
  • "Nigeria"
  • "Oman"
  • "Qatar"
  • "Réunion"
  • "Saudi Arabia"
  • "Senegal"
  • "Eswatini"
  • "Tunisia"
  • "South Africa"
  • "Zambia"
  • "Zimbabwe"
  • "China"
  • "Japan"
  • "South Korea"
  • "Laos"
  • "Mongolia"
  • "Papua New Guinea"
  • "North Korea"
  • "Solomon Islands"
  • "Tajikistan"
  • "Turkmenistan"
  • "Bhutan"
  • "British Indian Ocean Territory"
  • "Maldives"
  • "Nepal"
  • "Pakistan"
  • "Afghanistan"
  • "Burundi"
  • "Benin"
  • "Central African Republic"
  • "Côte d'Ivoire"
  • "Democratic Republic of the Congo"
  • "Republic of the Congo"
  • "Comoros"
  • "Cape Verde"
  • "Djibouti"
  • "Algeria"
  • "Eritrea"
  • "Western Sahara"
  • "Ethiopia"
  • "Gabon"
  • "Guinea"
  • "Gambia"
  • "Guinea-Bissau"
  • "Equatorial Guinea"
  • "Iran"
  • "Iraq"
  • "Liberia"
  • "Libya"
  • "Madagascar"
  • "Mali"
  • "Mauritania"
  • "Malawi"
  • "Niger"
  • "Rwanda"
  • "Saint Helena"
  • "Sierra Leone"
  • "Somalia"
  • "South Sudan"
  • "São Tomé and Príncipe"
  • "Seychelles"
  • "Chad"
  • "Togo"
  • "Tanzania"
  • "Uganda"
  • "Sudan"
  • "Syria"
  • "Yemen"
  • "Cuba"
  • "Saint Pierre and Miquelon"
  • "Turks and Caicos Islands"
  • "Cook Islands"
  • "Kiribati"
  • "Niue"
  • "Nauru"
  • "Pitcairn Islands"
  • "Tokelau"
  • "Tuvalu"
  • "Wallis and Futuna"
  • "Samoa"
  • "Anguilla"
  • "Antigua and Barbuda"
  • "Bonaire, Sint Eustatius and Saba"
  • "Falkland Islands (Malvinas)"
  • "Saint Kitts and Nevis"
  • "Saint Lucia"
  • "Montserrat"
  • "South Georgia and the South Sandwich Islands"
  • "Sint Maarten (Dutch part)"
  • "Saint Vincent and the Grenadines"
  • "American Samoa"
  • "Federated States of Micronesia"
  • "Marshall Islands"
  • "Northern Mariana Islands"
  • "Palau"
  • "United States Virgin Islands"

Geolocation

England, Scotland and Wales geolocation data is accurate to the rooftop level. If uprn is not present, it will be accurate to the postcode centroid level only.

Northern Ireland geolocation is accurate to postcode centroid level only.

A very small percentage of addresses will not have geolocation data either because the premise is new (England, Scotland, Wales) or the data is unavailable (Northern Ireland).

High level (approximate) geolocations have been allocated to the Channel Islands and Isle of Man based on outward code for the address.

longitude string | number
Longitude

The longitude of the address or postcode (WGS84).

Can be a positive or negative decimal. E.g. -0.1283983

Returns an empty string if no location data is available.

Example -0.12767
latitude string | number
Latitude

The latitude of the address or postcode (WGS84).

Can be a positive or negative decimal. E.g. 51.5083983.

Returns an empty string if no location data is available.

Example 51.503541
northings string | number
Northings

Northings reference using the Ordnance Survey National Grid reference system

Northern Ireland Northings uses the Irish Grid Reference System

Metres from origin. E.g. 180458

Returns an empty string if no location data is available. Otherwise a number is returned

Example 179951
eastings string | number
Eastings

Eastings reference using the Ordnance Survey National Grid reference system.

Northern Ireland Eastings uses the Irish Grid Reference System.

Metres from origin. E.g. 550458

Returns an empty string if no location data is available. Otherwise a number is returned.

Example 530047

Identifiers

Every address carries a set of identifiers and postcode components alongside the address elements above.

id string
Address Identifier

Global unique internally generated identifier for an address

Example paf_23747771
dataset string
Dataset

Indicates the provenance of an address.

Example paf
Enum
33 possible values
  • "paf"
  • "pafw"
  • "pafa"
  • "mr"
  • "nyb"
  • "usps"
  • "ecaf"
  • "ecad"
  • "ab"
  • "abp"
  • "herewe"
  • "heret"
  • "heresa"
  • "hereo"
  • "herena"
  • "heremeas"
  • "heremea"
  • "herem"
  • "herei"
  • "herehk"
  • "hereee"
  • "hereap"
  • "gnaf"
  • "kadaster"
  • "kartverket"
  • "sdfi"
  • "cannar"
  • "fodbosa"
  • "mois"
  • "upujp"
  • "bev"
  • "ban"
  • "swt"
language string
Language

Language represented by 2 letter ISO Code (639-1)

Example en
Enum
64 possible values
  • "en"
  • "ar"
  • "as"
  • "az"
  • "be"
  • "bg"
  • "bn"
  • "bs"
  • "ca"
  • "cs"
  • "cy"
  • "da"
  • "de"
  • "el"
  • "es"
  • "et"
  • "eu"
  • "fi"
  • "fo"
  • "fr"
  • "ga"
  • "gl"
  • "gn"
  • "he"
  • "hi"
  • "hr"
  • "hu"
  • "hy"
  • "id"
  • "is"
  • "it"
  • "ja"
  • "ka"
  • "kk"
  • "km"
  • "kn"
  • "ko"
  • "lt"
  • "lv"
  • "mk"
  • "mn"
  • "ms"
  • "mt"
  • "my"
  • "nl"
  • "no"
  • "pl"
  • "pt"
  • "rm"
  • "ro"
  • "ru"
  • "sk"
  • "sl"
  • "sq"
  • "sr"
  • "sv"
  • "ta"
  • "th"
  • "tr"
  • "uk"
  • "uz"
  • "vi"
  • "wa"
  • "zh"
country_iso string
ISO Country Code (3)

3 letter country code (ISO 3166-1)

Example GBR
Enum
243 possible values
  • "GBR"
  • "IMN"
  • "JEY"
  • "GGY"
  • "USA"
  • "PRI"
  • "GUM"
  • "IRL"
  • "VAT"
  • "FRA"
  • "GRL"
  • "NLD"
  • "LUX"
  • "AUT"
  • "GIB"
  • "LIE"
  • "FIN"
  • "ISL"
  • "CHE"
  • "PRT"
  • "BEL"
  • "MCO"
  • "ITA"
  • "FRO"
  • "NOR"
  • "DNK"
  • "SMR"
  • "MLT"
  • "AND"
  • "SWE"
  • "DEU"
  • "ESP"
  • "SJM"
  • "BRN"
  • "IDN"
  • "KHM"
  • "MMR"
  • "MYS"
  • "PHL"
  • "SGP"
  • "THA"
  • "TLS"
  • "VNM"
  • "ALB"
  • "ARM"
  • "AZE"
  • "BGR"
  • "BIH"
  • "BLR"
  • "CYP"
  • "CZE"
  • "EST"
  • "GEO"
  • "GRC"
  • "HRV"
  • "HUN"
  • "KAZ"
  • "KGZ"
  • "LTU"
  • "LVA"
  • "MDA"
  • "MKD"
  • "MNE"
  • "POL"
  • "ROU"
  • "RUS"
  • "SRB"
  • "SVK"
  • "SVN"
  • "TUR"
  • "UKR"
  • "UZB"
  • "XKX"
  • "HKG"
  • "BGD"
  • "IND"
  • "LKA"
  • "MAC"
  • "AGO"
  • "ARE"
  • "BFA"
  • "BHR"
  • "BWA"
  • "CMR"
  • "EGY"
  • "GHA"
  • "ISR"
  • "JOR"
  • "KEN"
  • "KWT"
  • "LBN"
  • "LSO"
  • "MAR"
  • "MOZ"
  • "MUS"
  • "MYT"
  • "NAM"
  • "NGA"
  • "OMN"
  • "QAT"
  • "REU"
  • "SAU"
  • "SEN"
  • "SWZ"
  • "TUN"
  • "ZAF"
  • "ZMB"
  • "ZWE"
  • "BHS"
  • "BLZ"
  • "BMU"
  • "CAN"
  • "CRI"
  • "CYM"
  • "DOM"
  • "GTM"
  • "HND"
  • "HTI"
  • "JAM"
  • "MEX"
  • "NIC"
  • "PAN"
  • "SLV"
  • "VGB"
  • "AUS"
  • "CCK"
  • "CXR"
  • "FJI"
  • "NCL"
  • "NFK"
  • "NZL"
  • "PYF"
  • "TON"
  • "VUT"
  • "ABW"
  • "ARG"
  • "BLM"
  • "BOL"
  • "BRA"
  • "BRB"
  • "CHL"
  • "COL"
  • "CUW"
  • "DMA"
  • "ECU"
  • "GLP"
  • "GUF"
  • "GUY"
  • "MAF"
  • "MTQ"
  • "PER"
  • "PRY"
  • "SUR"
  • "TTO"
  • "URY"
  • "VEN"
  • "TWN"
  • "CHN"
  • "JPN"
  • "KOR"
  • "LAO"
  • "MNG"
  • "PNG"
  • "PRK"
  • "SLB"
  • "TJK"
  • "TKM"
  • "BTN"
  • "IOT"
  • "MDV"
  • "NPL"
  • "PAK"
  • "AFG"
  • "BDI"
  • "BEN"
  • "CAF"
  • "CIV"
  • "COD"
  • "COG"
  • "COM"
  • "CPV"
  • "DJI"
  • "DZA"
  • "ERI"
  • "ESH"
  • "ETH"
  • "GAB"
  • "GIN"
  • "GMB"
  • "GNB"
  • "GNQ"
  • "IRN"
  • "IRQ"
  • "LBR"
  • "LBY"
  • "MDG"
  • "MLI"
  • "MRT"
  • "MWI"
  • "NER"
  • "RWA"
  • "SHN"
  • "SLE"
  • "SOM"
  • "SSD"
  • "STP"
  • "SYC"
  • "TCD"
  • "TGO"
  • "TZA"
  • "UGA"
  • "SDN"
  • "SYR"
  • "YEM"
  • "CUB"
  • "SPM"
  • "TCA"
  • "COK"
  • "KIR"
  • "NIU"
  • "NRU"
  • "PCN"
  • "TKL"
  • "TUV"
  • "WLF"
  • "WSM"
  • "AIA"
  • "ATG"
  • "BES"
  • "FLK"
  • "GRD"
  • "KNA"
  • "LCA"
  • "MSR"
  • "SGS"
  • "SXM"
  • "VCT"
  • "ASM"
  • "FSM"
  • "MHL"
  • "MNP"
  • "PLW"
  • "VIR"
country_iso_2 string
ISO Country Code (2)

2 letter country code (ISO 3166-1)

Example GB
Enum
243 possible values
  • "GB"
  • "IM"
  • "JE"
  • "GG"
  • "US"
  • "PR"
  • "GU"
  • "IE"
  • "VA"
  • "FR"
  • "GL"
  • "NL"
  • "LU"
  • "AT"
  • "GI"
  • "LI"
  • "FI"
  • "IS"
  • "CH"
  • "PT"
  • "BE"
  • "MC"
  • "IT"
  • "FO"
  • "NO"
  • "DK"
  • "SM"
  • "MT"
  • "AD"
  • "SE"
  • "DE"
  • "ES"
  • "SJ"
  • "BS"
  • "BZ"
  • "BM"
  • "CA"
  • "CR"
  • "KY"
  • "DO"
  • "GT"
  • "HN"
  • "HT"
  • "JM"
  • "MX"
  • "NI"
  • "PA"
  • "SV"
  • "VG"
  • "AU"
  • "CC"
  • "CX"
  • "FJ"
  • "NC"
  • "NF"
  • "NZ"
  • "PF"
  • "TO"
  • "VU"
  • "AW"
  • "AR"
  • "BL"
  • "BO"
  • "BR"
  • "BB"
  • "CL"
  • "CO"
  • "CW"
  • "DM"
  • "EC"
  • "GP"
  • "GD"
  • "GF"
  • "GY"
  • "MF"
  • "MQ"
  • "PE"
  • "PY"
  • "SR"
  • "TT"
  • "UY"
  • "VE"
  • "TW"
  • "BN"
  • "ID"
  • "KH"
  • "MM"
  • "MY"
  • "PH"
  • "SG"
  • "TH"
  • "TL"
  • "VN"
  • "AL"
  • "AM"
  • "AZ"
  • "BG"
  • "BA"
  • "BY"
  • "CY"
  • "CZ"
  • "EE"
  • "GE"
  • "GR"
  • "HR"
  • "HU"
  • "KZ"
  • "KG"
  • "XK"
  • "LT"
  • "LV"
  • "MD"
  • "MK"
  • "ME"
  • "PL"
  • "RO"
  • "RU"
  • "RS"
  • "SK"
  • "SI"
  • "TR"
  • "UA"
  • "UZ"
  • "HK"
  • "BD"
  • "IN"
  • "LK"
  • "MO"
  • "AO"
  • "AE"
  • "BF"
  • "BH"
  • "BW"
  • "CM"
  • "EG"
  • "GH"
  • "IL"
  • "JO"
  • "KE"
  • "KW"
  • "LB"
  • "LS"
  • "MA"
  • "MZ"
  • "MU"
  • "YT"
  • "NA"
  • "NG"
  • "OM"
  • "QA"
  • "RE"
  • "SA"
  • "SN"
  • "SZ"
  • "TN"
  • "ZA"
  • "ZM"
  • "ZW"
  • "CN"
  • "JP"
  • "KR"
  • "LA"
  • "MN"
  • "PG"
  • "KP"
  • "SB"
  • "TJ"
  • "TM"
  • "BT"
  • "IO"
  • "MV"
  • "NP"
  • "PK"
  • "AF"
  • "BI"
  • "BJ"
  • "CF"
  • "CI"
  • "CD"
  • "CG"
  • "KM"
  • "CV"
  • "DJ"
  • "DZ"
  • "ER"
  • "EH"
  • "ET"
  • "GA"
  • "GN"
  • "GM"
  • "GW"
  • "GQ"
  • "IR"
  • "IQ"
  • "LR"
  • "LY"
  • "MG"
  • "ML"
  • "MR"
  • "MW"
  • "NE"
  • "RW"
  • "SH"
  • "SL"
  • "SO"
  • "SS"
  • "ST"
  • "SC"
  • "TD"
  • "TG"
  • "TZ"
  • "UG"
  • "SD"
  • "SY"
  • "YE"
  • "CU"
  • "PM"
  • "TC"
  • "CK"
  • "KI"
  • "NU"
  • "NR"
  • "PN"
  • "TK"
  • "TV"
  • "WF"
  • "WS"
  • "AI"
  • "AG"
  • "BQ"
  • "FK"
  • "KN"
  • "LC"
  • "MS"
  • "GS"
  • "SX"
  • "VC"
  • "AS"
  • "FM"
  • "MH"
  • "MP"
  • "PW"
  • "VI"
udprn integer | string
Unique Delivery Point Reference Number (UDPRN)

UDPRN stands for 'Unique Delivery Point Reference Number'. Royal Mail assigns a unique UDPRN code for each premise on PAF. Simple, unique reference number for each Delivery Point. Unlikely to be reused when an address expires.

Up to 8-digit numeric code. A new UDPRN is automatically assigned to each new Delivery Point added to PAF.

Returns 0 on a UK dataset that carries no UDPRN for the address, and an empty string "" on a non-UK address. Use id for an identifier present on every address.

Example 23747771
uprn string
Unique Property Reference Number

UPRN stands for Unique Property Reference Number and is maintained by the Ordnance Survey (OS). Local governments in the UK have allocated a unique number for each land or property.

Up to 12 digits in length.

Multiple Residence premises currently share the same UPRN as the parent premise.

May not be available for a small number of Great Britain addresses due to longer update cycles for Ordnance Survey's AddressBase datasets. Returns empty string "" in these instances, as it does for addresses outside the UK.

Although UPRN takes an integer format, we encode and transmit this data as strings. As a 12 digit number, the UPRN can exceed the maximum safe integer Number.MAX_SAFE_INTEGER in most browsers causing this datapoint to be corrupted.

Take special care when storing UPRN. As a 12 digit identifier, you will need 64 bits to encode every possible UPRN value. This means applications like Excel will corrupt cells containing UPRN values.

Example 100023336956
umprn string | number
UMPRN

A small minority of individual premises (as identified by a UDPRN) may have multiple occupants behind the same letterbox. These are known as Multiple Residence occupants and can be queried via the Multiple Residence dataset. Simple, unique reference number for each Multiple Residence occupant.

Note: this will be an empty string "" when not used.

Example Empty in this example
postcode_outward string
Postcode Outward

The first part of a postcode is known as the outward code. e.g. The outward code of ID1 1QD is ID1. Enables mail to be sorted to the correct local area for delivery. This part of the code contains the area and the district to which the mail is to be delivered, e.g. 'PO1', 'SW1A' or 'B23'.

Empty ("") where the address has no UK postcode.

Example SW1A
postcode_inward string
Postcode Inward

The second part of a postcode is known as the inward code. e.g. The inward code of ID1 1QD is 1QD.

The number identifies the sector in the postal district. The number is followed by 2 letters. The letters then define one or more properties in that sector.

Empty ("") where the address has no UK postcode.

Example 2AA
postcode_type string
Postcode Type

Royal Mail postcode user type. UK addresses only.

  • S small user. The postcode identifies a group of delivery points. There are on average 19 delivery points per postcode, and never more than 100
  • L large user. The postcode is assigned to a single address, either because of the volume of mail it receives or because a PO Box or Selectapost service is set up

Empty ("") where not applicable.

Example S
Enum
  • "S"
  • "L"
  • ""
su_organisation_indicator string
Small User Organisation Indicator

Y where an organisation is present at a small user postcode. Empty ("") otherwise. UK addresses only.

Example Empty in this example
delivery_point_suffix string
Delivery Point Suffix

Two-character code (the first numeric, the second alphabetical) which, added to the postcode, uniquely identifies a delivery point. May be reused once a delivery point is deleted, though not until every remaining code in the range has been allocated. Always 1A for a large user postcode, since each large user has its own postcode. Empty ("") where not available.

Example 1A

See our guide on organisational information on PAF for more information on organisation names, department names, postcode type and small user organisation indicator.

Native Record

native object
Native Record

The raw dataset record backing an address, exactly as the dataset supplies it. One schema per dataset; dataset on the record says which.

Raw Royal Mail Postcode Address File record backing a paf address.

Fields shared by every Royal Mail PAF family native record (paf, mr, nyb, pafa, pafw).

The Royal Mail record as held in Postgres, before any derived fields are added. Formatted lines, premise, postcode parts, geocodes, UPRN and county fields belong to the address, not to the native record. dataset is the one field not taken from Royal Mail.

Two values differ from the raw PAF file: post_town is title cased (Royal Mail supplies it upper cased), and a building_number of 0, PAF's sentinel for "none", is returned as an empty string.

Example Record

dataset string
Example paf
Enum
  • "paf"
postcode string

Postcode, space separated

Example SW1A 2AA
post_town string

Royal Mail post town, title cased

Example London
dependant_locality string

Dependant locality. Empty string when not present

Example Empty in this example
double_dependant_locality string

Double dependant locality. Empty string when not present

Example Empty in this example
thoroughfare string

Street name

Example Downing Street
dependant_thoroughfare string

Dependant street name. Empty string when not present

Example Empty in this example
building_number string

Building number. Empty string when not present, or when PAF merges it into the building name

Example 10
building_name string

Building name. Empty string when not present

Example Empty in this example
sub_building_name string

Sub building name. Empty string when not present

Example Empty in this example
department_name string

Department name within an organisation. Empty string when not present

Example Empty in this example
organisation_name string

Organisation name. Empty string when not present

Example Prime Minister & First Lord Of The Treasury
udprn integer

Unique Delivery Point Reference Number

Example 23747771
postcode_type string

Postcode type.

  • S Small user
  • L Large user
  • "" where Royal Mail supplies none
Example S
Enum
  • "S"
  • "L"
  • ""
su_organisation_indicator string

Small user organisation indicator. Y where the small user postcode is held by an organisation

Example Empty in this example
delivery_point_suffix string

Royal Mail delivery point suffix

Example 1A
po_box string

PO Box number. Empty string when not present

Example Empty in this example

Identifying a Commercial Premise

A commercial premise (i.e. a business or PO Box) will have an su_organisation_indicator value of Y or postcode_type of L.

A PO Box will always have postcode_type of L.

Identifying a Residential Premise

A residential premise will have an empty su_organisation_indicator (i.e. not Y) and postcode_type of S.

Sizing

The column sizes for the address elements used by the PAF dataset are outlined below

Address ElementsMaximum Length
Sub Building Name30
Building Name50
Building Number4
Organisation Name60
Department Name60
PO Box Number6
Dependant Thoroughfare + Descriptor80
Thoroughfare Name + Descriptor80
Double Dependant Locality35
Dependant Locality35
Post Town30
Postcode7

Note that:

  • County data is not available in the Postcode Address File. This datapoint is no longer used to identify a premise in the UK
  • Premise can potentially include sub building name, building name, building number plus comma dividers ", ". The maximum length of this field is therefore 84 characters (30 + 50 + 4 + 2 + 2)
  • Line 1...Line 3 can be a wide number of combinations across the above premise attributes as well as thoroughfare, department thoroughfare, locality, double department locality, organisation name and department name. The dynamic range in terms of length is therefore much bigger. We recommend against adding fixed width columns for those fields

See the Programmer's Guide from Royal Mail for more information