香港開放數據 · HK OPEN DATA API
All of Hong Kong's open data,
one clean API.
A unified, JSON-only REST API over data.gov.hk — datasets, transport, weather and historical archives. Passkey auth, edge caching, generous quotas.
No passwords. Passkey sign-in. Free during beta.
The problem
data.gov.hk wasn't built for apps.
Two disjoint API systems, CSV and XML everywhere, redirects instead of data, and no auth. HK Data API normalises all of it into one predictable JSON surface.
Raw data.gov.hk
- CKAN envelope
{ help, success, result } - CSV / XML returned by default
- 302 redirects instead of inline data
- No auth, no rate limits, no quotas
- Language baked into the URL path
HK Data API
- Standard JSON for every response
- Unified errors, pagination & metadata
- Passkey auth + revocable API keys
- Rate limits and monthly quotas
- Status code is the signal — no wrapper
Coverage
Every category. One endpoint style.
Transport
- /data/transport/mtr
- /data/transport/bus/kmb
- /data/transport/parking
Weather
- /data/weather
- warnings
- climate
Geography
- /data/address
- /data/city/lamp-posts
- historical maps
Civic
- /data/schools
- /data/holidays
- public records
Historical
- /data/historical
- versioned files
- schemas
Everything else
- /datasets
- /categories
- 6,300+ resources
Get started
From zero to first request in a minute.
Create an account with a passkey
WebAuthn sign-in — no passwords, no email codes. Your device is the key.
Generate an API key
A long-lived hkda_… token you can name, rotate and revoke from the portal.
Send your first request
Authenticate with Bearer and unlock registered-tier limits instantly.
Limits
Anonymous works. A key unlocks more.
| Tier | Rate limit | Monthly |
|---|---|---|
| Anonymous | 30 / min | 1,000 |
| Registered | 300 / min | 100,000 |
FAQ
Questions, answered.
What is HK Data API?
A unified RESTful JSON API wrapper over data.gov.hk, Hong Kong's open data portal. It normalises the catalogue and data APIs into one predictable JSON surface with auth, rate limits and quotas.
What data is available?
332 datasets across 19 categories — transport (MTR, KMB buses, parking, traffic cameras), weather and climate, census statistics, property and land registry, water quality, legislation and historical archives.
Is HK Data API free?
Yes — free during beta. Anonymous requests work at lower limits, and a free API key unlocks registered-tier quotas (300 requests/minute, 100,000/month).
How do I authenticate?
Register with a passkey (WebAuthn) — no passwords — then generate a Bearer API key from the portal. Your device is the key.
Is the data real-time?
Transport data is: MTR and KMB bus ETAs update around once a minute and traffic camera snapshots refresh continuously. Other datasets are cached per each source's update frequency.
How do I get started?
Register with a passkey, create an API key, then send a Bearer-authenticated request. Full examples are in the documentation.
Start building on Hong Kong's data.
Register with a passkey, generate an API key, and ship. No credit card, no waiting.
Get an API key →