Malaysia Transit
Real-time bus and train tracking across Malaysia. Never miss your ride again with live location updates and accurate arrival predictions.
What is Malaysia Transit?
Ever wondered how apps like Google Maps and Moovit know exactly where your bus is? Behind the scenes, there's a lot of data flowing, and it's not always easy to work with. That's where this middleware comes in.
1The Raw Data Problem
Transit operators like Prasarana and BAS.MY publish their data using GTFS (General Transit Feed Specification), a global standard used by transit agencies worldwide. It comes in two parts:
The "timetable" — routes, stops, schedules, and service calendars. Think of it as the official bus schedule book, but in data form.
The live feed — GPS positions, arrival predictions, and service alerts. Updated every few seconds, delivered in a compact binary format.
Great for standardization. Not so great if you just want to build an app quickly.
2What the Middleware Does
This middleware sits between the raw GTFS feeds and your application, doing the heavy lifting:
Pulls GTFS feeds from Prasarana, BAS.MY, and others — all in one place.
Takes GPS coordinates and figures out which bus is on which route, heading to which stop.
Factors in current delays, traffic patterns, and time-of-day to give you accurate ETAs.
Clean JSON endpoints that any app or website can use. No binary parsing required.
The Result?
You get to see exactly where your bus is and when it will arrive, without anyone having to wrestle with complex data formats. Developers can build apps in hours instead of weeks. Commuters get reliable, real-time information.
For Commuters
Use the live middleware to see exactly where your bus or train is, with accurate arrival predictions so you never wait unnecessarily.
For Developers
Access the API to build your own transit applications with real-time data, route information, and arrival predictions.
Key Features
Built with accuracy and reliability in mind
Real-time Vehicle Tracking
Live positions for buses and trains updated every 30 seconds
Shape-Based Arrival Predictions
40-60% more accurate ETAs using actual route geometry with rush hour adjustments
Departure Schedules
Get next departures, full schedules, and route operating status
Fare Calculator
Calculate fares for BAS.MY, Rapid Penang, KTM Komuter Utara, KTM Intercity, and Penang Ferry
Multi-Provider Integration
Seamlessly combines data from Prasarana, BAS.MY, and more
Interactive Maps
Visualize routes, stops, and real-time vehicles on beautiful maps
Persistent Caching
Instant area switching after first load with smart caching
GitHub Backup Fallback
Automatic fallback to backup repository when data.gov.my is unavailable
API Analytics Dashboard
Track API usage with cumulative stats, endpoint breakdowns, and per-area metrics
Service Areas
Covering major cities and regions across Malaysia
Klang Valley
Kuala Lumpur & Selangor
Covers: Kuala Lumpur, Selangor, and Putrajaya
Penang
Penang Island & Seberang Perai
Covers: George Town, Butterworth, mainland Penang
Kangar
Perlis
Covers: Kangar, Perlis (via Arau/Padang Besar)
Alor Setar
Kedah
Covers: Alor Setar, Kuala Kedah, Jitra, Kuala Nerang, Pendang, Sungai Petani, Tanjung Dawai, and Pantai Merdeka
Kota Bharu
Kelantan
Covers: Kota Bharu, Pengkalan Chepa, Pasir Mas, Rantau Panjang, Pengkalan Kubor, Bachok, Tumpat, Machang, Jeli, Kuala Krai, Gua Musang, and Jertih (Terengganu)
Kuala Terengganu
Terengganu
Covers: Kuala Terengganu, Merang, Batu Rakit, Kuala Berang, Bukit Payong, and Marang
Melaka
Melaka
Covers: Whole of Melaka and Tampin (Negeri Sembilan)
Johor Bahru
Johor
Covers: Johor Bahru, Iskandar Puteri, Kulai, Pasir Gudang, Ulu Tiram, Kota Tinggi, Pontian, and Bandar Dato Onn
Kuching
Sarawak
Covers: Kuching, Serian, Bau, Batu Kawa, Matang, Kampung Benuk, Demak Laut, Muara Tebas, and Bako
Ipoh
Perak
Covers: Ipoh, Kuala Kangsar, Chemor, Gopeng, Kampar, Batu Gajah, Seri Iskandar, and Sungai Siput
Seremban
Negeri Sembilan
Covers: Seremban, Nilai, Bahau, Kuala Pilah, Pekan Linggi, Tampin, Port Dickson, Kuala Klawang, Mantin, and Gemas
Kuantan
Pahang
Covers: Kuantan, Bandar Indera Mahkota, Pekan, Sungai Lembing, Gambang, and Cherating
Kota Kinabalu
Sabah
Covers: Whole of Kota Kinabalu
Powered by Official Government Data
All transit data is sourced from data.gov.my, Malaysia's official open data portal, ensuring you're working with authoritative, government-provided public transportation data.
Transit Operators:
Ready to Track Your Transit?
Try Malaysia Transit now or explore the API documentation for developers