API by MTREC
This Postman collection provides information about the types of APIs and acts as a quick user guide for using our API service.
Please contact us if you have any questions.
Rate Limiting
Our API employs rate limiting to control the volume of requests to the server within a specified time frame. This helps mitigate malicious bot activity and reduces strain on the backend infrastructure.
Details:
Queries Per Second (QPS): The maximum allowed QPS is 1 request per second, or equivalently, 10 requests per 10 seconds from same IP Address.
Exceeding Rate Limit: If the rate limit is exceeded, the server will respond with an HTTP 429 Too Many Requests status code, along with a JSON response containing the following information:
Your IP address
Total number of requests made in the last 10 seconds
Rate Limit Reset: The rate limit is reset every 10 seconds.
GETTrain Active Status
The API endpoint shows the numbers of trains which are active and put into service based on the crowdsourced data from MTREC Spotters.
GETKlang Valley Train Service Status
This API endpoint shows the real-time train service status as well as service updates operated by RapidKL and Express Rail Link (ERL).
GETTrain Live Position
This API endpoint shows the current train position of the rail operator. Only KTM Berhad is available for now.
Credit to : https://developer.data.gov.my/realtime-api/gtfs-realtime