Datatypes › United Kingdom › Geographic identifiers
UK postcode sector
ID gb_postcode_sector
DatatypeNot PIIcategoricalDraft
This record is a draft: it has not been reviewed yet and may be incomplete or wrong. Do not rely on it for compliance decisions. Help improve it (see CONTRIBUTING.md).
Postcode sector of a UK postcode: the outward code, a space and the first digit of the inward code (LS27 0). Data published for small areas without full postcodes gives it.
- Parent datatype
- Postal code/index
postindex - Categories
- Geographic identifiers
- Countries
- United Kingdom
- Languages
- English
- Quality
- 85/100 · missing: mapping (Wikidata, Schema.org, ...), translation
- Metacrafter rules
- 1 rule (1 by field name, 0 by value)
gbpostcodesectorfieldfield, gb/gb_geo.yaml
- Supported by tools
- metacrafter
Regular expression
^[A-Z]{1,2}\d[A-Z\d]? \d$
Python re syntax.
Test a value
Examples
| Value | Description |
|---|---|
| LS27 0 | Leeds |
| LS9 7 | Leeds |
| LS15 8 | Leeds |
| LS27 invalid | A postcode district |
| LS27 0AB invalid | A full postcode |
Sources
Use this record
- Page URL:
https://registry.apicrafter.io/datatype/gb_postcode_sector - JSON: API v1 · legacy shape (used by metacrafter) · Markdown (for LLMs)
- Improve it: edit
data/datatypes/GB/geo/gb_postcode_sector.yamlon GitHub