Scope: Hong Kong public datasets and government data.
Keyword search HK data.gov.hk catalog (refreshed weekly · FTS BM25 · 3 langs;
catalog size and newest metadata_modified in _meta.catalog).
Args:
query: keyword(s) · en / 繁 / 简 all indexed together
(e.g. "交通", "typhoon", "金融統計", "藥物", "醫院").
agency: filter by organization_name (e.g. "hk-censtatd" for 政府
fmt: filter by resource format (e.g. "CSV", "JSON", "XML").
limit: default 20 · raise to 50+ for exhaustive scans.
Empty query = browse the whole catalog, newest metadata_modified first.
total_matched always counts datasets containing every query word. When a
multi-word query has fewer than 3 such datasets, results fall back to
any-word matches (matching="any_term", count in total_matched_any_term).
matching: all_terms / any_term / browse / no_terms (query has no words).
Returns dict with total_matched (all datasets matching query + filters),
n_returned / count (rows in this response), and results, each with:
name, title (en/tc/sc), org (en/tc), num_resources, tags,
metadata_modified, score (null when browsing), url (data.gov.hk page).
Licence is portal-wide (DATA.GOV.HK terms) · see _meta. Pass name to
hk_list_resources or hk_query_rows.