Reference · built on requestCommons signalWeather & climate

Hong Kong Observatory Open Data API

Hong Kong current weather, 9-day forecast, warning signals, special tips and hourly station rainfall as JSON from data.weather.gov.hk.

About

The Hong Kong Observatory is the weather service of the Government of the Hong Kong SAR. Its Open Data API answers plain HTTP GETs at data.weather.gov.hk with a dataType parameter: weather.php for the Current Weather Report, the 9-day and local forecasts, warning summaries and special tips; hourlyRainfall.php for station rainfall; earthquake.php for quake messages; and opendata.php for climate and tide series. Warning codes include WTCSGNL for tropical cyclone signals and WRAIN for the Amber, Red and Black rainstorm signals.

Through Fibric, an operator polls the warning summary and hourly rainfall for your sites and proposes a staff release, a delivery hold or a building check. You approve. The warning code and its updateTime stay on the record.

This is a reference listing. It documents what Fibric would read from Hong Kong Observatory Open Data API and what it could propose, based on the publisher's published interfaces. Fibric builds it under a managed deployment when you request it; selecting it here installs nothing.

Inputs

  • Current Weather Report (rhrread): temperature, humidity, rainfall and uvindex by place, with warningMessage, tcmessage and specialWxTips
  • 9-day Weather Forecast (fnd): forecastMaxtemp, forecastMintemp, forecastWind, forecastMaxrh and PSR (probability of significant rain) per day, plus soilTemp and seaTemp
  • Local Weather Forecast (flw): generalSituation, tcInfo, fireDangerWarning, forecastDesc, outlook; Special Weather Tips (swt): desc, updateTime
  • Weather Warning Summary (warnsum) and Weather Warning Information (warningInfo): WTCSGNL, WRAIN (WRAINA, WRAINR, WRAINB), WHOT, WCOLD, WMSGNL, WTS, WFIRE, WL, WTMW
  • Rainfall in the past hour by automatic weather station from hourlyRainfall.php: obsTime, automaticWeatherStationID, value, unit
  • Climate and astronomical series from opendata.php: CLMTEMP, CLMMAXT, CLMMINT by station and year; HHOT and HLT tides; SRS, MRS; LHL lightning; LTMV visibility; RYES
  • Quick Earthquake Messages (qem) and Locally Felt Earth Tremor Report (feltearthquake) from earthquake.php

Proposed actions

Read-only. This feed informs operators; it changes nothing.

Proposed actions are target capabilities. Every action runs propose-first and needs a validated deployment and the appropriate permissions.

What you can build

  • Release staff on a tropical cyclone signal

    warnsum reports WTCSGNL with the signal code in force. When the code reaches the level in your policy, the operator proposes the release notice and the roster change, and records who approved it.

    With Severe Weather Notice, Event Surge

  • Hold local deliveries under a Black Rainstorm

    WRAIN carries subtype WRAINA, WRAINR or WRAINB. On WRAINB the operator proposes holding every order due out that hour and releases the hold once the summary no longer lists it.

    With Weather Hold

  • Reset the shuttle timetable when rain sets in

    hourlyRainfall.php gives the past hour by station every 15 minutes. Above your threshold at the stations near a property, the operator proposes extra runs and posts the change on your approval.

    With Shuttle Timing

  • Prepare buildings before a storm arrives

    fnd shows the 9-day outlook and flw carries tcInfo. When a tropical cyclone appears in either, the operator proposes the pre-storm checklist for each building and logs its completion.

    With Storm Prep

Requirements

  • The dataType code per dataset (flw, fnd, rhrread, warnsum, warningInfo, swt) and lang set to en, tc or sc
  • Station codes such as HKO, HKA or CCH, and a year, for the climate series on opendata.php
  • Attribution to the Government, the Hong Kong Observatory and DATA.GOV.HK under the DATA.GOV.HK Terms and Conditions
  • Parsers that tolerate absent fields, since a parameter is omitted when its value is null
Authentication
None. Every endpoint under data.weather.gov.hk/weatherAPI/opendata is an unauthenticated HTTP GET with dataType and lang query parameters.

Limits

  • No push channel; warnings and tips update as and when there is a change, so you poll weather.php
  • Hourly station rainfall is provisional with limited validation and differs from the Observatory's climatological record
  • Response shapes vary: null parameters are dropped, hourly rainfall returns M under maintenance, and uvindex is an empty string when absent
  • opendata.php returns CSV unless rformat=json; tide and sun tables cover a fixed span of years

Access and pricing

Reference listing. Public feed access is separate from Fibric integration. If you request this feed, your quote covers the build, usage, and support.

Request Hong Kong Observatory Open Data API ↗

Questions and answers

How do I read the tropical cyclone signal?
Call weather.php?dataType=warnsum&lang=en. When a signal is in force the response has a WTCSGNL property whose code names the signal, such as TC1 or TC3, with name and updateTime. warningInfo returns the full statement contents. Both change as and when there is an update, so poll.
Is there a key or a rate limit?
No key. The API documentation names no rate limit and no registration; the data is published under the DATA.GOV.HK Terms and Conditions, which allow commercial and non-commercial use with attribution to the Government, the Hong Kong Observatory and DATA.GOV.HK.
Which formats and languages are returned?
weather.php, earthquake.php and hourlyRainfall.php return JSON. opendata.php returns CSV by default and JSON with rformat=json, as a fields list plus data rows. lang accepts en, tc and sc; the default is en. Times use the +08:00 offset.
Ask about Hong Kong Observatory Open Data API

Ask about the capabilities and requirements in this listing.

For project-specific requirements, contact Fibric.