uprns.io
API Reference

The uprns.io JSON API

Resolve any UK UPRN, postcode or USRN over plain HTTP. No key, no SDK - just a URL and an Accept header.

Quick start

Look up a single property in one request. The example below resolves UPRN 100023336956 - a property on Downing Street, Westminster.

Base URLhttps://uprns.io

Building a client? Download the OpenAPI 3.1 schema - JSON or YAML - and generate types in your language of choice.

curl -H "Accept: application/json" \
     https://uprns.io/uprn/100023336956
const res = await fetch(
  "https://uprns.io/uprn/100023336956",
  { headers: { Accept: "application/json" } }
);
const record = await res.json();
import requests

r = requests.get(
    "https://uprns.io/uprn/100023336956",
    headers={"Accept": "application/json"},
)
record = r.json()
Response · 200 OK
{
  "uprn": "100023336956",
  "latitude": 51.503541,
  "longitude": -0.12767,
  "easting": 530047,
  "northing": 179951,
  "country": "England",
  "region": "London",
  "local_authority": "Westminster",
  "usrn": "8400071",
  "postcode": "SW1A 2AA"
}

Content negotiation

Every endpoint serves a human-readable HTML page to browsers and structured JSON to API clients from the same URL. Request JSON in either of two ways:

MethodHow
Accept headerAccept: application/json - preferred for API clients.
SuffixAppend .json to the path, e.g. /uprn/100023336956.json - handy in a browser.

Rate limits & attribution

The API is rate-limited on a fair-use basis per IP. Typical interactive and batch use sits well within the limit; if you need the whole dataset, take the Parquet downloads instead of crawling endpoints.

The data is published under the Open Government Licence v3.0. You must acknowledge the source with the attribution statement: “Contains OS data © Crown copyright and database right 2026”, alongside ONS where postcode geography is used.

UPRN lookup

GET/uprn/:uprn

Returns the canonical record for a single Unique Property Reference Number - coordinates, full administrative geography and linked identifiers.

Path parameters

NameTypeDescription
uprnstringRequired. The UPRN, a 1-12 digit number. Leading zeros are not used.
Example
curl -H "Accept: application/json" https://uprns.io/uprn/100023336956
# -> 200 OK · UprnRecord

Returns a UprnRecord. Responds 404 with an Error body if the UPRN is unknown.

USRN lookup

GET/usrn/:usrn

Returns a street record and the UPRNs that sit on it. The linked UPRN list is paginated.

Path & query parameters

NameTypeDescription
usrnstringRequired. The Unique Street Reference Number.
pageintegerOptional. 1-based page of linked UPRNs. 50 per page.

Returns a UsrnRecord.

Postcode lookup

GET/postcode/:postcode

Returns the administrative geography for a postcode and the UPRNs whose nearest postcode it is. The UPRN list is paginated.

Path & query parameters

NameTypeDescription
postcodestringRequired. Case- and space-insensitive, e.g. sw1a2aa or SW1A 2AA.
pageintegerOptional. 1-based page of UPRNs. 50 per page.

Returns a PostcodeRecord.

UprnRecord

The full record for a UPRN. Human-readable names are returned alongside their ONS codes.

FieldTypeDescription
uprnstringUnique Property Reference Number, 1-12 digits. Persistent; never reused.
longitudenumber | nullETRS89 longitude (OS Open UPRN).
latitudenumber | nullETRS89 latitude (OS Open UPRN).
eastingsinteger | nullBritish National Grid easting (X), 1m resolution.
northingsinteger | nullBritish National Grid northing (Y), 1m resolution.
postcodestring | nullAuthoritative postcode for this UPRN (ONS UPRN Directory PCDS). Not a nearest-postcode approximation.
usrnstring | nullUSRN of the street this property sits on (OS Open Linked Identifiers, highest-confidence link).
toidstring | nullTopographicArea TOID of the building footprint (OS Open Linked Identifiers).
road_link_toidstring | nullRoadLink TOID of the nearest road segment (OS Open Linked Identifiers).
townstring | nullNearest populated place (OS Open Names) - the town or settlement this UPRN sits in.
best_fitobject2021 Census geographies assigned by ONS's population-weighted best-fit methodology (National Statistics UPRN Lookup). Use these to match official ONS statistical outputs; they may differ from the authoritative point-in-polygon values near boundaries.
countrystring | nullUK constituent country (England, Scotland or Wales).
regionstring | nullRegion (formerly Government Office Region). England only.
admin_countystring | nullAdministrative county. Null where the location falls outside a county-level authority.
admin_districtstring | nullLocal authority district or unitary authority.
admin_wardstring | nullElectoral / administrative ward.
parishstring | nullCivil parish (England) or community (Wales).
cedstring | nullCounty electoral division. England county areas only.
parliamentary_constituencystring | nullUK Parliamentary constituency, July 2024 boundaries.
senedd_constituencystring | nullSenedd Cymru (Welsh Parliament) constituency. Wales only, derived by spatial join.
senedd_constituency_nointeger | nullSenedd Cymru constituency number (1-16). Wales only.
lsoastring | null2021 Census LSOA name. In Scotland this is the Data Zone.
msoastring | null2021 Census MSOA name. In Scotland this is the Intermediate Zone.
oastring | null2021 Census Output Area code - the smallest census geography.
lsoa11string | null2011 Census LSOA name.
msoa11string | null2011 Census MSOA name.
workplace_zonestring | null2011 Census Workplace Zone code.
output_area_classificationstring | null2021 ONS Output Area Classification (supergroup/group/subgroup) name.
rural_urbanstring | null2021 Rural-Urban Classification.
built_up_areastring | nullBuilt-up Area (2024).
ttwastring | nullTravel to Work Area - where most people both live and work.
national_parkstring | nullNational Park this location falls within, if any.
index_of_multiple_deprivationinteger | nullIMD rank for this location's LSOA. Lower ranks are more deprived. Scales differ per country and are not comparable across them.
sub_icbstring | nullNHS Sub-ICB Location (formerly CCG). England only.
nhs_england_regionstring | nullNHS England Region. England only.
nhs_hastring | nullNHS health authority area (Health Board in Scotland/Wales).
primary_care_truststring | nullPrimary care organisation. Naming differs across UK regions.
cancer_alliancestring | nullCancer Alliance. England only.
pfastring | nullPolice force area.
lep1string | nullPrimary Local Enterprise Partnership (historic; LEPs wound down 2024).
lep2string | nullSecondary Local Enterprise Partnership, where overlapping.
european_electoral_regionstring | nullEuropean Electoral Region (historic).
nutsstring | nullITL code (formerly NUTS). Retained under the `nuts` name for backward compatibility.
codesobjectOfficial GSS codes for the geographies named on the parent object. Pseudo codes (e.g. E99999999) denote 'not applicable'.

