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-ke-sample
| Field | Type | Description | Constraints | Title |
|---|---|---|---|---|
| country_code | string | ISO 3166-1 alpha-2 -- always KE | Country Code | |
| postal_code | string | Kenyan postal code (5 digits) | { "pattern": "^\\d{5}$" } | Postal Code |
| place_name | string | Post office name | Place Name | |
| admin_name1 | string | County -- 47/47 covered | Administrative Name 1 | |
| admin_code1 | string | ISO 3166-2:KE code | 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.72 kB
About this dataset
Kenya (KE) — internal licensing notes
Source research, 2026-09-03 — tier-1 check done, real lead unresolved
Checked Posta Kenya first. Found a real lead: openAFRICA hosts a
"Post Office and Post Office Code Locator" dataset described as sourced
from Posta Kenya. Could not independently verify licence, schema, or row
count — open.africa's API (api/3/action/package_show) returned a
Cloudflare bot-challenge page ("Just a moment…") to both curl and
WebFetch from this build environment, not the underlying JSON. Disclosed
as a real, unresolved lead (not ruled out on data-quality grounds), worth
a follow-up from an environment that can pass the challenge.
The source used instead — GeoNames KE
https://download.geonames.org/export/zip/KE.zip # 890 rows
Licence CC-BY-4.0, verified against export/zip/readme.txt on
2026-09-03 — Kenya carries no per-country caveat.
Verified directly against the raw source file:
admin_name1/admin_code1— County, 47/47 covered (Kenya's full post-2010-constitution county count). GeoNames' own numbering is alphabetical-with-an-outlier (Nairobi coded "05", everything else "10"-"55" alphabetically) and does not match the real ISO order at all (verified against Wikipedia's ISO_3166-2:KE page 2026-09-03) — a 47-entry name-based crosswalk was built and verified, not a numeric prepend or offset guess.- No admin2/admin3 tier — this source (post office locations only) reaches county level.
- 0 exact duplicate rows, 0 (postal_code, place_name) collisions, 0
literal
"nan"strings.
licence_status
{
"channel": "postal-codes-r2",
"source_url": "https://download.geonames.org/export/zip/KE.zip",
"licence_id": "CC-BY-4.0",
"collected_at": "2026-09-03",
"decision": "compatible",
"decided_by": "claude-session-2026-09-03",
"decided_at": "2026-09-03"
}
Proposed tier
B ($49). Small but complete (47/47 counties), real crosswalk verification work (Nairobi's out-of-sequence code would have broken a naive offset-based mapping).
Build — 2026-09-03
Built via datasets/ke/scripts/build_postal_codes_product.py.
| value | |
|---|---|
| Final rows | 890 |
| Counties covered | 47/47 |
| Distinct postal codes | 877 |
| (postal_code, place_name) collisions | 0 |
Frictionless validation: valid: True.
Status: built and validated locally only. Nothing published to R2, nothing committed to git yet.