Open Data API
Every JSON this site publishes: the directory, the section datasets, the ⌘K indexes and the live feeds. Readable same-origin and cross-origin (Access-Control-Allow-Origin: *).
Every file under /live/ shares one envelope: {name, updatedAt, sourceUpdatedAt, source, ttl, stale, data}. When an upstream fetch fails the previous copy is kept and flagged stale: true.
| Path | Contents | Source | Refresh |
|---|---|---|---|
| /directory.json | The web directory: all categories and sites, names and descriptions in three languages | Curated by this site | Every build |
| /schools/kindergarten/data.json | Columnar data for a section list (trilingual name, address, district, phone, website) | Education Bureau, Hospital Authority, Department of Health (data.gov.hk) | Monthly |
| /schools/primary/data.json | Columnar data for a section list (trilingual name, address, district, phone, website) | Education Bureau, Hospital Authority, Department of Health (data.gov.hk) | Monthly |
| /schools/secondary/data.json | Columnar data for a section list (trilingual name, address, district, phone, website) | Education Bureau, Hospital Authority, Department of Health (data.gov.hk) | Monthly |
| /schools/special/data.json | Columnar data for a section list (trilingual name, address, district, phone, website) | Education Bureau, Hospital Authority, Department of Health (data.gov.hk) | Monthly |
| /schools/international/data.json | Columnar data for a section list (trilingual name, address, district, phone, website) | Education Bureau, Hospital Authority, Department of Health (data.gov.hk) | Monthly |
| /tertiary/data.json | Columnar data for a section list (trilingual name, address, district, phone, website) | Education Bureau, Hospital Authority, Department of Health (data.gov.hk) | Monthly |
| /clinics/gopc/data.json | Columnar data for a section list (trilingual name, address, district, phone, website) | Education Bureau, Hospital Authority, Department of Health (data.gov.hk) | Monthly |
| /clinics/private/data.json | Columnar data for a section list (trilingual name, address, district, phone, website) | Education Bureau, Hospital Authority, Department of Health (data.gov.hk) | Monthly |
| /eservices/immigration/data.json | Government e-services: columnar data for one category (trilingual names, department, URL, iAM Smart login, description, PDF flag, series) | iAM Smart service list (supplied by the site owner) + this site's link checks | Monthly |
| /eservices/immigration/forms.json | Government e-services: the PDF forms of one category (same shape as data.json) | iAM Smart service list (supplied by the site owner) + this site's link checks | Monthly |
| /eservices/tax/data.json | Government e-services: columnar data for one category (trilingual names, department, URL, iAM Smart login, description, PDF flag, series) | iAM Smart service list (supplied by the site owner) + this site's link checks | Monthly |
| /eservices/tax/forms.json | Government e-services: the PDF forms of one category (same shape as data.json) | iAM Smart service list (supplied by the site owner) + this site's link checks | Monthly |
| /eservices/housing-social/data.json | Government e-services: columnar data for one category (trilingual names, department, URL, iAM Smart login, description, PDF flag, series) | iAM Smart service list (supplied by the site owner) + this site's link checks | Monthly |
| /eservices/housing-social/forms.json | Government e-services: the PDF forms of one category (same shape as data.json) | iAM Smart service list (supplied by the site owner) + this site's link checks | Monthly |
| /eservices/transport/data.json | Government e-services: columnar data for one category (trilingual names, department, URL, iAM Smart login, description, PDF flag, series) | iAM Smart service list (supplied by the site owner) + this site's link checks | Monthly |
| /eservices/transport/forms.json | Government e-services: the PDF forms of one category (same shape as data.json) | iAM Smart service list (supplied by the site owner) + this site's link checks | Monthly |
| /eservices/health/data.json | Government e-services: columnar data for one category (trilingual names, department, URL, iAM Smart login, description, PDF flag, series) | iAM Smart service list (supplied by the site owner) + this site's link checks | Monthly |
| /eservices/health/forms.json | Government e-services: the PDF forms of one category (same shape as data.json) | iAM Smart service list (supplied by the site owner) + this site's link checks | Monthly |
| /eservices/education/data.json | Government e-services: columnar data for one category (trilingual names, department, URL, iAM Smart login, description, PDF flag, series) | iAM Smart service list (supplied by the site owner) + this site's link checks | Monthly |
| /eservices/education/forms.json | Government e-services: the PDF forms of one category (same shape as data.json) | iAM Smart service list (supplied by the site owner) + this site's link checks | Monthly |
| /eservices/employment/data.json | Government e-services: columnar data for one category (trilingual names, department, URL, iAM Smart login, description, PDF flag, series) | iAM Smart service list (supplied by the site owner) + this site's link checks | Monthly |
| /eservices/employment/forms.json | Government e-services: the PDF forms of one category (same shape as data.json) | iAM Smart service list (supplied by the site owner) + this site's link checks | Monthly |
| /eservices/government-legal/data.json | Government e-services: columnar data for one category (trilingual names, department, URL, iAM Smart login, description, PDF flag, series) | iAM Smart service list (supplied by the site owner) + this site's link checks | Monthly |
| /eservices/government-legal/forms.json | Government e-services: the PDF forms of one category (same shape as data.json) | iAM Smart service list (supplied by the site owner) + this site's link checks | Monthly |
| /eservices/culture-leisure/data.json | Government e-services: columnar data for one category (trilingual names, department, URL, iAM Smart login, description, PDF flag, series) | iAM Smart service list (supplied by the site owner) + this site's link checks | Monthly |
| /eservices/culture-leisure/forms.json | Government e-services: the PDF forms of one category (same shape as data.json) | iAM Smart service list (supplied by the site owner) + this site's link checks | Monthly |
| /eservices/business-trade/data.json | Government e-services: columnar data for one category (trilingual names, department, URL, iAM Smart login, description, PDF flag, series) | iAM Smart service list (supplied by the site owner) + this site's link checks | Monthly |
| /eservices/business-trade/forms.json | Government e-services: the PDF forms of one category (same shape as data.json) | iAM Smart service list (supplied by the site owner) + this site's link checks | Monthly |
| /eservices/environment/data.json | Government e-services: columnar data for one category (trilingual names, department, URL, iAM Smart login, description, PDF flag, series) | iAM Smart service list (supplied by the site owner) + this site's link checks | Monthly |
| /eservices/environment/forms.json | Government e-services: the PDF forms of one category (same shape as data.json) | iAM Smart service list (supplied by the site owner) + this site's link checks | Monthly |
| /eservices/utilities-commerce/data.json | Government e-services: columnar data for one category (trilingual names, department, URL, iAM Smart login, description, PDF flag, series) | iAM Smart service list (supplied by the site owner) + this site's link checks | Monthly |
| /eservices/utilities-commerce/forms.json | Government e-services: the PDF forms of one category (same shape as data.json) | iAM Smart service list (supplied by the site owner) + this site's link checks | Monthly |
| /eservices/communications-tech/data.json | Government e-services: columnar data for one category (trilingual names, department, URL, iAM Smart login, description, PDF flag, series) | iAM Smart service list (supplied by the site owner) + this site's link checks | Monthly |
| /eservices/communications-tech/forms.json | Government e-services: the PDF forms of one category (same shape as data.json) | iAM Smart service list (supplied by the site owner) + this site's link checks | Monthly |
| /legal/law-firms/data.json | Law firms: every firm, columnar (trilingual name, address, district, size, practice areas, phone, website, notary qualifications) | Law Society, Bar Association, notary societies, Judiciary + this site | Monthly |
| /legal/barristers/data.json | Barristers: every practising barrister (trilingual name, Senior Counsel flag, year of call, chambers, phone, Bar List link) | Law Society, Bar Association, notary societies, Judiciary + this site | Monthly |
| /legal/notaries/data.json | Notaries: notaries public and China-appointed attesting officers (trilingual name, firm, address, district, phone) | Law Society, Bar Association, notary societies, Judiciary + this site | Monthly |
| /search/pages.json | ⌘K index: categories, sections and district pages | Curated by this site | Every build |
| /search/facilities.json | ⌘K index: schools, universities, hospitals, clinics, Chinese medicine (compact columnar) | Education Bureau, Hospital Authority, Department of Health (data.gov.hk) | Monthly |
| /search/stations.json | ⌘K index: MTR stations (trilingual names, lines, 3D map link) | This site's 3D map dataset | Every build |
| /search/eservices.json | ⌘K index: government e-services (non-PDF; trilingual names, department, URL, iAM Smart login flag) | iAM Smart service list (supplied by the site owner) + this site's link checks | Monthly |
| /search/legal.json | ⌘K index: law firms, chambers, notaries, courts, legal aid, ADR bodies and legal resources (no individual barristers) | Law Society, Bar Association, notary societies, Judiciary + this site | Monthly |
| /live/weather.json | Weather: temperature (HKO and districts), humidity, UV, rainfall, warnings in force, today's forecast | Hong Kong Observatory open data | Every 60 s |
| /live/aqhi.json | Air Quality Health Index: every station with risk level, territory-wide max/min | Environmental Protection Department (data.gov.hk) | Every 60 s |
| /live/mtr.json | MTR: line status, delayed lines, predicted arrival count, poll time | MTR open data + this site's collector | Every 60 s |
| /live/ae.json | A&E waiting times per hospital and the fastest five | Hospital Authority open data | Every 60 s |
| /live/holidays.json | Public holidays: whether today is one, countdown to the next | 1823 public holiday calendar | Daily |
| /live/fx.json | Exchange rates: USD, CNY, JPY (per 100), GBP, EUR to HKD (may be absent) | Hong Kong Monetary Authority | Hourly |
| /live/hsi.json | HK stocks: HSI, HSCEI and Hang Seng TECH last, change, market state, turnover and today's 5-minute sparkline (may be absent) | Yahoo Finance / Tencent Finance | Every 60 s while trading |
| /live/tunnels.json | Harbour tunnels: CHT, EHC and WHC journey times (minutes) and red/amber/green status in both directions, each approach, closures/congestion, and tunnel incidents from TD Special Traffic News (may be absent) | TD Journey Time Indicators + Special Traffic News | Every 2 min |
Examples
curl -s https://smarthk.app/live/weather.json | jq '.data.temperature.hko'
curl -s https://smarthk.app/live/ae.json | jq '.data.fastest'
curl -s https://smarthk.app/directory.json | jq '.sites | length'
Licence and use
Open data from DATA.GOV.HK, the Hospital Authority and the Hong Kong Observatory is provided under their respective terms; please credit the source. The directory and indexes compiled by this site are free to use. DATA.GOV.HK terms and conditions ↗
Please do not poll aggressively: the live files change at most once every 60 seconds, so keep at least a 60-second interval.