You can authenticate using any of these methods:
- X-API-Key header (recommended):
X-API-Key: mtk_live_... - Authorization Bearer token:
Authorization: Bearer mtk_live_... - Query parameter:
?api_key=mtk_live_...
Key endpoint groups include:
- Service areas: list areas, area details, provider health status
- Real-time tracking: live vehicle positions (filterable by bus or rail)
- Routes and stops: route lists, route geometry, stop search, arrivals
- Nearby: stops near coordinates or a place name, with live arrivals
- Fares: fare calculation for BAS.MY, Rapid Penang, KTM Komuter, Penang Ferry
- KTM: stations, schedules, fare matrix for Komuter Utara
Full endpoint documentation is available at the developer portal.
GTFS (General Transit Feed Specification) is an open standard created by Google for publishing transit data. It comes in two parts:
- GTFS Static — schedule data (routes, stops, trips, timetables) distributed as ZIP files containing CSV tables.
- GTFS Realtime — live vehicle positions and trip updates, encoded in Protocol Buffers (protobuf), a compact binary format.
Malaysia's official open data platform at data.gov.my publishes GTFS feeds from transit operators including Prasarana (Rapid KL, Rapid Penang), APAD/BAS.MY (intercity and rural bus services across multiple states), KTM, and the Penang Ferry.
While the raw GTFS data on data.gov.my is free and publicly available, working with it directly requires protobuf decoding, CSV parsing, and significant processing. Our middleware handles all of that complexity, as it decodes the binary feeds, parses the static schedules, merges data from multiple providers into a single unified API, adds shape-based arrival predictions, fare calculation, and geocoding-powered stop search, and returns everything as clean JSON.