---
id: "ch_egid"
kind: "datatype"
status: "draft"
is_pii: false
name: "Swiss federal building identifier (EGID)"
regexp: "^(?:[1-9]\\d{0,7}|[1-8]\\d{8}|900000000)$"
categories: ["realestate", "government"]
country: ["CH"]
langs: ["common"]
quality: 100
url: "https://registry.apicrafter.io/datatype/ch_egid"
---

# Swiss federal building identifier (EGID) (`ch_egid`)

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

Number that the Federal Register of Buildings and Dwellings (GWR) of the Swiss Federal Statistical Office gives every building in Switzerland. It is a whole number from 1 to 900 000 000, is unique across the country and does not change while the building stands. Cantonal and municipal registers, the cadastral survey and energy and address datasets carry it in a field named EGID.

- Parent datatype: [`id`](https://registry.apicrafter.io/datatype/id.md)
- Personal data (PII): no
- Categories: Real estate (realestate), Government related (government)
- Countries: Switzerland (CH)
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^(?:[1-9]\d{0,7}|[1-8]\d{8}|900000000)$
```

## Examples

- `2347546` — a building in the canton of Basel-Landschaft (open data of data.bl.ch)
- `245066895` — a nine-digit EGID of the same register
- `900000001` (invalid example) — above the range of the register
- `0` (invalid example)

## Mappings

- wikidata: [`P9665`](https://www.wikidata.org/wiki/Property:P9665)

## Metacrafter rules

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

- `chegidbyname` (field, `ch/ch_codes.yaml`)

## Supported by tools

- [`metacrafter`](https://registry.apicrafter.io/tool/metacrafter.md)

## Translations

- de: Eidgenössischer Gebäudeidentifikator (EGID)
- fr: Identificateur fédéral de bâtiment (EGID)
- ru: Федеральный идентификатор здания Швейцарии (EGID)

## Sources

- doc: <https://dam-api.bfs.admin.ch/hub/api/dam/assets/7008785/master>
- wikidata: <https://www.wikidata.org/wiki/Property:P9665>

## Quality

Score 100/100.

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