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-lk-sample
| Field | Type | Description | Constraints | Title |
|---|---|---|---|---|
| country_code | string | ISO 3166-1 alpha-2 -- always LK | Country Code | |
| postal_code | string | Sri Lankan postal code (5 digits) | { "pattern": "^\\d{5}$" } | Postal Code |
| place_name | string | Post office / locality name | Place Name | |
| admin_name1 | string | Province (9 total) | Administrative Name 1 | |
| admin_code1 | string | ISO 3166-2:LK province code | Administrative Code 1 | |
| admin_name2 | string | District -- 24/25 covered | Administrative Name 2 | |
| admin_code2 | string | ISO 3166-2:LK district code | Administrative Code 2 | |
| admin_name3 | string | Not populated -- no third admin tier in this source | 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
- 2 October 2026
- Total rows
- 100
- Format
- CSV
- File size
- 7.58 kB
About this dataset
Sri Lanka (LK) — internal licensing notes
Source research, 2026-09-11 — tier-1 check done before falling back
Checked Sri Lanka Post (slpost.gov.lk, the official national postal
operator) first via search — referenced as the authority but no bulk
download page or open-data catalogue entry surfaced in this pass; not
directly fetched/confirmed in this session.
A real community lead found, checked and NOT used as-is
github.com/slwdc/Postal-Codes — a community-compiled CSV
(Postal_Codes.csv, 75,818 bytes), MIT-licensed repo. Checked
directly: the repository's own README.md (per search result summary)
states it is incomplete — roughly 200 postal codes missing, mostly from
the Northern Province. The MIT licence covers the compiler's own
repository, not a confirmed redistribution grant from Sri Lanka Post for
the underlying government data — same reasoning already applied to
India's GitHub mirror earlier in this project, except that mirror was a
verified exact, complete republish of the official file; this one is a
self-described incomplete compilation, not a verified 1:1 copy.
GeoNames — real fallback candidate, not yet evaluated in depth this pass
download.geonames.org/export/zip/LK.zip returns 200 — GeoNames does
have LK coverage (not checked further in this pass; row count/admin
structure not yet inspected). Per this project's standing rule, GeoNames
is the fallback of last resort here, to be evaluated only after the
official/community options above are exhausted or a build is actually
commissioned — not defaulted to.
Verdict
Built 2026-09-11 — GeoNames fallback used as anticipated. 1,837 rows,
24/25 ISO 3166-2:LK districts covered (Kilinochchi has zero rows in the
source — confirmed real, not a build error, and independently consistent
with the rejected GitHub compilation's own disclosure of Northern
Province gaps). admin_code1 (province) and admin_code2 (district)
derived via verified NAME-based crosswalks against Wikipedia's
ISO_3166-2:LK page — GeoNames' own admin codes are internal numbers/
abbreviations, not ISO. See scripts/build_postal_codes_product.py.
Published: git (datasets/lk/{datapackage.yml,scripts/}) and the
samples bucket (100-row preview, postal-codes-samples key lk/lk.csv).
Main R2 bucket publish blocked — datasets/lk/scripts/publish_r2.py --apply failed with AccessDenied on PutObject, the same session-wide
403/AccessDenied affecting every main-bucket write this session (confirmed
independently on fr/fr.csv, pk/pk.csv). _meta/catalog.json not
updated. datapackage.yml set to is_premium: true, premium_tier: B
(single-source GeoNames normalisation, same shape as PK/KE/EE), real
licenses/sources (was a placeholder "Multiple sources" link).