---
id: "espostcode"
kind: "pattern"
status: "draft"
is_pii: true
categories: ["geo"]
country: ["ES", "MX"]
langs: ["es"]
quality: 60
url: "http://registry.apicrafter.io/datatype/espostcode"
---

# Spanish postal code (by language) (`espostcode`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Spanish postal code (by language)

- Pattern of: `postindex`
- Personal data (PII): yes
- Categories: Geographic identifiers (geo)
- Countries: Spain (ES), Mexico (MX)
- Languages: Spanish (es)
- Classification: categorical

## Detection

Regular expression (Python `re`):

```
\d{5}
```

## Examples

- `07002` — Palma, Majorca
- `27722` — Veigas, Asturias

## Mappings

- fta: `POSTAL_CODE.POSTAL_CODE_ES`
- stdnum: `es.postal_code`

## Metacrafter rules

1 rules: 1 match the field name, 0 match values.

- `espostcodefield` (field, `es/es_geo.yaml`)

## Supported by tools

- `fta`
- `metacrafter`
- `pythonstdnum`

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/Postal_codes_in_Spain>

## Quality

Score 60/100. Missing: description, anchored regexp, negative example, translation.

JSON: <http://registry.apicrafter.io/api/v1/datatypes/espostcode.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/ES/geo/espostcode.yaml>
