Bus Timings - TransportSG/TransportSG GitHub Wiki

TransportSG API - Bus Timings


Bus Timings by Bus Stop

Description

This API returns the timings for all bus arrivals at a given bus stop

Request URL

https://transportsg.me/api/timings/:busStopCode

Parameters

:busStopCode the bus stop code of the given bus stop

Response

Returns an array of objects that each contains the bus arrival times for a service

[ serviceData: object ]

Under serviceData:

service number: the bus service number.

destination number: the destination of the bus service. Do note that several bus services will call at the same bus stop twice in both directions (eg 131 towards Bukit Merah Int (10009) and St. Michael's Ter (52499) at Bukit Purmei (14381 Blk 109)). This field is stored as a string to ensure padding withs 0s for bus stops in downtown Singapore

timings array: an array containing estimated bus arrival data

[ estimatedBusArrival: object ]

Under timings:

arrivalTime Date:ISO8601-UTC the estimated arrival time of the bus. This time is cached internally for 1 minute before being refreshed.

isWAB boolean: an indicator of whether the bus supports wheelchair boarding. This does not indicate if the wheelchair lot is currently available, and should only be used as an advisor. Do note that on certain bus services, some buses may be wrongly detected to be non-wheelchair available. However, with the targeted plan of a fully wheelchair accessible bus fleet by 2020, this field may well be obsolete by then.

load number: an indicator of the loading on the bus. This number does not refer to the actual number of passengers on the bus, even though such data is recorded by LTA.

Possible values of load:

0: seating available

1: standing available

2: bus full - might have to wait for the next bus

busType number: an indicator of the type of bus that will be arriving.

Possible values of busType:

1: a single-deck bus

2: a double-deck bus

3: a bendy bus


Bus Timings by Service

Description

This API provides all the bus timings at all stops along a specified service

Request URL

https://transportsg.me/api/timings/bus/:service

Parameters

:service the bus service to retrieve the timings for

Response

Returns an array containing the bus arrival times for each direction.

[ serviceDirection: object ]

Under serviceDirection:

direction number: the direction the bus services plies along (see BusService.routeDirection)

destination string: the bus stop code of the bus service's terminus in that direction

stops array: an array containing all bus stops served by the route.

Under stops:

busStopCode: string: the bus stop code of the bus stop along the route. This field is stored as a string to pad 4 digit bus stop codes which are found in downtown Singapore to 5 digits, using 0s.

busStopName string: the name of the bus stop along the route.

busStopNumber number: a sequential indicator of the order a bus will serve bus stops along the route.

timings estimatedBusArrival: see BusTimings.serviceData.timings