Questions About GTFS-RT API Data Relationships

Hello, I hope this message finds you well. I’m reaching out with questions regarding the data relationships between different endpoints in the Public Transport - Realtime Trip Update APIs, as I’ve noticed some data duplication in my recent retrievals.

Question 1: Light Rail Endpoint Data Inclusion

I’m curious if the GET /lightrail/innerwest endpoint in Public Transport - Realtime Trip Update API v2 fully includes all data from the GET /lightrail/ endpoint in the original Public Transport - Realtime Trip Updates API. Currently, the data I’ve fetched from both endpoints shows overlaps, and clarification on their inclusion relationship would help avoid redundant data processing.

Question 2: Sydney Trains vs. NSW Trains Endpoint Relationship

Similarly, I’d like to confirm the relationship between two train-related endpoints:

  • GET /sydneytrains in Public Transport - Realtime Trip Update API v2

  • GET /nswtrains in the original Public Transport - Realtime Trip Updates API

Are these two endpoints in an inclusion relationship (one fully covering the other) or do they complement each other by providing distinct data subsets? I note that Sydney Trains and NSW Trains data are both included in the broader GTFS bundle, but the specific division between these realtime endpoints remains unclear.

Thank you very much for your time and assistance. Any clarification on these points would be greatly appreciated!

Hi,

Question 1: The innerwest v2 endpoint includes more detailed information than the lightrail v1 endpoint. The lightrail v1 endpoint was the original light rail API endpoint before the introduction of the CBDSELR and is now deprecated. Extra info may include the TfnswVehicleDescriptor (with air conditioning, wheelchair accessibility or vehicle model), vehicle speed, carriage descriptors, etc. The lightrail innerwest v2 endpoint is a superset of the lightrail v1 endpoint and it is not recommended to use the lightrail v1 endpoint anymore.

Question 2: sydneytrains and nswtrains are two distinct endpoints. Sydney Trains includes all trains within the electrified Sydney network (including suburban, intercity, freight, out of service, etc trains). Positions reported by this API are from the signal locations and data will only be updated when a train has moved. NSW Trains only includes all regional trains and coaches operated by “NSW TrainLink”. These positions are reported by GPS and are constantly being updated. While in the Sydney Trains area, NSW TrainLink trains will also appear on the Sydney Trains API and you’ll see the Sydney Trains one usually a bit ahead of the NSW Trains one as the signal is located ahead. But yes, generally they are distinct data sets and you should use the NSW TrainLink train when within the Sydney Trains area, not the Sydney Trains one.

1 Like