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 (GeoNames) 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-us-sample
| Field | Type | Description | Constraints | Title |
|---|---|---|---|---|
| country_code | string | ISO 3166-1 country code — always US | { "pattern": "^US$", "required": true } | Country Code |
| postal_code | string | Five-digit ZIP code (leading zeros significant) | { "pattern": "^\\d{5}$", "required": true } | Postal Code |
| place_name | string | Place / locality (city) name | Place Name | |
| admin_name1 | string | State / territory name | Administrative Name 1 | |
| admin_code1 | string | State / territory two-letter USPS code | Administrative Code 1 | |
| admin_name2 | string | County-tier division — Census county name where confirmed | Administrative Name 2 | |
| admin_code2 | string | 5-digit county GEOID (state FIPS + county FIPS), Census-standard | Administrative Code 2 | |
| admin_name3 | string | Reserved — not populated for the US | Administrative Name 3 | |
| admin_code3 | string | Reserved — not populated for the US | 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 | Pipe-separated alternate place names | Alternative City Name |
Download
Download sample CSVAbout
- Last updated
- 3 October 2026
- Total rows
- 100
- Format
- CSV
- File size
- 8.13 kB
About this dataset
United States (US) — internal licensing notes
Not mentioned in datahub-next#941 — no known licensing flag on this country. Source: GeoNames US postal export, CC BY 4.0.
Session finding, 2026-08-19 — reconstructed from nothing, and a stale
assumption corrected
Same situation as Australia: no build script survived anywhere, only a
source-research note (no implementation). That note's own "Recommendation"
section explicitly labelled the live product as plain GeoNames US ("what we
ship now") — this turned out to be wrong. Diffing raw GeoNames against
live R2 us.csv found real enrichment already present:
admin_code2(county FIPS): raw GeoNames has a bare 3-digit county FIPS ("013"); live R2 has the full 5-digit state+county FIPS ("02013"). Reproduced via a static state-abbreviation-to-FIPS-prefix table (no live fetch needed) — now matches R2 exactly.admin_name2(county name): raw GeoNames has the bare county name; live R2 mostly carries the official Census name with legal suffix ("… County") — but not on every row, so whatever enrichment produced the live data didn't have 100% coverage either. This gap is NOT closed — everycensus.govURL tried returned an HTML error page from this environment, either moved or blocked. Documented rather than silently shipped as a mismatch.
Row count: 41,490 built vs 41,488 live (2-row drift, expected — GeoNames is a
living community dataset). 513 state-FIPS lookup misses on rebuild — only
one cause explicitly checked (MH/Marshall Islands, a real non-standard
admin1 code on some military postal codes); the rest not fully characterized,
flagged unverified rather than claimed fine.
The stale source-research note should be corrected to say this enrichment is already live, not merely proposed — not fixed as part of this session since it's documentation, not code.
No further licensing review — this was a code-reproducibility audit.
Correction, 2026-10-03 (P5, pc-28e.7.56)
The 2026-08-19 reconstruction above was superseded. The live file was built by
the unmerged origin/feat/us-consolidated-r2 pipeline, which takes county names
and GEOIDs from the Census 2020 ZCTA-to-County relationship via the
public-domain zctaCrosswalk GitHub mirror. scripts/produce.py ports that
pipeline and reproduces live cell-for-cell.