Thai hazard sources — what is live, and what may be sold
1. The feeds, probed
| Signal | Source and endpoint | Live result | Licence / terms | Verdict |
|---|---|---|---|---|
| Official warnings | TMD CAP channel www.tmd.go.th/api/xml/CAP → one CAP 1.2 XML per alert | 200; 6 alerts, newest 30 Sep 2026 ("Heavy Rain", Severe, Immediate, provinces + 112 polygons) | <copyright>public domain</copyright> in the channel; registered with Google's alert hub | served; drives alert |
| Official warnings (old API) | TMD data.tmd.go.th/api/WeatherWarningNews/v1 | 200 but one item, dated 16 Oct 2022 (Storm NESAT) | DGA OGL | stale — not used |
| Warnings RSS | tmd.go.th/api/xml/warning-news | 200; newest 15 Apr 2025 | — | stale — not used |
| Rain observed | TMD Weather3Hours/V2 (126 stations, rain 3 h and 24 h, temperature, wind) | 200; 70 KB; 13:00 observations | DGA Open Government License (dataset c1-1-3-4 family on data.go.th); the demo credential uid=api&ukey=api12345 is the one data.go.th publishes | served |
| Rain daily by district | TMD RainRegions/v1 | 200; stations by region | DGA OGL (dataset c1-1-3-13) | not needed yet |
| Forecast | TMD WeatherForecast7Days/V2 (81 provinces/areas, 7 days) | 200; 96 KB | DGA OGL | served |
| Forecast by point | TMD NWP API data.tmd.go.th/nwpapi | 401 — registration required | registration terms | later, if registered |
| Earthquakes | USGS FDSN earthquake.usgs.gov/fdsnws/event/1/query, box 0–28°N 88–112°E | 200; reviewed events | US public domain | served |
| Earthquakes (Thai catalogue) | TMD seismology RSS earthquake.tmd.go.th/feed/rss_tmd.xml | 200; 10 newest, down to M1.8 inside Thailand | DGA OGL (TMD datasets) | served |
| Tsunami | NOAA PTWC Atom tsunami.gov/events/xml/PHEBAtom.xml | 200; latest bulletin | US public domain | served |
| Global events | GDACS gdacsapi/api/events/geteventlist/SEARCH?country=Thailand | 200; 3 events (drought episode, floods) | reuse with attribution; terms: automatic, not reviewed, "not meant to substitute … official information" | served, disclaimers passed through |
| Satellite-seen events | NASA EONET v3, bbox 92,22,110,4 | 200; 10 events in 60 days (floods in Thailand, Tropical Storm Narra) | US public domain | served (polygon coordinates are [lat, lon], points [lon, lat] — checked) |
| River levels | HII ThaiWater api-v3.thaiwater.net/.../waterlevel_load (1.4 MB, all agencies incl. RID's P.1) | 200 — undocumented | HII datasets on data.go.th: CC BY-NonCommercial; live API has no published terms; another site owner asked HII for written permission on 26 Sep 2026 and is waiting | not served until HII permits (email draft beside this file) |
| River levels | RID water.rid.go.th | TLS certificate expired | — | not usable |
| River discharge (model) | GloFAS via Open-Meteo flood API | 200 (used by the lab's live_data.py) | Open-Meteo free tier is non-commercial; GloFAS itself is Copernicus open data | the river path for later: Open-Meteo commercial plan, or Copernicus directly |
| PM2.5 | Air4Thai air4thai.pcd.go.th/services/getNewAQI_JSON.php (173 stations) | TLS chain broken; 200 with verification off | no licence stated for the live JSON | not served yet |
| PM2.5 | DDPM dpmalert.disaster.go.th/AirQualityDatas/… | 401 | DGA OGL (dataset gdpublish-dpm-gd024) but login required | not served yet |
| Fire hotspots | NASA FIRMS | needs a free map key | public | later (burning season) |
| DDPM warnings | disaster.go.th/rss, NDWC site | 404 / JavaScript app | — | no feed found |
2. The licence that makes TMD's data sellable
Thailand's DGA Open Government License (Terms and Conditions v1.0, 10 June 2021, read in full) grants a non-exclusive right, without territory or time limits and without fees, to:
"copy, publish, distribute or benefitially processing the Data in whatever methods, for the purposes of enhancing services and innovations" … "gathering the Data therefrom together with other data or utilizing them to be a part of education, analysis, research, service and innovation enhancement".
Its one standing condition: "The User shall state references for the Use of Data, at all the time, which are referred to the sources of Data and organizations" — data without the reference "deem to be contrary to this Terms". Exclusions: data that law forbids disclosing, logos and emblems, military insignia, third-party IP. No warranty; DGA may stop publishing without notice. The API therefore names the agency and licence in every record and in /health.
HII's datasets, by contrast, carry CC BY-NC on data.go.th. Non-commercial means a paid API may not relay them without a separate permission, so the river signal is withheld and asked for.
3. Three things that would have gone wrong
- The documented warning API is dead.
WeatherWarningNewsreturns one 2022 entry;warning-newsRSS stopped in April 2025. The live feed is the CAP channel, found through the "ข้อมูลเปิดรูปแบบ RSS" page. www.tmd.go.thomits its intermediate certificate. Browsers fetch it themselves; Python fails with "unable to get local issuer certificate". Fix: bundle GlobalSign's public intermediate (certs/globalsign_alphassl_2025.pem, valid to 21 May 2027) into the trust store — verification stays on.- EONET mixes coordinate orders: points are [lon, lat], flood polygons [lat, lon]. Checked against a flood in Tak and a storm off Hainan;
sources.eonet_centre()reads each accordingly.
4. Demand on the hub (same scraper as the STT research)
| Search | Results | Top listings |
|---|---|---|
| thailand weather | 0 | — |
| air quality thailand | 0 | — |
| earthquake | 33 | EveryEarthquake (USGS reseller), "Earthquakes: Seismic Data with Revisions & Deletions" |
| weather alert | 32 | WeatherAPI.com, Weather API (OpenWeatherMap wrapper), Easy Weather, "Severe Weather Alert & Operational Risk Intelligence" (NWS, US) |
| disaster | 52 | OpenFEMA, geodisasters |
| flood | 46 | property-data APIs, not hazards |
Nothing Thailand-specific exists in weather, air or hazards; the general earthquake and weather-alert categories have established, cheap players. Expectation, written before listing: a niche tool with a handful of subscribers in the first months, most on the free plan, and near-zero cost to run. The reason to list it is the same as for the STT API: it costs nothing to measure, and the data is useful to Thai developers building LINE bots and alert apps.
5. What the API refuses to do
alertis set only by TMD's official CAP warnings active now that name the province or contain the point. No model sets it.- The Disaster Lab's fusion is returned under
lab, labelled educational and uncalibrated, with its unavailable signals shown as such (river, river forecast, satellite, archive score 0.5 = "says nothing"). - Every response carries the disclaimer: not an official channel; confirm with TMD, DDPM (1784) and local authorities.