Postleitzahlen/Codes postaux (PLZ/NPA4) - Switzerland
This API provides access to a dataset of Swiss postal codes (PLZ/NPA), part of the Geographical repository maintained by Opendatasoft. The underlying data originates from swisstopo, the Swiss Federal Office of Topography, and is based on the Official Directory of Towns and Localities (Amtliches Ortschaftenverzeichnis / Répertoire officiel des localités). The dataset links postcodes to place names and includes enrichment with administrative hierarchy information, such as municipality, district and canton. It can be used to look up or map postal codes across Switzerland and to support geocoding, address validation and administrative analysis at the local level.This dataset is part of the Geographical repository maintained by Opendatasoft. It contains data published by swisstopo about postcodes in Switzerland (Official directory of towns and cities/Amtliches Ortschaftenverzeichnis/Répertoire officiel des localités). Enrichment Administrative hierarchies...
Trust score
How is this computed?Weighted across five axes. Tap a ring for what it measures.
Data schema (12 fields)
Click a field to see example values.
| Fill | Field | Type | Description |
|---|---|---|---|
| — | geo_point_2dGeo Point | geo_point_2d | Geographic centroid coordinates of the postcode area.Geographic centroid coordinates of the postcode area. |
| — | geo_shapeShape | geo_shape | Geometric boundary shape of the postcode area.Geometric boundary shape of the postcode area. |
| — | year | date | Reference year of the postcode data.Reference year of the postcode data. |
| — | kan_codeOfficial code Kanton | text | Official code of the Swiss canton.Official code of the Swiss canton. |
| — | kan_nameOfficial Name Kanton | text | Official name of the Swiss canton.Official name of the Swiss canton. |
| — | bez_codeOfficial code Bezirk | text | Official code(s) of the district (Bezirk).Official code(s) of the district (Bezirk). |
| — | bez_nameOfficial Name Bezirk | text | Official name(s) of the district (Bezirk).Official name(s) of the district (Bezirk). |
| — | gem_codeOfficial code Gemeinde / Hoheitsgebiete | text | Official code(s) of the municipality (Gemeinde).Official code(s) of the municipality (Gemeinde). |
| — | gem_nameOfficial Name Gemeinde / Hoheitsgebiete | text | Official name(s) of the municipality (Gemeinde).Official name(s) of the municipality (Gemeinde). |
| — | plz_codeOfficial code Postleitzahl (PLZ/NPA4) | text | Official Swiss postcode (PLZ/NPA4).Official Swiss postcode (PLZ/NPA4). |
| 100% | plz_area_codeIso 3166-3 Area Code | text | ISO 3166-1 alpha-3 country code for the area.ISO 3166-1 alpha-3 country code for the area. |
| 100% | plz_typeType | text | Type classification of the postcode entry.Type classification of the postcode entry. |
Schema captured from opendatasoft 6 days ago.
Query the data
Pick columns and a sort, then fetch a live preview straight from the source. Choose an API-filterable column (marked ▾) under “Where” to pick from its list of values.
Sample data (5 records)
Record 1year: 2025 · bez_code: ["2225","2226"]
{
"year": "2025",
"bez_code": [
"2225",
"2226"
],
"bez_name": [
"Lausanne",
"Lavaux-Oron"
],
"gem_code": [
"5586",
"5590"
],
"gem_name": [
"Lausanne",
"Pully"
],
"kan_code": [
"22"
],
"kan_name": [
"Vaud"
],
"plz_code": [
"1006"
],
"plz_type": "ZIP4/PLZ4/NPA4",
"geo_shape": "[large value omitted]",
"geo_point_2d": {
"lat": 46.49118631526864,
"lon": 6.6348909423873845
},
"plz_area_code": "CHE"
}Record 2year: 2025 · bez_code: ["2223","2224"]
{
"year": "2025",
"bez_code": [
"2223",
"2224"
],
"bez_name": [
"Gros-de-Vaud",
"Jura-Nord vaudois"
],
"gem_code": [
"5512",
"5680",
"5693",
"5903",
"5923"
],
"gem_name": [
"Bercher",
"Bioley-Magnoux",
"Montanaire",
"Ogens",
"Oppens"
],
"kan_code": [
"22"
],
"kan_name": [
"Vaud"
],
"plz_code": [
"1045"
],
"plz_type": "ZIP4/PLZ4/NPA4",
"geo_shape": "[large value omitted]",
"geo_point_2d": {
"lat": 46.709296962645084,
"lon": 6.7236449800292375
},
"plz_area_code": "CHE"
}Record 3year: 2025 · bez_code: ["2227"]
{
"year": "2025",
"bez_code": [
"2227"
],
"bez_name": [
"Morges"
],
"gem_code": [
"5621",
"5622",
"5634",
"5645",
"5654"
],
"gem_name": [
"Aclens",
"Bremblens",
"Echichens",
"Romanel-sur-Morges",
"Vullierens"
],
"kan_code": [
"22"
],
"kan_name": [
"Vaud"
],
"plz_code": [
"1113"
],
"plz_type": "ZIP4/PLZ4/NPA4",
"geo_shape": "[large value omitted]",
"geo_point_2d": {
"lat": 46.54619144876906,
"lon": 6.4916691167435046
},
"plz_area_code": "CHE"
}Record 4year: 2025 · bez_code: ["2227"]
{
"year": "2025",
"bez_code": [
"2227"
],
"bez_name": [
"Morges"
],
"gem_code": [
"5623",
"5636",
"5639",
"5640",
"5646",
"5649",
"5652"
],
"gem_name": [
"Buchillon",
"Etoy",
"Lully (VD)",
"Lussy-sur-Morges",
"Saint-Prex",
"Tolochenaz",
"Villars-sous-Yens"
],
"kan_code": [
"22"
],
"kan_name": [
"Vaud"
],
"plz_code": [
"1162"
],
"plz_type": "ZIP4/PLZ4/NPA4",
"geo_shape": "[large value omitted]",
"geo_point_2d": {
"lat": 46.46831127021316,
"lon": 6.469258968589775
},
"plz_area_code": "CHE"
}Record 5year: 2025 · bez_code: —
{
"year": "2025",
"bez_code": null,
"bez_name": null,
"gem_code": [
"6606",
"6623",
"6630",
"6643"
],
"gem_name": [
"Bellevue",
"Le Grand-Saconnex",
"Meyrin",
"Vernier"
],
"kan_code": [
"25"
],
"kan_name": [
"Genève"
],
"plz_code": [
"1215"
],
"plz_type": "ZIP4/PLZ4/NPA4",
"geo_shape": "[large value omitted]",
"geo_point_2d": {
"lat": 46.23471321442163,
"lon": 6.106369169037876
},
"plz_area_code": "CHE"
}Live sample captured at profiling time — values may have changed upstream.
Verification Status
Using the API
Configuration
- Base URL
- https://public.opendatasoft.com/api/explore/v2.1/catalog/datasets/georef-switzerland-postleitzahl
License
Terms stated by the source (not a recognized license):
Custom License (see reference link)
Query examples
curl -s 'https://public.opendatasoft.com/api/explore/v2.1/catalog/datasets/georef-switzerland-postleitzahl/records?limit=20' -H 'Accept: application/json'First 20 records of the dataset as JSON.
Uses the Opendatasoft Explore v2.1 syntax — supports select, where, group_by and order_by.
Rate limits
Dataset
Volume & freshness
License
No license declared upstream.
Source: opendatasoft
Machine-readable & source
Embed this badge in a README or wiki — it always shows the latest verification state and quality tier.