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.
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
Explore with AIpostal-codes-ly
| Field | Type | Description | Title |
|---|---|---|---|
| country_code | string | ISO 3166-1 alpha-2 -- always LY | Country Code |
| postal_code | string | Always empty -- Libya has no operational postal code system. Not a data gap; see ATTRIBUTION.txt. | Postal Code |
| place_name | string | Locality/place name (GeoNames populated place) | Place Name |
| admin_name1 | string | District (shabiyah) -- all 22 covered; blank where GeoNames assigns a place to no current district | Administrative Name 1 |
| admin_code1 | string | ISO 3166-2:LY code | Administrative Code 1 |
| admin_name2 | string | Not populated in this release | 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 | Not populated -- the GeoNames gazetteer dump carries no accuracy field | Accuracy |
| alternative_city_name | string | Not populated in this release | Alternative City Name |
Download
Download CSVAbout
- Last updated
- 6 October 2026
- Total rows
- 909
- Format
- CSV
- File size
- 55.2 kB
About this dataset
Libya (LY) — internal licensing notes
Source research, 2026-09-11 — structural fit check, not primarily a licensing question
Confirmed: Libya has no postal code system in current use. Libya Post (the national operator) delivers mail using descriptive addresses (locality, street or PO Box, country) rather than postcodes.
What was checked
- GeoNames: no export exists —
download.geonames.org/export/zip/LY.zipreturns a plain 404. Consistent with no system to fetch. - Web research, 2026-09-11: multiple sources agree Libya has no postal code system. One genuinely notable finding: Libya was granted approval in 2019 to begin the first phase of a national postcode project — "decades in the making" per the source. This is a real, if slow-moving, rollout, not a settled "never will have one" case.
- No evidence found of the 2019 project having produced a usable public list, bulk export, or even a pilot-city dataset as of this research pass.
Verdict (superseded below)
No build now, revisitable — same class as Uganda and Ethiopia in this
catalogue (a real system is in progress, not deployed with a bulk source
yet), not a permanent closure like Bolivia/Curaçao/Côte d'Ivoire/Zimbabwe.
Check for progress on the 2019 postcode project in any future re-pass.
data_available unchanged (false). No licence_status applies — there
is no data to gate yet.
Revised 2026-09-15 — fresh live check, then issued free as a locality directory
Re-checked whether the 2019 postcode project (or the more recent
Benghazi postal-addressing/building-numbering initiative) has gone
live. It has not: web research 2026-09-15 turns up a 2021 Tripoli
pilot (attaching postcodes to individual buildings, not a public code
list) and Benghazi Municipality planning meetings reported as recently
as 2024–2026, still described as field-survey/database-construction
stage. No operational bulk-available postcode list, lookup API, or
pilot dataset was found for either effort. Libya Post's own site
(libyapost.ly) and Libya's General Information Authority addressing
portal (ldil.gia.gov.ly) show no downloadable postcode data.
download.geonames.org/export/zip/LY.zip still 404s (confirmed
2026-09-15), consistent with no system to fetch.
Human decision (matching Bolivia/Côte d'Ivoire/Ethiopia/Uganda):
rather than ship nothing, issue what CAN be known (district/shabiyah,
locality names, coordinates) as a free dataset, with postal_code
intentionally and permanently empty on every row. This does not reopen
the "no postal codes" verdict above — Libya still has none in
operational bulk-available form, and this is not sold as if it did.
Source: GeoNames' MAIN gazetteer dump
(download.geonames.org/export/dump/LY.zip) — a different GeoNames
product from the postal-code export (which 404s for Libya, as
documented above). Filtered to feature class P (populated places).
Licence CC BY 4.0, same as the postal export elsewhere in this
catalogue.
admin_code1 derived to ISO 3166-2:LY via a verified name crosswalk (22 current popularates/shabiyat, confirmed against Wikipedia's ISO_3166-2:LY page 2026-09-15). Unlike Ethiopia (2 unmapped post-reform regions) or Panama, this mapping is clean — all 22 of GeoNames' own LY admin1 buckets correspond one-to-one to all 22 current ISO codes.
Build — 2026-09-15
Built via datasets/ly/scripts/build_postal_codes_product.py.
| value | |
|---|---|
| Final rows | 909 |
| Districts (shabiyat) covered | 22/22 |
| Rows with unresolved admin1 (stale/legacy GeoNames admin1 codes not in the current admin1CodesASCII reference — e.g. pre-reform numeric codes 00, 11, 19, 30, 36, 47, 49, 55, 56, 58, 61) | 22 |
Frictionless validation: valid: True (run from inside
datasets/ly/data/, per the mandatory delivered-artifact rule).
is_premium: false — datasets/ly/datapackage.yml updated
accordingly, data_available: true.
Status: built, validated, and published. Main R2 bucket
(postal-codes/ly/) and samples bucket (postal-codes-samples/ly/ly.csv,
full file — this product is free) both updated 2026-09-15.
_meta/catalog.json's LY entry updated to match (909 rows, 56,092
bytes); entry count confirmed unchanged at 248 before and after.