---
id: "hu_county_code"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["geo", "government"]
country: ["HU"]
langs: ["hu"]
quality: 90
url: "https://registry.apicrafter.io/datatype/hu_county_code"
---

# Hungarian county code (`hu_county_code`)

> **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.

Two-digit number of a Hungarian county (megye) or the capital. The numbering depends on the publisher: the NEAK health insurance lists number the counties alphabetically (01 Baranya, 05 Csongrád-Csanád, 08 Hajdú-Bihar), while the KSH area codes put Budapest first. The county name is hu_county.

- Parent datatype: `category`
- Personal data (PII): no
- Categories: Geographic identifiers (geo), Government related (government)
- Countries: Hungary (HU)
- Languages: Hungarian (hu)
- Classification: categorical

## Detection

Regular expression (Python `re`):

```
^(?:0[1-9]|1\d|20)$
```

## Examples

- `01` — Baranya (NEAK)
- `05` — Csongrád-Csanád (NEAK)
- `08` — Hajdú-Bihar (NEAK)
- `21` (invalid example) — No such county

## Metacrafter rules

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

- `hucountycodebyfield` (field, `hu/hu_common.yaml`)

## Supported by tools

- `metacrafter`

## Translations

- hu: Megye kód

## Sources

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

## Quality

Score 90/100. Missing: mapping (Wikidata, Schema.org, ...).

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