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-dz-sample
| Field | Type | Description | Constraints | Title |
|---|---|---|---|---|
| country_code | string | ISO 3166-1 alpha-2 -- always DZ | Country Code | |
| postal_code | string | Algerian postal code (5 digits) | { "pattern": "^\\d{5}$" } | Postal Code |
| place_name | string | Post office / locality name | Place Name | |
| admin_name1 | string | Wilaya (province) -- 48/69 current wilayas covered | Administrative Name 1 | |
| admin_code1 | string | ISO 3166-2:DZ wilaya code (zero-padded, e.g. DZ-01) | { "pattern": "^DZ-\\d{2}$" } | Administrative Code 1 |
| admin_name2 | string | Not populated -- no second admin tier in this source | Administrative Name 2 | |
| admin_code2 | string | Not populated | Administrative Code 2 | |
| admin_name3 | string | Not populated | Administrative Name 3 | |
| admin_code3 | string | Not populated | Administrative Code 3 | |
| latitude | number | GeoNames latitude (WGS84) | Latitude | |
| longitude | number | GeoNames longitude (WGS84) | 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 | Not populated in this release | Alternative City Name |
Download
Download sample CSVAbout
- Last updated
- 6 October 2026
- Total rows
- 100
- Format
- CSV
- File size
- 5.58 kB
About this dataset
Algeria (DZ): migration notes
Internal record of the P5 migration from the old scripts to the producer: the discrepancies found, their causes, and who decided what. This is a dated record, so the numbers are as of the migration and not kept current. It is not shipped in the zip.
- Issue: pc-28e.7.17 (closed 2026-10-02)
- Commit:
5ac2f15(worktree commitd19dd2e, same content), landed in batch 1 - Parity verdict:
explained(row_order×1); signed off by the user - Producer:
custom, refresh disabled
Sources
| Input | URL | Notes |
|---|---|---|
| GeoNames postal export | https://download.geonames.org/export/zip/DZ.zip | The only input the old builder used |
Parity against the live zip (2026-10-02)
Rows: 15,951 live and 15,951 fresh, none only on one side, 0 changed cells.
| Difference | Cause |
|---|---|
row_order | GeoNames lists place names in a different order inside some postal codes. The postal_code sequence is identical line for line, and the sorted row sets are identical. Example: in 01000, line 2 is "Adrar Cite Zerrari Med" in live and "Ouled Oungal" in fresh. |
| Line endings | Live used CRLF (the old DictWriter); fresh uses LF. Parity ignores this. |
Decisions
| Decision | By | Basis |
|---|---|---|
Accept row_order | User, 2026-10-02 ("I sign off on the row order", session 2479b1c9-…) | Batch 1 sign-off; recorded in docs/parity/p5.md |
| Only wilaya codes 01–48 accepted; any other code stops the build | Agent | The 21 wilayas created since 2019 (49–69) are missing upstream; a GeoNames update will be noticed rather than mis-mapped |
| Remove row and distinct-code counts from README and the descriptor; keep "48/69 wilayas" | Orchestrator instruction (user's README counts rule) | Also dropped "– 0 collisions" from the primary-key sentence; the producer now enforces uniqueness |
| Leave ATTRIBUTION.txt verbatim (it still says "15,951 rows") | Orchestrator instruction | The user then said ATTRIBUTION files shouldn't carry row counts and asked for a bead to fix it later (session 2479b1c9-…); see open questions |
Drop the stale licence_status.decision README sentence; one accuracy wording | Orchestrator, after the user said "Fix the small doc problems you've noticed" (session 2479b1c9-…) | Follow-up commits b7fb93b and 5311ad3 (the second makes the wording admit undocumented values such as 3) |
Transforms carried over
From build_postal_codes_product.py (2026-09-17 packaging audit, which fixed bugs in the shared GeoNames pipeline):
admin_code1→ ISO 3166-2:DZ: zero-padding kept,DZ-added, nothing renumbered.accuracykept as the raw integer string, never1.0.admin_name2/admin_name3blank (GeoNames has no data at those tiers), never the literal "nan".alternative_city_nameempty.- The old asserts are now
ProducerErrors: bad row shape or country, unexpected admin2/admin3 data, unknown wilaya, any of the 48 wilayas missing, non-integer accuracy, a literal "nan", a duplicate (postal_code, place_name). No row-count assert.
Open questions
- ATTRIBUTION.txt still says "15,951 rows". It belongs to the end-of-epic README/ATTRIBUTION sweep (pc-hfz).
Provenance
Reconstructed 2026-10-05 from the agent transcript 2479b1c9-c4dd-47e5-be82-34ccf8d49a80/subagents/agent-a38fa23d203715bba.jsonl, the orchestrator session 2479b1c9-…, the commit messages and the bd close reason.