UsrnRecord

FieldTypeDescription
usrnstringUnique Street Reference Number.
namestring | nullDerived street name (OS Open Roads via OS Open Linked Identifiers). Null for unnamed streets.
street_typestring | nullOS Open USRN street type: Designated Street Name, Numbered Street, Unnamed Street, or Privately Maintained Street.
road_classificationstring | nullOS Open Roads classification (A Road, B Road, Motorway, Unclassified, ...). Null where no road link is matched.
road_classification_numberstring | nullRoad number such as A38 or M32, where classified.
local_authoritystring | nullLocal authority district the street centroid falls within.
longitudenumber | nullWGS84 longitude of the street centroid.
latitudenumber | nullWGS84 latitude of the street centroid.
bboxobject | nullWGS84 bounding box of the street geometry. Null where no geometry is stored.
uprn_countintegerNumber of UPRNs linked to this USRN.
uprnsstring[]UPRNs linked to this USRN (OS Open Linked Identifiers).

PostcodeRecord

FieldTypeDescription
postcodestringPostcode in canonical form.
longitudenumber | nullWGS84 longitude of the postcode centroid.
latitudenumber | nullWGS84 latitude of the postcode centroid.
eastingsinteger | nullBritish National Grid easting of the centroid.
northingsinteger | nullBritish National Grid northing of the centroid.
uprn_countintegerNumber of UPRNs assigned to this postcode.
uprnsstring[]UPRNs assigned to this postcode. Large postcodes are paginated by the page surface; the JSON record carries the full list.
countrystring | nullUK constituent country (England, Scotland or Wales).
regionstring | nullRegion (formerly Government Office Region). England only.
admin_countystring | nullAdministrative county. Null where the location falls outside a county-level authority.
admin_districtstring | nullLocal authority district or unitary authority.
admin_wardstring | nullElectoral / administrative ward.
parishstring | nullCivil parish (England) or community (Wales).
cedstring | nullCounty electoral division. England county areas only.
parliamentary_constituencystring | nullUK Parliamentary constituency, July 2024 boundaries.
senedd_constituencystring | nullSenedd Cymru (Welsh Parliament) constituency. Wales only, derived by spatial join.
senedd_constituency_nointeger | nullSenedd Cymru constituency number (1-16). Wales only.
lsoastring | null2021 Census LSOA name. In Scotland this is the Data Zone.
msoastring | null2021 Census MSOA name. In Scotland this is the Intermediate Zone.
oastring | null2021 Census Output Area code - the smallest census geography.
lsoa11string | null2011 Census LSOA name.
msoa11string | null2011 Census MSOA name.
workplace_zonestring | null2011 Census Workplace Zone code.
output_area_classificationstring | null2021 ONS Output Area Classification (supergroup/group/subgroup) name.
rural_urbanstring | null2021 Rural-Urban Classification.
built_up_areastring | nullBuilt-up Area (2024).
ttwastring | nullTravel to Work Area - where most people both live and work.
national_parkstring | nullNational Park this location falls within, if any.
index_of_multiple_deprivationinteger | nullIMD rank for this location's LSOA. Lower ranks are more deprived. Scales differ per country and are not comparable across them.
sub_icbstring | nullNHS Sub-ICB Location (formerly CCG). England only.
nhs_england_regionstring | nullNHS England Region. England only.
nhs_hastring | nullNHS health authority area (Health Board in Scotland/Wales).
primary_care_truststring | nullPrimary care organisation. Naming differs across UK regions.
cancer_alliancestring | nullCancer Alliance. England only.
pfastring | nullPolice force area.
lep1string | nullPrimary Local Enterprise Partnership (historic; LEPs wound down 2024).
lep2string | nullSecondary Local Enterprise Partnership, where overlapping.
european_electoral_regionstring | nullEuropean Electoral Region (historic).
nutsstring | nullITL code (formerly NUTS). Retained under the `nuts` name for backward compatibility.
codesobjectOfficial GSS codes for the geographies named on the parent object. Pseudo codes (e.g. E99999999) denote 'not applicable'.

Error

All non-2xx responses share one shape.

FieldTypeDescription
statusintegerHTTP status code.
errorstringHuman-readable error message.
Response · 404 Not Found
{ "code": 404, "message": "No UPRN found for 999999999999" }