PASAR API

🇲🇾 Live train positions ~ KTMB (GTFS-R)

← directory
KTMB via data.gov.myRealtimetier: openauth: no authpricing: freefreq: REALTIME

Response is GTFS-realtime Protobuf, not JSON. A September 2026 sample had ten vehicles with position timestamps within two minutes of the feed header. The feed may be empty outside operating hours; consumers must check timestamps.

More Realtime APIs All Malaysia APIs

Call it

curl --fail-with-body --location --max-time 30 'https://api.data.gov.my/gtfs-realtime/vehicle-position/ktmb' -o response.pb

AI prompt

I'm building an app using a public Malaysia API (no private credentials needed).

API: Live train positions ~ KTMB (GTFS-R)
Provider: KTMB via data.gov.my
Endpoint: GET https://api.data.gov.my/gtfs-realtime/vehicle-position/ktmb
Response format: PROTOBUF

Source: KTMB via data.gov.my (https://api.data.gov.my/gtfs-realtime/vehicle-position/ktmb)
Source type: Official public feed
Endpoint type: Public feed, non-JSON
Integration difficulty: Copy-paste ready
Last checked: 2026-09-16
Production caveat: Still handle downtime, changing fields, empty responses, and rate limits before shipping user-facing alerts.

Help me fetch and display this data. Follow the documented format and handle errors, empty responses, stale coverage, caching and rate limits.

Related Realtime APIs

7-day weather forecast (live)Weather warnings (live)Earthquake notices & historyBus positions ~ Prasarana GTFS-R (availability varies)Live bus positions ~ myBAS Johor (GTFS-R)BMKG Earthquake & Tsunami Feed ~ real-time Indonesia seismic dataHanoi Air Quality ~ live monitoring-station JSON from moitruongthudo.vnAEMET OpenData ~ Spain weather & climate dataMSC GeoMet ~ Canada weather, climate & water dataMet Eireann ~ Irish weather forecast API