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-th-sample
| Field | Type | Description | Constraints | Title |
|---|---|---|---|---|
| country_code | string | ISO 3166-1 alpha-2 country code -- always TH | Country Code | |
| postal_code | string | Thai postal code (5 digits) | { "pattern": "^\\d{5}$" } | Postal Code |
| place_name | string | District (Khet/Amphoe) name as GeoNames records it | Place Name | |
| admin_name1 | string | Province (Changwat) -- 74 of 77 provinces represented | Administrative Name 1 | |
| admin_code1 | string | GeoNames admin1 code for the province | Administrative Code 1 | |
| admin_name2 | string | District -- populated only for Na Tan (Ubon Ratchathani); empty elsewhere in the GeoNames source, not a data gap introduced here | Administrative Name 2 | |
| admin_code2 | string | Not available in this release | Administrative Code 2 | |
| admin_name3 | string | Not available in this release | Administrative Name 3 | |
| admin_code3 | string | Not available in this release | Administrative Code 3 | |
| latitude | number | GeoNames-estimated latitude (WGS84) | Latitude | |
| longitude | number | GeoNames-estimated 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 | First alternate name GeoNames records for place_name (e.g. 'Amphoe X'), where one exists; empty otherwise | Alternative City Name |
Download
Download sample CSVAbout
- Last updated
- 6 October 2026
- Total rows
- 100
- Format
- CSV
- File size
- 6.96 kB
About this dataset
Postal Codes Dataset for Thailand (TH)
This dataset lists Thai postal codes at province-level granularity, with province names and WGS84 coordinates. There is no district or sub-district tier.
Column definitions, row count, size and last-updated date are in datapackage.yaml.
Data Sources
- Postal codes, province names and coordinates: © GeoNames, postal code database for Thailand, CC BY 4.0.
- Alternative city names: the GeoNames gazetteer for Thailand, same licence.
Changes made to the source data: alternative_city_name derived from the gazetteer (the first non-numeric alternate name of the gazetteer entry matching the place name); cells copied as text, with no literal "nan" values and no float-formatted accuracy.
Not endorsed by, or affiliated with, GeoNames.
Known limitations
- Not every Thai province is covered: GeoNames' postal export omits a few provinces, and covers the rest at province level only.
- District (อำเภอ) and sub-district (ตำบล) tiers are not carried: GeoNames does not provide them for Thailand, so
admin_name2,admin_code2,admin_name3andadmin_code3are empty (apart from oneadmin_name2value). A community-repository upgrade with those tiers was evaluated and not shipped: several of its own merged contributions cite Wikipedia (CC BY-SA) as their source, which this project's provenance rules treat as an unresolved licensing risk rather than the clean MIT the repository claims for itself. - Coordinates are one GeoNames-estimated point per (
postal_code,place_name) row.accuracyfollows GeoNames' own scale (1 = estimated, 4 = matched to a gazetteer place, 6 = centroid of addresses/shape) and is blank where GeoNames does not report a value; blank means GeoNames did not classify that row, not zero accuracy. alternative_city_nameis re-derived from the current gazetteer on each build, so values can differ from earlier releases.
Usage
The dataset files are available in CSV format and can be accessed and downloaded using
the links provided in datapackage.yaml. Read admin_code1 as text, never as a number: GeoNames' two-digit province codes can start with zero.
For other inquiries, contact datahub@datopian.com