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
{"id": "paf_23747771","dataset": "paf","country_iso": "GBR","country_iso_2": "GB","country": "England","language": "en","postcode": "SW1A 2AA","postcode_inward": "2AA","postcode_outward": "SW1A","post_town": "London","dependant_locality": "","double_dependant_locality": "","thoroughfare": "Downing Street","dependant_thoroughfare": "","building_number": "10","building_name": "","sub_building_name": "","po_box": "","department_name": "","organisation_name": "Prime Minister & First Lord Of The Treasury","udprn": 23747771,"umprn": "","uprn": "100023336956","postcode_type": "S","su_organisation_indicator": "","delivery_point_suffix": "1A","line_1": "Prime Minister & First Lord Of The Treasury","line_2": "10 Downing Street","line_3": "","premise": "10","longitude": -0.12767,"latitude": 51.503541,"eastings": 530047,"northings": 179951,"county": "London","county_code": "","traditional_county": "Greater London","administrative_county": "","postal_county": "London","district": "Westminster","ward": "St. James's","native": {"dataset": "paf","postcode": "SW1A 2AA","post_town": "London","dependant_locality": "","double_dependant_locality": "","thoroughfare": "Downing Street","dependant_thoroughfare": "","building_number": "10","building_name": "","sub_building_name": "","po_box": "","department_name": "","organisation_name": "Prime Minister & First Lord Of The Treasury","udprn": 23747771,"postcode_type": "S","su_organisation_indicator": "","delivery_point_suffix": "1A"}}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_1string- 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.
line_2string- Line 2
Second address line. Often contains thoroughfare and locality information. May be empty.
line_3string- Line 3
Third address line. Takes the address elements left after
line_1andline_2are filled; where the address needs more than three lines the remaining elements are joined intoline_3, comma separated. May be empty. post_townstring- 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.
postcodestring- Postcode
Correctly formatted postcode. Capitalised and spaced. Empty (
"") where the address has no postcode.
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_numberstring- Building Number
Number identifying the premise on a thoroughfare or dependant thoroughfare. May be empty.
building_namestring- Building Name
Name of a residential or commercial premise. May be empty.
Examples:
- The Manor
- 1-2
- A
- 12A
- K
- Victoria House
sub_building_namestring- 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.
premisestring- 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.
po_boxstring- PO Box
PO Box number for the address, occasionally a combination of numbers and letters. Allocated to Large User postcodes only. May be empty.
organisation_namestring- Organisation Name
Name of the business or organisation at this address. May be empty.
department_namestring- Department Name
Supplements organisation name to identify a department within the organisation. May be empty.
Thoroughfare Elements
thoroughfarestring- Thoroughfare
Also known as the street or road name. May be empty.
dependant_thoroughfarestring- Dependant Thoroughfare
Supplements thoroughfare. Used where a thoroughfare name occurs twice in the same post town, to identify the address uniquely. May be empty.
Locality Elements
dependant_localitystring- 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.
double_dependant_localitystring- Double Dependant Locality
Supplements dependant locality. Supplied where the dependant locality itself occurs twice in the same locality. May be empty.
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.
countystring- 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.
postal_countystring- 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.
administrative_countystring- 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.
traditional_countystring- 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.
county_codestring- County Code
Short code representing the county or province. May be empty (
"") districtstring- District
The current district/unitary authority to which the postcode has been assigned. May be empty.
wardstring- Ward
The current administrative/electoral area to which the postcode has been assigned. May be empty for a small number of addresses.
countrystring- Country
Full country names (ISO 3166)
Enum248 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.
longitudestring | 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.
latitudestring | 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.
northingsstring | 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.
180458Returns an empty string if no location data is available. Otherwise a number is returned
eastingsstring | 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.
550458Returns an empty string if no location data is available. Otherwise a number is returned.
Identifiers
Every address carries a set of identifiers and postcode components alongside the address elements above.
idstring- Address Identifier
Global unique internally generated identifier for an address
datasetstring- Dataset
Indicates the provenance of an address.
Enum33 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"
languagestring- Language
Language represented by 2 letter ISO Code (639-1)
Enum64 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_isostring- ISO Country Code (3)
3 letter country code (ISO 3166-1)
Enum243 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_2string- ISO Country Code (2)
2 letter country code (ISO 3166-1)
Enum243 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"
udprninteger | 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
0on a UK dataset that carries no UDPRN for the address, and an empty string""on a non-UK address. Useidfor an identifier present on every address. uprnstring- 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_INTEGERin 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.
umprnstring | 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. postcode_outwardstring- 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. postcode_inwardstring- 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. postcode_typestring- Postcode Type
Royal Mail postcode user type. UK addresses only.
Ssmall user. The postcode identifies a group of delivery points. There are on average 19 delivery points per postcode, and never more than 100Llarge 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.Enum- "S"
- "L"
- ""
su_organisation_indicatorstring- Small User Organisation Indicator
Ywhere an organisation is present at a small user postcode. Empty ("") otherwise. UK addresses only. delivery_point_suffixstring- 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
1Afor a large user postcode, since each large user has its own postcode. Empty ("") where not available.
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
nativeobject- Native Record
The raw dataset record backing an address, exactly as the dataset supplies it. One schema per dataset;
dataseton 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
| Field | Example | Type |
|---|---|---|
dataset | paf | string |
postcode | SW1A 2AA | string |
post_town | London | string |
dependant_locality | Empty in this example | string |
double_dependant_locality | Empty in this example | string |
thoroughfare | Downing Street | string |
dependant_thoroughfare | Empty in this example | string |
building_number | 10 | string |
building_name | Empty in this example | string |
sub_building_name | Empty in this example | string |
po_box | Empty in this example | string |
department_name | Empty in this example | string |
organisation_name | Prime Minister & First Lord Of The Treasury | string |
udprn | 23747771 | number |
postcode_type | S | string |
su_organisation_indicator | Empty in this example | string |
delivery_point_suffix | 1A | string |
{"dataset": "paf","postcode": "SW1A 2AA","post_town": "London","dependant_locality": "","double_dependant_locality": "","thoroughfare": "Downing Street","dependant_thoroughfare": "","building_number": "10","building_name": "","sub_building_name": "","po_box": "","department_name": "","organisation_name": "Prime Minister & First Lord Of The Treasury","udprn": 23747771,"postcode_type": "S","su_organisation_indicator": "","delivery_point_suffix": "1A"}Every field is documented below.
datasetstring- Enum
- "paf"
postcodestringPostcode, space separated
post_townstringRoyal Mail post town, title cased
dependant_localitystringDependant locality. Empty string when not present
double_dependant_localitystringDouble dependant locality. Empty string when not present
thoroughfarestringStreet name
dependant_thoroughfarestringDependant street name. Empty string when not present
building_numberstringBuilding number. Empty string when not present, or when PAF merges it into the building name
building_namestringBuilding name. Empty string when not present
sub_building_namestringSub building name. Empty string when not present
department_namestringDepartment name within an organisation. Empty string when not present
organisation_namestringOrganisation name. Empty string when not present
udprnintegerUnique Delivery Point Reference Number
postcode_typestringPostcode type.
SSmall userLLarge user""where Royal Mail supplies none
Enum- "S"
- "L"
- ""
su_organisation_indicatorstringSmall user organisation indicator.
Ywhere the small user postcode is held by an organisationdelivery_point_suffixstringRoyal Mail delivery point suffix
po_boxstringPO Box number. Empty string when not present
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 Elements | Maximum Length |
|---|---|
| Sub Building Name | 30 |
| Building Name | 50 |
| Building Number | 4 |
| Organisation Name | 60 |
| Department Name | 60 |
| PO Box Number | 6 |
| Dependant Thoroughfare + Descriptor | 80 |
| Thoroughfare Name + Descriptor | 80 |
| Double Dependant Locality | 35 |
| Dependant Locality | 35 |
| Post Town | 30 |
| Postcode | 7 |
Note that:
Countydata is not available in the Postcode Address File. This datapoint is no longer used to identify a premise in the UKPremisecan 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 3can 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