Details of a UK postcode
GET/GetPostcode/{postcode}
- Passive: the target is not contacted
Returns latitude, longitude, quality, constituency, district, ward, county, region, country, population (2011), households (2011), post town and more. Some values can be empty. Postcode districts and sectors return only latitude, longitude, population and households. Tab-separated text by default; output=json gives JSON.
Path parameters
postcodeThe postcode to get details for
Query parameters
outputFormat of the returned data; overrides the Accept header
Response fields · 13ShowHide
postcode
The postcode
latitude
Latitude
longitude
Longitude
quality
How well the position matches
district
District
ward
Ward
county
County
region
Region
country
Country
population
Population in 2011
households
Number of households in 2011
postTown
Post town
inUse
Whether the postcode is in use
curl 'https://www.doogal.co.uk/GetPostcode/KT5%208AN'{
"postcode": "AB1 2CD",
"latitude": 51.5,
"longitude": -0.1,
"quality": "Within the building of the matched address closest to the postcode mean",
"district": "Example District",
"ward": "Example Ward",
"county": "Example County",
"region": "London",
"country": "England",
"population": 75,
"households": 31,
"postTown": "Example Town",
"inUse": "Yes"
}