# Hong Kong Open Data Scraper (`parseforge/data-gov-hk-hong-kong-scraper`) Actor

Export datasets from data.gov.hk, the Hong Kong government open data portal. Browse the full catalog or fetch specific datasets. Pull titles, organizations, descriptions, tags, update frequency, resource files, formats, licences, and direct download links.

- **URL**: https://apify.com/parseforge/data-gov-hk-hong-kong-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $13.00 / 1,000 result items

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

![ParseForge Banner](https://github.com/ParseForge/apify-assets/blob/ad35ccc13ddd068b9d6cba33f323962e39aed5b2/banner.jpg?raw=true)

## 🇭🇰 Hong Kong Open Data Scraper

> 🚀 **Export the Hong Kong government open data catalog in seconds.** Browse **4,000+ datasets** from data.gov.hk, filter by keyword or fetch by ID, and pull every resource file, format, licence, and download link. No login, no manual catalog crawl.

> 🕒 **Last updated:** 2026-05-23 · **📊 19 fields** per record · **📂 4,000+ datasets** · **🏛️ All HK gov departments** · **📥 Direct download links**

The **Hong Kong Open Data Scraper** queries the official `data.gov.hk` portal and returns **19 structured fields per dataset**, including title, publishing organization, description, tags, update frequency, licence, maintainer contact, every downloadable resource with its format, and the canonical catalog page. The portal is the HK government's central open-data hub and aggregates data from all bureaus and departments.

The catalog covers **transport, weather, planning, environment, health, education, demographics, real estate, statistics, public safety, and more**, across more than 4,000 datasets contributed by every major HK department. This Actor turns the catalog into a clean CSV, Excel, JSON, or XML feed in under five minutes.

| 🎯 Target Audience | 💡 Primary Use Cases |
|---|---|
| Southeast Asia real-estate analysts, urban researchers, fintechs operating in HK, smart-city teams, journalists, transit planners, civic-tech builders | Real-estate trend monitoring, transit feed ingestion, weather and pollution dashboards, regulatory data automation, civic transparency apps, HK market research |

---

### 📋 What the Hong Kong Open Data Scraper does

Two operating modes:

- 📑 **Catalog mode.** Walk every dataset in the portal, optionally filtered by a case-insensitive keyword on the dataset slug.
- 🎯 **Dataset mode.** Fetch a single dataset by its slug ID (e.g. `aahk-team1-flight-info`) for targeted ingestion.

Each record includes the dataset ID, title (English and Traditional Chinese where available), publishing organization, free-text description, topic tags, dataset groups, update frequency, licence string, maintainer name and email, metadata creation and modification timestamps, and the full list of downloadable resources with their file format and direct download URL.

> 💡 **Why it matters:** HK's open-data portal exposes everything from MTR rider counts to land-registry pulls to typhoon-track forecasts. Building a recurring ingest against it means parsing the catalog API, walking pagination, and threading resource lookups by hand. This Actor does all of that and returns ready-to-load rows.

---

### 🎬 Full Demo

_🚧 Coming soon: a 3-minute walkthrough showing how to go from sign-up to a downloaded catalog feed._

---

### ⚙️ Input

<table>
<thead>
<tr><th>Input</th><th>Type</th><th>Default</th><th>Behavior</th></tr>
</thead>
<tbody>
<tr><td>maxItems</td><td>integer</td><td>10</td><td>Datasets to return. Free plan caps at 10, paid plan at 1,000,000.</td></tr>
<tr><td>mode</td><td>string</td><td>"catalog"</td><td>catalog walks the portal; dataset fetches one record.</td></tr>
<tr><td>searchQuery</td><td>string</td><td>"weather"</td><td>Substring matched against dataset slugs in catalog mode. Empty walks the entire catalog.</td></tr>
<tr><td>datasetId</td><td>string</td><td>""</td><td>Dataset slug. Used only when mode is dataset.</td></tr>
</tbody>
</table>

**Example: 50 weather-related datasets.**

```json
{
    "maxItems": 50,
    "mode": "catalog",
    "searchQuery": "weather"
}
````

**Example: fetch the Hong Kong Airport flight info dataset.**

```json
{
    "mode": "dataset",
    "datasetId": "aahk-team1-flight-info"
}
```

> ⚠️ **Good to Know:** HK datasets are published in many formats including CSV, JSON, XML, GeoJSON, KMZ, PDF, and XLS. The `resources` array carries each file with its format string and a direct download link so you can wire up format-specific downstream parsers.

***

### 📊 Output

Each dataset record contains **19 fields**. Download the dataset as CSV, Excel, JSON, or XML.

#### 🧾 Schema

| Field | Type | Example |
|---|---|---|
| 🏷️ `logoUrl` | string | null | `"https://data.gov.hk/.../org_logo.png"` |
| 🆔 `datasetId` | string | `"aahk-team1-flight-info"` |
| 📚 `title` | string | `"Real-time Flight Information"` |
| 🏛️ `organization` | string | `"aahk"` |
| 🏢 `organizationTitle` | string | `"Airport Authority Hong Kong"` |
| 📝 `description` | string | `"Real-time flight arrival and departure data..."` |
| 🏷️ `tags` | array | `["aviation", "transport", "real-time"]` |
| 📦 `groups` | array | `["transportation"]` |
| 🔢 `numResources` | number | `4` |
| 📥 `resources` | array | `[{"name":"arrivals.json","format":"JSON","url":"..."}]` |
| 🔄 `updateFrequency` | string | null | `"real-time"` |
| ⚖️ `license` | string | `"Public Sector Information Licence"` |
| 📖 `dataDictionaryUrl` | string | null | `"https://www.hongkongairport.com/.../spec.pdf"` |
| 📅 `metadataCreated` | string | `"2018-03-15T08:42:13.000Z"` |
| 🔁 `metadataModified` | string | `"2026-05-10T03:00:00.000Z"` |
| 👤 `maintainer` | string | null | `"Airport Authority Hong Kong"` |
| 📧 `maintainerEmail` | string | null | `"opendata@hkairport.com"` |
| 🔗 `url` | string | `"https://data.gov.hk/en-data/dataset/aahk-team1-flight-info"` |
| 🕒 `scrapedAt` | ISO 8601 | `"2026-05-23T00:00:00.000Z"` |

#### 📦 Sample records

<details>
<summary><strong>✈️ Real-time HK Airport flight info</strong></summary>

```json
{
    "logoUrl": "https://data.gov.hk/uploads/admin/2018-03-15/aahk_logo.png",
    "datasetId": "aahk-team1-flight-info",
    "title": "Real-time Flight Information",
    "organization": "aahk",
    "organizationTitle": "Airport Authority Hong Kong",
    "description": "Real-time flight arrival and departure data for Hong Kong International Airport, refreshed every minute.",
    "tags": ["aviation", "transport", "real-time"],
    "groups": ["transportation"],
    "numResources": 4,
    "resources": [
        {"name": "arrivals.json", "format": "JSON", "url": "https://www.hongkongairport.com/flightinfo-rest/rest/flights/past"},
        {"name": "departures.json", "format": "JSON", "url": "https://www.hongkongairport.com/flightinfo-rest/rest/flights/future"}
    ],
    "updateFrequency": "Real-time",
    "license": "Hong Kong PSI Licence",
    "metadataCreated": "2018-03-15T08:42:13.000Z",
    "metadataModified": "2026-05-10T03:00:00.000Z",
    "maintainer": "Airport Authority Hong Kong",
    "maintainerEmail": "opendata@hkairport.com",
    "url": "https://data.gov.hk/en-data/dataset/aahk-team1-flight-info",
    "scrapedAt": "2026-05-23T00:00:00.000Z"
}
```

</details>

<details>
<summary><strong>🌦️ HK Observatory current weather</strong></summary>

```json
{
    "datasetId": "hko-rss-current-weather-report",
    "title": "Current Weather Report",
    "organization": "hko",
    "organizationTitle": "Hong Kong Observatory",
    "description": "Current temperature, humidity, wind, and rainfall across HK weather stations.",
    "tags": ["weather", "temperature", "rainfall"],
    "groups": ["climate-and-weather"],
    "numResources": 2,
    "resources": [
        {"name": "Current Weather (English) XML", "format": "XML", "url": "https://rss.weather.gov.hk/rss/CurrentWeather.xml"}
    ],
    "updateFrequency": "Every 10 minutes",
    "license": "Hong Kong PSI Licence",
    "url": "https://data.gov.hk/en-data/dataset/hko-rss-current-weather-report",
    "scrapedAt": "2026-05-23T00:00:00.000Z"
}
```

</details>

<details>
<summary><strong>🏘️ HK land sale records</strong></summary>

```json
{
    "datasetId": "landsd-pgd-pgde-sales-records",
    "title": "Land Sale Records",
    "organization": "landsd",
    "organizationTitle": "Lands Department",
    "description": "Records of land lots sold by the Hong Kong government via public tender or auction.",
    "tags": ["land", "real-estate", "tender"],
    "groups": ["development"],
    "numResources": 3,
    "resources": [
        {"name": "Sales records (CSV)", "format": "CSV", "url": "https://www.landsd.gov.hk/en/.../sales.csv"}
    ],
    "updateFrequency": "Monthly",
    "license": "Hong Kong PSI Licence",
    "url": "https://data.gov.hk/en-data/dataset/landsd-pgd-pgde-sales-records",
    "scrapedAt": "2026-05-23T00:00:00.000Z"
}
```

</details>

***

### ✨ Why choose this Actor

| | Capability |
|---|---|
| 🏛️ | **Whole-of-government coverage.** Every HK bureau and department publishes here. |
| 🎯 | **Catalog or single-dataset.** Two modes cover bulk audits and targeted ingestion. |
| 📥 | **Direct file links.** Each resource carries name, format, and download URL ready to pipe into a worker. |
| ⚖️ | **Licence and contact metadata.** Maintainer name, email, and licence string per record for compliance. |
| ⚡ | **Fast.** 10 datasets in under 5 seconds, 4,000 in under 5 minutes. |
| 🔁 | **Always fresh.** Live catalog reads on every run. |
| 🚫 | **No authentication.** Public portal, no key required. |

> 📊 The HK open-data catalog is the single source of truth for civic, environmental, and economic data in Hong Kong.

***

### 📈 How it compares to alternatives

| Approach | Cost | Coverage | Refresh | Filters | Setup |
|---|---|---|---|---|---|
| **⭐ Hong Kong Open Data Scraper** *(this Actor)* | $5 free credit, then pay-per-use | **4,000+** datasets | **Live per run** | catalog / single ID | ⚡ 2 min |
| Commercial HK market data | $1,000+/month | Curated slice | Daily | Vendor-specific | 🐢 Days |
| Custom catalog crawler | Free engineering | Full | Cron driven | Hand built | ⏳ Weeks |
| Per-department site visits | Free | Per-dept only | Manual | UI only | 🕒 Painful |

Pick this Actor when you want a clean, filterable feed of the entire HK government open-data catalog with zero parser maintenance.

***

### 🚀 How to use

1. 📝 **Sign up.** [Create a free account with $5 credit](https://console.apify.com/sign-up?fpr=vmoqkp) (takes 2 minutes).
2. 🌐 **Open the Actor.** Go to the Hong Kong Open Data Scraper page on the Apify Store.
3. 🎯 **Set input.** Pick catalog or dataset mode. In catalog mode add an optional keyword. In dataset mode supply a slug.
4. 🚀 **Run it.** Click **Start** and let the Actor collect records.
5. 📥 **Download.** Grab your results from the **Dataset** tab as CSV, Excel, JSON, or XML.

> ⏱️ Total time from signup to downloaded dataset: **3-5 minutes.** No coding required.

***

### 💼 Business use cases

<table>
<tr>
<td width="50%" valign="top">

#### 🏘️ Real Estate & Property Tech

- Track HK land sale records and tender outcomes
- Map planning approvals to neighborhood demand
- Monitor public housing stock and waitlists
- Enrich listing platforms with district demographics

</td>
<td width="50%" valign="top">

#### 🚇 Transit & Logistics

- Real-time MTR, bus, and ferry feed ingestion
- HK airport arrival and departure boards in product
- Cargo and trade port data for logistics dashboards
- Routing engines enriched with HK traffic flows

</td>
</tr>
<tr>
<td width="50%" valign="top">

#### 💼 Fintech & Compliance

- Company registry and licence-status checks
- Regulatory dataset monitoring for KYC pipelines
- Currency, statistics, and economic indicator feeds
- HK-specific compliance and reporting automation

</td>
<td width="50%" valign="top">

#### 🌦️ Environment & Smart City

- Air-quality dashboards using EPD feeds
- Real-time weather and typhoon track ingestion
- Energy and utility consumption dashboards
- Public-safety and emergency notification feeds

</td>
</tr>
</table>

***

### 🔌 Automating Hong Kong Open Data Scraper

Control the scraper programmatically for scheduled runs and pipeline integrations:

- 🟢 **Node.js.** Install the `apify-client` NPM package.
- 🐍 **Python.** Use the `apify-client` PyPI package.
- 📚 See the [Apify API documentation](https://docs.apify.com/api/v2) for full details.

The [Apify Schedules feature](https://docs.apify.com/platform/schedules) lets you trigger this Actor on any cron interval. Daily refreshes keep a downstream warehouse aligned with new dataset publications and metadata updates.

***

### 🌟 Beyond business use cases

Open civic data powers more than commercial workflows. The same structured records support research, education, civic projects, and personal initiatives.

<table>
<tr>
<td width="50%">

#### 🎓 Research and academia

- Urban planning and policy theses on HK datasets
- Reproducible studies with cited dataset pulls
- Open-data exercises for university courses
- Comparative open-government research across cities

</td>
<td width="50%">

#### 🎨 Personal and creative

- Side-project dashboards for HK residents
- Visualizations of typhoon tracks or pollution trends
- Hobbyist apps that surface bus or ferry timings
- Static-site mashups of public datasets

</td>
</tr>
<tr>
<td width="50%">

#### 🤝 Non-profit and civic

- Watchdog tracking of public spending and land tenders
- Refugee and migrant resource maps
- Community advocacy with transit accessibility data
- Free educational materials on local government data

</td>
<td width="50%">

#### 🧪 Experimentation

- Train forecasting models on HK weather feeds
- Prototype civic chatbots backed by real datasets
- Test data-pipeline templates against varied formats
- Benchmark ETL tools on a real multi-format catalog

</td>
</tr>
</table>

***

### 🤖 Ask an AI assistant about this scraper

Open a ready-to-send prompt about this ParseForge actor in the AI of your choice:

- 💬 [**ChatGPT**](https://chat.openai.com/?q=How%20do%20I%20use%20the%20Hong%20Kong%20Open%20Data%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🧠 [**Claude**](https://claude.ai/new?q=How%20do%20I%20use%20the%20Hong%20Kong%20Open%20Data%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🔍 [**Perplexity**](https://perplexity.ai/search?q=How%20do%20I%20use%20the%20Hong%20Kong%20Open%20Data%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🅒 [**Copilot**](https://copilot.microsoft.com/?q=How%20do%20I%20use%20the%20Hong%20Kong%20Open%20Data%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)

***

### ❓ Frequently Asked Questions

#### 🧩 How does it work?

Pick catalog mode for a portal-wide walk or dataset mode for a single record. Set keyword or ID, click Start. The Actor returns rows with full metadata and every resource file's direct download link.

#### 📏 How complete is the metadata?

The HK portal is maintained by the Office of the Government Chief Information Officer. Most fields are populated by the publishing department. Some smaller departments leave optional fields like `dataDictionaryUrl` empty.

#### 🔁 How often is the catalog refreshed?

Datasets are added and updated continuously by HK government departments. Every Actor run hits the live portal, so new datasets and metadata edits appear immediately.

#### 🌐 Are titles available in Traditional Chinese?

Yes. Bilingual title support is part of the portal. Many records expose English and Traditional Chinese titles, and the `description` field is also frequently bilingual.

#### 📥 What formats do the resource files come in?

CSV, JSON, XML, GeoJSON, KMZ, PDF, XLS, and more. The `resources` array carries the format string per file so you can route to the right downstream parser.

#### ⏰ Can I schedule regular runs?

Yes. Use Apify Schedules to trigger this Actor on any cron interval (hourly, daily, weekly) and keep a downstream warehouse in sync.

#### ⚖️ Is this data legal to use?

Yes. HK government data is published under the Public Sector Information licence which permits non-commercial and most commercial reuse with attribution. Always check the per-dataset `license` field.

#### 💼 Can I use this data commercially?

In most cases yes, under the HK PSI Licence with attribution. A handful of datasets carry additional terms, so honor the `license` string on each record.

#### 💳 Do I need a paid Apify plan to use this Actor?

No. The free plan covers testing and small runs (10 records per run). A paid plan unlocks the higher cap, scheduling, and concurrency.

#### 🔁 What happens if a run fails or gets interrupted?

Apify retries transient errors automatically. If a run still fails, inspect the log, fix the input, and restart. Partial datasets are preserved.

#### 🆘 What if I need help?

Our support team is here. Use the Apify platform messaging or the Tally form linked below.

***

### 🔌 Integrate with any app

Hong Kong Open Data Scraper connects to any cloud service via [Apify integrations](https://apify.com/integrations):

- [**Make**](https://docs.apify.com/platform/integrations/make) - Automate multi-step workflows
- [**Zapier**](https://docs.apify.com/platform/integrations/zapier) - Connect with 5,000+ apps
- [**Slack**](https://docs.apify.com/platform/integrations/slack) - Get run notifications in your channels
- [**Airbyte**](https://docs.apify.com/platform/integrations/airbyte) - Pipe HK open data into your warehouse
- [**GitHub**](https://docs.apify.com/platform/integrations/github) - Trigger runs from commits and releases
- [**Google Drive**](https://docs.apify.com/platform/integrations/drive) - Export datasets straight to Sheets

You can also use webhooks to trigger downstream actions when a run finishes. Push fresh catalog records into your ingest pipeline or alert your data team in Slack.

***

### 🔗 Recommended Actors

- [**🌍 OurAirports Scraper**](https://apify.com/parseforge/ourairports-scraper) - Global airport database
- [**📈 Indexmundi Scraper**](https://apify.com/parseforge/indexmundi-scraper) - Global demographic and economic indicators
- [**🦋 GBIF Biodiversity Scraper**](https://apify.com/parseforge/gbif-biodiversity-scraper) - Global biodiversity occurrences
- [**🏛️ Library of Congress Scraper**](https://apify.com/parseforge/loc-gov-library-of-congress-scraper) - 170M+ digitized cultural records
- [**🌦️ NOAA Weather Scraper**](https://apify.com/parseforge/noaa-weather-scraper) - US weather observations and forecasts

> 💡 **Pro Tip:** browse the complete [ParseForge collection](https://apify.com/parseforge) for more reference-data scrapers.

***

**🆘 Need Help?** [**Open our contact form**](https://tally.so/r/BzdKgA) to request a new scraper, propose a custom data project, or report an issue.

***

> **⚠️ Disclaimer:** this Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by the Government of the Hong Kong Special Administrative Region or any of its departments. All trademarks mentioned are the property of their respective owners. Only publicly available catalog data is collected, under the Hong Kong PSI Licence.

# Actor input Schema

## `maxItems` (type: `integer`):

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000

## `mode` (type: `string`):

Choose how to source datasets.

## `searchQuery` (type: `string`):

Substring matched against dataset slugs in catalog mode (case-insensitive). Leave empty to walk the entire catalog.

## `datasetId` (type: `string`):

Dataset slug to fetch (e.g. aahk-team1-flight-info, ckf-team1-chuen-kee-ferry-service-fare).

## Actor input object example

```json
{
  "maxItems": 10,
  "mode": "catalog",
  "searchQuery": "weather"
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxItems": 10,
    "mode": "catalog",
    "searchQuery": "weather"
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/data-gov-hk-hong-kong-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "maxItems": 10,
    "mode": "catalog",
    "searchQuery": "weather",
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/data-gov-hk-hong-kong-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "maxItems": 10,
  "mode": "catalog",
  "searchQuery": "weather"
}' |
apify call parseforge/data-gov-hk-hong-kong-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=parseforge/data-gov-hk-hong-kong-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Hong Kong Open Data Scraper",
        "description": "Export datasets from data.gov.hk, the Hong Kong government open data portal. Browse the full catalog or fetch specific datasets. Pull titles, organizations, descriptions, tags, update frequency, resource files, formats, licences, and direct download links.",
        "version": "1.0",
        "x-build-id": "O1bWExRJ8UmzYhhhN"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/parseforge~data-gov-hk-hong-kong-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-parseforge-data-gov-hk-hong-kong-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/parseforge~data-gov-hk-hong-kong-scraper/runs": {
            "post": {
                "operationId": "runs-sync-parseforge-data-gov-hk-hong-kong-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/parseforge~data-gov-hk-hong-kong-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-parseforge-data-gov-hk-hong-kong-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 1000000,
                        "type": "integer",
                        "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000"
                    },
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "catalog",
                            "dataset"
                        ],
                        "type": "string",
                        "description": "Choose how to source datasets."
                    },
                    "searchQuery": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "Substring matched against dataset slugs in catalog mode (case-insensitive). Leave empty to walk the entire catalog."
                    },
                    "datasetId": {
                        "title": "Dataset ID",
                        "type": "string",
                        "description": "Dataset slug to fetch (e.g. aahk-team1-flight-info, ckf-team1-chuen-kee-ferry-service-fare)."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
