Look up UK postcode geography
postcode_lookupResolve a UK postcode to its geography — coordinates, local authority, ward, constituency, LSOA/MSOA/output area, police force, rural-urban class and deprivation rank.
One fast call with no downstream data fetching. Use it to check a postcode exists, to get the codes needed for other datasets, or when you only need where somewhere is rather than what it is like.
Args:
postcode (string): UK postcode, spaces optional
response_format ('markdown' | 'json'): default 'markdown'
Returns: Coordinates, administrative geography, statistical geography codes (LSOA/MSOA/OA — these are the keys most UK open datasets are published against), and the deprivation rank with the index it came from.
Examples:
"Where is SW11 1AA?" -> postcode="SW11 1AA"
"What LSOA covers M1 1AE?" -> postcode="M1 1AE"
"Is XY1 2AB a real postcode?" -> postcode="XY1 2AB" (returns an error with suggestions)
Don't use when: you want data about the area — use postcode_report instead.
Note: deprivation ranks are NOT comparable between UK nations. Each nation ranks its own areas against its own index, over a different number of areas; the index and its size are returned so you do not compare them by mistake.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| postcode | Yes | A UK postcode, e.g. "SW11 1AA" | |
| response_format | No | 'markdown' to read, 'json' for the structured record | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lsoa | Yes | ||
| msoa | Yes | ||
| ward | Yes | ||
| region | Yes | ||
| country | Yes | ||
| latitude | Yes | ||
| postcode | Yes | ||
| longitude | Yes | ||
| output_area | Yes | ||
| rural_urban | Yes | ||
| constituency | Yes | ||
| police_force | Yes | ||
| national_park | Yes | ||
| local_authority | Yes | ||
| deprivation_rank | Yes | ||
| deprivation_index | Yes |