Understanding Trip Planner APIs

Penny Pang
Graduation Thesis 2019
3 min readOct 27, 2019

This is the API that we will be using through the project as Trip Planner APIs is designed to help developers create their own personal public transport trip planning application.

APIs interact with the transportnsw.info trip planner and provide the ability for NSW public transport trip planning, departure board, travel alerts, real-time transport services, walk and drive legs and fares.

Full documentation can be found here

Explore API

Navigate to explore the Trip Planner API but make sure to select the your Application Name from the Application dropdown to have your API Key working.

There are several APIs within the Trip Planner API. Initially, I thought the Trip Planner API will just solve my problem and create the whole app for me, but NO. There are a combinations of API needed to be used for different results and output depending on the purpose of the application.

Stop Finder API

This endpoint returns info about stops that match the search criteria. A list of stops and locations that can be used in trip planner requests.

Returns: all NSW public transport stop, station, wharf, point of interest and known addresses for associated input

Used for: auto-suggest/auto-complete

Input: Coordinate value or location name (eg. Central)

Trip API

This endpoint is used to find a list of journeys between two locations at the specified date and time. For example, if the user is at the Airport and wants to get to Manly using public transport but isn’t sure how exactly, this call will tell them exactly which train, bus, ferry or light rail to catch, and between which stops. It is extremely detailed, and includes fare/ticketing information, as well as the the specific path the vehicle(s) will take.

Returns: transportation mode (train, bus, ferry etc.), routes, fare. It is extremely detailed returning suggested journeys

Used for: Planning trips given journey between origin and destination at specific date and time

Input: date/time, origin, destination

Departure_Mon API

This endpoint returns a list of departures for a given location based on the date and time specified. This data can be used to display a “upcoming departures” board for a stop.

Returns: Upcoming departures

Used for: Knowing the departure information of a public transport

Input: stops ID

Add_Info API

This endpoint returns a list of service alerts or additional information about travelling on the public transport network. This list can be filtered by date, route type, route, operator or stop.

Returns: Service alerts, additional information (likely to be string)

Used for: Additional information on service alert

Input: (?)

Coord API

This endpoint returns places of interest based on the given coordinate and a radius. The types of POIs can be controlled, so if, for example, you only want Opal resellers returned, you can do so.

Returns: Opal resellers, POI, stops/stations

Used for: Coordinate based with GPS

Input: coordinates, radius

Which one am I using?

I am using Stop_Finder API for auto-suggest and taking the user’s input (likely to be name) and then map it to Departure_Mon API to get the upcoming departure time for that input from the Stop_Finder ID.

--

--

Penny Pang
Graduation Thesis 2019

Full-time UX/UI Designer, Part-time online entrepreneur, Casual food blogger and innovation advocate