Current Weather Readings (HKO)
Source
Section titled “Source”Hong Kong Observatory (HKO)
- Department URL: https://www.hko.gov.hk/
- API Endpoint:
https://data.weather.gov.hk/weatherAPI/opendata/weather.php?dataType=rhrread&lang=en - API Docs: https://www.hko.gov.hk/en/abouthko/opendata_intro.htm
Format
Section titled “Format”JSON Updated every ~10 minutes. No API key. CORS-enabled.
~10 min
Update Interval
Free
No Auth Required
~50
Weather Stations
Schema / Fields
Section titled “Schema / Fields”| Field | Path | Type | Example | Description |
|---|---|---|---|---|
temperature.data[].value | root | float | 28.4 | Temperature (°C) at station |
temperature.data[].station | root | string | "HKO" | Station code |
humidity.data[].value | root | integer | 82 | Relative humidity (%) |
rainfall.data[].main | root | string | "Sha Tin" | District rainfall zone |
rainfall.data[].amount | root | float | 2.4 | Rainfall (mm) in past hour |
uvindex.data[].value | root | integer | 3 | UV Index level |
updateTime | root | string | "2024-01-15T08:30:00+08:00" | Last update timestamp |
warningMessage | root | array | ["Amber Rainstorm Warning"] | Active weather warnings |
Example API Call
Section titled “Example API Call”curl "https://data.weather.gov.hk/weatherAPI/opendata/weather.php?dataType=rhrread&lang=en" \ | jq '{temp: .temperature.data[0], humidity: .humidity.data[0], warnings: .warningMessage}'Example Response
Section titled “Example Response”{ "rainfall": { "data": [ {"unit": "mm", "main": "Hong Kong Observatory", "amount": 0.0, "place": "HKO"}, {"unit": "mm", "main": "Sha Tin", "amount": 2.4, "place": "SHA TIN"} ] }, "temperature": { "data": [ {"unit": "C", "value": 28.4, "place": "Hong Kong Observatory", "station": "HKO"}, {"unit": "C", "value": 27.8, "place": "King's Park", "station": "KP"} ], "recordTime": "2024-01-15T08:30:00+08:00" }, "humidity": { "data": [{"unit": "percent", "value": 82, "place": "Hong Kong Observatory"}] }, "uvindex": { "data": [{"unit": ".", "value": 3, "desc": "Moderate", "message": ""}] }, "warningMessage": [], "updateTime": "2024-01-15T08:30:00+08:00"}Used By
Section titled “Used By”| Model | How |
|---|---|
| ABM Theory | Weather state modifies agent foot traffic probability — rain/heat suppress outdoor movement |
| LLM-Powered Agents | Real-time weather context fed to agent prompt as situational modifier |
Notes / Gotchas
Section titled “Notes / Gotchas”warningMessagearray is empty on clear days — parse defensively- Temperature at “HKO” station (Tsim Sha Tsui) is the reference; urban heat island makes Sheung Wan ~1-2°C warmer in summer
- UV Index correlates with outdoor dining willingness — UV 7+ (Very High) reduces outdoor seating occupancy
- API is free but rate limiting applies: poll no more frequently than every 5 minutes per IP