Part of a Data Solution
- Explore →
Postal Codes Solution
Every worldwide postal-code dataset in one bundle — the ultimate global reference for precise postal codes.
Premium
You're viewing a free sample
Get the complete dataset — all rows and files — delivered instantly after checkout, with lifetime access to the latest version.
- Secure checkout via Stripe
- Instant download after payment
- Lifetime access to the latest version
- Creative Commons Attribution 4.0 license
API Access
Access dataset files directly from scripts, code, or AI agents.
Browse dataset files
API Access
Access dataset files directly from scripts, code, or AI agents.
Each file has a stable URL (r-link) that you can use directly in scripts, apps, or AI agents. These URLs are permanent and safe to hardcode.
Start with these files — they give you everything you need to understand and access the dataset.
- 1. Fetch datapackage.yaml to inspect schema and resources
- 2. Download data resources listed in datapackage.yaml
- 3. Read README.md for full context
Data Files
postal-codes-de-sample
| Field | Type | Description | Constraints | Title |
|---|---|---|---|---|
| country_code | string | ISO 3166-1 alpha-2 country code - always DE | { "pattern": "^DE$", "required": true } | Country Code |
| postal_code | string | Five-digit German postal code (Postleitzahl) | { "pattern": "^\\d{5}$", "required": true } | Postal Code |
| place_name | string | Name of the town, city or locality (Ort) | Place Name | |
| admin_name1 | string | Federal state name (Bundesland, e.g. Bayern) | Administrative Name 1 | |
| admin_code1 | string | Federal state code, ISO 3166-2:DE without the DE- prefix (e.g. BY, NW, BE) | Administrative Code 1 | |
| admin_name2 | string | Government region (Regierungsbezirk) where one exists - most states have no such tier, so this is often blank | Administrative Name 2 | |
| admin_code2 | string | Numeric code for the government region where present | Administrative Code 2 | |
| admin_name3 | string | District (Kreis / Landkreis / kreisfreie Stadt) | Administrative Name 3 | |
| admin_code3 | string | Numeric district key (Kreisschluessel) | Administrative Code 3 | |
| latitude | number | Latitude (WGS84, decimal degrees) | Latitude | |
| longitude | number | Longitude (WGS84, decimal degrees) | Longitude | |
| accuracy | string | GeoNames accuracy of latitude/longitude. GeoNames documents 1=estimated, 4=geonameid, 6=centroid of addresses or shape; other values (e.g. 3) occur upstream without documentation. Empty where GeoNames gives none. | Accuracy | |
| alternative_city_name | string | Alternative or historic name for the place where known | Alternative City Name |
Download
Download sample CSVAbout
- Last updated
- 6 October 2026
- Total rows
- 100
- Format
- CSV
- File size
- 13.7 kB
About this dataset
Germany (DE) — internal licensing notes
Not mentioned in datahub-next#941 — no known licensing flag on this country. Source: GeoNames DE postal export, CC BY 4.0 (attribution required, commercial resale permitted, no share-alike).
Session finding, 2026-08-19
While auditing pipeline self-containment across the postal-codes product,
found de/scripts/ existed only as uncommitted local files with hardcoded
paths from another repo. Fixed to be self-contained; rebuild from a fresh
GeoNames DE.txt fetch produces 23,297 rows vs 23,293 live on R2 — not an
error, the rebuild fixes two real bugs present in the live copy: the
current R2 file was built by a different generic script
(scripts/geonames/geonames_parse_to_R2.py) with pandas and no dtype=str,
which float-coerces numeric-looking admin codes (losing leading zeros) and
drops hyphens from compound place names (e.g. "Rehburg-Loccum" ->
"RehburgLoccum"). resolve_duplicates.py's hand-verified 4-row rule table is
keyed to the old buggy text and needs a follow-up update to match the
corrected spellings before a real publish, if exact row-count parity with
the current live file matters.
Superseded (2026-10-05, SST migration): the follow-up no longer applies. The
SST producer drops resolve_duplicates.py's table; on verbatim GeoNames names
there are no duplicate keys, and a duplicate now stops the build. See
.migration-notes.md.
No licensing review beyond confirming GeoNames CC BY 4.0 as the source — this was a code-reproducibility audit, not a licence audit.