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 International 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-dk-sample
| Field | Type | Description | Constraints | Title |
|---|---|---|---|---|
| country_code | string | ISO 3166-1 alpha-2 -- always DK | Country Code | |
| postal_code | string | Danish postal code (4 digits) | { "pattern": "^\\d{4}$" } | Postal Code |
| place_name | string | Postdistrikt (postal district) name, as maintained by DAWA/PostNord | Place Name | |
| admin_name1 | string | Region -- all 5 covered | Administrative Name 1 | |
| admin_code1 | string | ISO 3166-2:DK code, country prefix stripped (e.g. 84 for DK-84) | Administrative Code 1 | |
| admin_name2 | string | Kommune (municipality) -- 99/99 covered, including Christianso; 8 postal codes deliberately re-pointed from the source's first-listed municipality to ensure full coverage, see ATTRIBUTION.txt | Administrative Name 2 | |
| admin_code2 | string | DAWA kommune kode (4-digit) -- no ISO code exists at this tier for Denmark | Administrative Code 2 | |
| admin_name3 | string | Not populated -- Postdistrikt (place_name) is not a distinct third administrative tier in Denmark's own structure | Administrative Name 3 | |
| admin_code3 | string | Not populated | Administrative Code 3 | |
| latitude | number | DAWA visueltcenter (visual center of the postal code's polygon), WGS84, 5dp | Latitude | |
| longitude | number | DAWA visueltcenter, WGS84, 5dp | Longitude | |
| accuracy | string | AREA throughout -- per-code polygon visual center, not a street/address-level point | Accuracy | |
| alternative_city_name | string | Not populated in this release -- DAWA carries no alternate-name field | Alternative City Name |
Download
Download sample CSVAbout
- Last updated
- 12 October 2026
- Total rows
- 100
- Format
- CSV
- File size
- 8.64 kB
- Sources
- DAWA / Dataforsyningen (Klimadatastyrelsen) -- Danish postal districts and municipalities, snapshot of 2026-08-29 (DAWA has since been retired)
- Datafordeler DAR (Danmarks Adresseregister) -- live postal code and name check
- Statistics Denmark, StatBank table FOLK1A -- regions and municipalities (CC BY 4.0 equivalent)
About this dataset
Denmark (DK): migration notes
Internal record of the P5 migration. This is a dated record (2026-10-12) and is not shipped in the zip.
- Issue: datopian/postal-codes#41 (pc-28e.7.16)
- Producer:
scripts/produce.py(+test_produce.py),pipeline: producer: custom, refresh disabled - Parity:
format-only, gate pass: 1,089 rows, 0 changed, identical to the live zip
What the producer does
DAWA (api.dataforsyningen.dk, dawa.aws.dk) returns 410 Gone for good, so the old builder could not run. The producer therefore builds from a committed snapshot of the last DAWA postal-code response (scripts/postnumre.csv, fetched 2026-08-29, the same data the live file was built from). That is the only committed input: no anonymous source gives a postal code's municipalities or the visual centre of its polygon (DAGI needs an API key, DAR has neither). The 99 municipalities with their 5 regions are fetched live from Statistics Denmark's open StatBank API (table FOLK1A), and the Datafordeler DAR REST postnummer register is fetched live as a freshness check only: if its codes or names differ from the snapshot, the producer fails instead of shipping stale data.
Statistics Denmark's municipality list equals the old DAWA kommuner.csv exactly (99 codes, names, regions). Licence: its source-reference page says all StatBank data may be used commercially, equivalent to CC BY 4.0, with the source stated and any processing stated (https://www.dst.dk/en/presse/kildeangivelse, read 2026-10-12). The 8 hand-pinned municipalities (2770 3760 2610 2650 2605 2730 8970 4291) carry over.
Cross-checks (2026-10-12)
| Check | Result |
|---|---|
| Live DAR register vs ours | same 1,089 codes, 1,089/1,089 names equal; DAR postnummerinddeling equals the snapshot dagi_id for 1,089/1,089 |
| GeoNames DK (check only) | all 1,089 codes present, names equal 1,089/1,089; GeoNames has 70 extra codes (PO-box and special ranges, e.g. 0800, 0900, 1001-1015) that stay out, as in the live file |
| Admin | region/municipality pairs consistent on every row; 99/99 municipalities, 5/5 regions; for all 246 multi-municipality codes the chosen municipality is one of those listed (first-listed for 238, pinned for 8) |
| Random 100 rows (seed 20261012) vs the original DAWA JSON | 100/100 name and coordinate equal |
| Coordinates vs GeoNames | median 0.4 km, p90 5.1 km; 23 rows more than 25 km away (see below) |
Finding: 12 west-coast coordinates are in the North Sea
The coordinate is DAWA's visueltcenter, the visual centre of the postal polygon, and on the Jutland west coast the polygons include sea. Twelve rows have a point offshore (longitude below 8.0E; the Jutland coast is at about 8.1E): 6950 Ringkøbing (4.07E, 256 km from the town), 6960 Hvide Sande, 6854 Henne, 7650 Bøvlingbjerg, 6853 Vejers Strand, 7680 Thyborøn, 6857 Blåvand, 7770 Vestervig, 7755 Bedsted Thy, 7752 Snedsted, 6720 Fanø, 7700 Thisted. A further ten rows (Hjørring, Hirtshals, Bornholm and others) are 26-48 km from GeoNames but on land or near the coast. This is inherited from the live file, so the producer reproduces it. The repo rule is that a plausible-looking wrong point is worse than an empty cell.
Options: (1) blank those 12 (safe, 1.1% of rows, changes the file); (2) leave as live; (3) replace with GeoNames' point (mixes two sources and adds CC BY credit to an AREA field).
Decisions
| Decision | By | Basis |
|---|---|---|
| Build the producer from the committed snapshot + DAR freshness check | User, 2026-10-12 ("go and build denmark and cross check") | Researcher recommendation, option D |
| README/ATTRIBUTION name Klimadatastyrelsen (earlier SDFI) | Agent | Agency name per the Datafordeler terms pages; owner to confirm |
Open questions
- The 12 offshore coordinates (above).
- 2027-01-15: Datafordeler closes anonymous REST. After that the freshness check needs an API key, and a durable source means DAGI (postal-code polygons, municipalities, regions) via the keyed GraphQL / file download, with visual centres recomputed (small coordinate shifts). Needs a free Datafordeler registration.
- PostNord's own terms could not be read (site blocked); the registers state CC BY.