Skip to main content

Lookup a Postcode

This endpoint allows you to retrieve detailed information about a UK postcode.

A successful request returns HTTP status code 200 and a JSON object containing comprehensive postcode data.

If the postcode is not found, the API returns a 404 response. If the postcode was previously active but has since been terminated, the error response will include a terminated property with details about the terminated postcode.

For more details, see the API Documentation

Endpoint

GET https://api.postcodes.io/postcodes/:postcode

Example Request

GET https://api.postcodes.io/postcodes/BR87RE

The above would match any of these inputs: "BR8 7RE", "br87re", "Br8 7rE", etc.

Example Response

{
"status": 200,
"result": {
"postcode": "BR8 7RE",
"quality": 1,
"eastings": 551626,
"northings": 170342,
"country": "England",
"nhs_ha": "South East Coast",
"longitude": 0.178871,
"latitude": 51.411831,
"european_electoral_region": "South East",
"primary_care_trust": "West Kent",
"region": "South East",
"lsoa": "Sevenoaks 001A",
"msoa": "Sevenoaks 001",
"incode": "7RE",
"outcode": "BR8",
"parliamentary_constituency": "Sevenoaks",
"parliamentary_constituency_2024": "Sevenoaks",
"admin_district": "Sevenoaks",
"parish": "Hextable",
"admin_county": "Kent",
"date_of_introduction": "198001",
"admin_ward": "Hextable",
"ced": "Swanley",
"ccg": "NHS Kent and Medway",
"nuts": "Sevenoaks",
"pfa": "Kent",
"nhs_region": "South East",
"ttwa": "London",
"national_park": null,
"bua": "Swanley",
"icb": "NHS Kent and Medway Integrated Care Board",
"cancer_alliance": "Kent and Medway",
"lsoa11": "Sevenoaks 001A",
"msoa11": "Sevenoaks 001",
"lsoa21": "Sevenoaks 001A",
"msoa21": "Sevenoaks 001",
"oa21": "E00169393",
"ruc11": "(England/Wales) Urban city and town",
"ruc21": "Urban: Nearer to a major town or city",
"lep1": "South East",
"lep2": null,
"codes": {
"admin_district": "E07000111",
"admin_county": "E10000016",
"admin_ward": "E05009960",
"parish": "E04012394",
"parliamentary_constituency": "E14001465",
"parliamentary_constituency_2024": "E14001465",
"ccg": "E38000237",
"ccg_id": "91Q",
"ced": "E58000739",
"nuts": "TLJ46",
"lsoa": "E01024445",
"msoa": "E02005087",
"lau2": "E07000111",
"pfa": "E23000032",
"nhs_region": "E40000005",
"ttwa": "E30000234",
"national_park": "E99999999",
"bua": "E63012222",
"icb": "E54000032",
"cancer_alliance": "E56000007",
"lsoa11": "E01024445",
"msoa11": "E02005087",
"lsoa21": "E01024445",
"msoa21": "E02005087",
"oa21": "E00169393",
"ruc11": "C1",
"ruc21": "UN1",
"lep1": "E37000025",
"lep2": null
}
}
}

Terminated Postcode Response

If a postcode is not found but exists in the terminated postcodes dataset (i.e., it was previously a valid postcode but has since been deactivated), the 404 response will include a terminated property:

{
"status": 404,
"error": "Postcode not found",
"terminated": {
"postcode": "AB1 0AA",
"year_terminated": 1996,
"month_terminated": 6,
"longitude": -2.242851,
"latitude": 57.101474
}
}

If the postcode is not found and was never a valid postcode (i.e., not in the terminated dataset), the response will not include the terminated property:

{
"status": 404,
"error": "Postcode not found"
}