ParseForge Scrapers

Hong Kong MTR Realtime Scraper

parseforge/hk-mtr-realtime-scraper

AutomationIntegrationsTravel

Scrapes real-time Hong Kong MTR train arrival data by line and station. Returns each arrival as a flat row with line, station, destination, and time.

Run this scraper See the API call
Total users
2
Monthly active
1
Total runs
85
Bookmarked
0
Rating
Not rated yet
Last modified
9 days ago

Overview

ParseForge

Hong Kong MTR Realtime Scraper

Scrape real-time Hong Kong MTR train arrivals for any line and station, up to a million records per run. Each record includes the line, station, destination, arrival time, and status. No login or API key. Export to CSV, JSON, Excel, or XML.

Hong Kong MTR's official data portal needs an API key and rate-limits you. This reads the public real-time arrival feeds directly, filtered by line and station, and returns each match in one fixed schema.

Who uses it What they scrape Hong Kong MTR for
Commuters Check when the next train arrives at their station
App developers Build transit apps with live MTR arrival times
Transit analysts Monitor service frequency and delays across lines
Researchers Study Hong Kong public transport usage patterns

What it does

This Actor collects real-time Hong Kong MTR train arrival data by line and station, and returns each arrival as a flat row.

  • ๐Ÿš‡ Line filter: pick one of the ten MTR lines, from Tuen Ma Line to Disneyland Resort Line.
  • ๐Ÿš‰ Station filter: narrow results to a single station code, like ETS for East Tsim Sha Tsui.
  • ๐Ÿ”ข Record limit: cap the number of arrivals per run, from 1 to 1,000,000.
  • ๐Ÿ“ค Multiple exports: download as CSV, JSON, Excel, or XML.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

What you can do with Hong Kong MTR data

๐Ÿ“ฑ Build a live arrival app.

A developer runs the Actor every minute for the Tsuen Wan Line and pushes the latest arrivals to a mobile app.

๐Ÿš‰ Check your commute.

A commuter sets the station code to their home station and gets the next few train arrivals before leaving.

๐Ÿ“Š Monitor service performance.

A transit analyst collects arrivals across all lines for a week and calculates on-time performance and headway variability.

๐Ÿ” Research travel patterns.

A researcher gathers arrival data for multiple stations to study peak-hour crowding and service frequency.

Why choose this scraper

What you get
Real-time data Live train arrival times straight from the MTR feed
Line and station filters Target exactly the route you care about
Simple setup No API key or authentication needed
Flexible export CSV, JSON, Excel, or XML for any workflow

How it compares

This Actor focuses on real-time MTR heavy rail arrivals, while the Hong Kong Transit Scraper covers multiple transit modes and bilingual names.

Feature ParseForge Hong Kong Transit Scraper - MTR, KMB, Citybus, Light Rail
Real-time MTR train arrivals Yes Yes
MTR Light Rail data No Yes
KMB and Citybus bus data No Yes
Bilingual English / Traditional Chinese station names No Yes
Filter by MTR line and station Yes Not listed
No API key required Yes Not listed

Configure the run

Drive the Actor with a line code and an optional station code, and the record limit caps how many arrivals are returned per run. The Input tab lists every parameter.

A first run with the defaults:

{
 "maxItems": 10,
 "line": "TML",
 "station": "ETS"
}

A larger pull:

{
 "maxItems": 200,
 "line": "TML",
 "station": "ETS"
}

Pricing

Pay-per-result: $0.0085 per result collected. You pay only for the results written to your dataset.

Results collected Approximate cost
100 results $0.85
1,000 results $8.50
10,000 results $85.00

New Apify accounts start with $5 in free credit.

Free users

Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.

Run it

  1. Create a free Apify account with $5 in credit.
  2. Open the Hong Kong MTR Realtime Scraper.
  3. Set your inputs and any filters, then click Start.
  4. Export the results as CSV, Excel, JSON, or XML from the Dataset tab.

Run it programmatically through the Apify API (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.

Use with AI agents (MCP)

Give an AI agent live access to Hong Kong MTR through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/hk-mtr-realtime-scraper"

Then prompt it in plain language to run the scraper and read back the results.

Troubleshooting

Why am I getting no results?

Check that the line code and station code are valid. Station codes are case-sensitive, so use uppercase like ETS. Also try increasing the maxItems value.

Why is the station filter not working?

Make sure the station code belongs to the selected line. For example, ETS is on the Tuen Ma Line, not the Island Line.

Why did the run stop before reaching maxItems?

The upstream feed may have returned fewer arrivals than requested. Try running again later or choose a busier line.

Can I get Traditional Chinese station names?

No, this Actor returns English names only. For bilingual names, use the Hong Kong Transit Scraper.

Why is the data delayed?

The MTR feed updates every few seconds. If you need the latest data, run the Actor more frequently.

FAQ

Question Answer
Do I need an MTR API key? No. This Actor reads the public real-time arrival feed directly, so no registration or key is required.
Which MTR lines are supported? All ten heavy rail lines: Tuen Ma, East Rail, Tsuen Wan, Kwun Tong, Island, Tseung Kwan O, Tung Chung, South Island, Airport Express, and Disneyland Resort.
Can I filter by station? Yes, enter a station code like ETS for East Tsim Sha Tsui or ADM for Admiralty. Leave it blank to get all stations on the selected line.
How many records can I get per run? You can set the maximum records from 1 to 1,000,000. The Actor stops once it reaches that number.
What does each record contain? Each record includes the line, station, destination, arrival time, and status, along with other fields from the real-time feed.
What export formats are available? You can export the results as CSV, JSON, Excel, or XML.
Is the data in English or Chinese? The feed returns station names in English. Traditional Chinese names are not included in this Actor.
How often should I run this Actor? For live arrival apps, run it every minute. For analysis, you can schedule it less frequently.
Can I get data for MTR Light Rail or buses? No, this Actor only covers MTR heavy rail lines. For buses and Light Rail, use the Hong Kong Transit Scraper.
Is there a free trial? Apify offers a free monthly usage tier. Check your plan for details.

Related actors

Browse the full ParseForge collection for more scrapers.

๐Ÿ†˜ Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.

โš ๏ธ Disclaimer. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by MTR Corporation Limited. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

Input

FieldTypeWhat it doesDefault
maxItems integer How many records to collect per run. 10
line string (10 options) MTR line code (e.g. TML, EAL, TWL). TML
station string Station code (e.g. ETS, ADM, CEN). ETS

Pricing

from $7.50 per 1,000 results

Charged forWhat it isPrice each
result Single result in the default dataset. $0.0075 to $0.0085

Tiered: the lower figure is the price on a higher Apify plan. Billing and the free credit live on Apify.

API

One POST returns the dataset directly. Same shape for every scraper in the library, so swapping the slug is the only change.

POST ยท run and get results
curl -X POST "https://api.apify.com/v2/acts/parseforge~hk-mtr-realtime-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "helloWorld": 123
  }'

Examples

Input that runs as-is.

input.json
{
  "helloWorld": 123
}

Reviews

No reviews yet. Be the first.

Issues

We build and maintain this scraper, so a problem with it comes to us. Report it on the Apify listing and the thread stays attached to the scraper where the next person can find it: open an issue.

Broken and urgent, or you would rather not post in public? Write to parseforge@protonmail.com and it reaches the people who wrote it.

Related scrapers

Run Hong Kong MTR Realtime Scraper on Apify All scrapers