Relatime train data to a Text file

Hello People,
I am new to API, PHP and any type of coding. Please forgive me if I sound dumb or unclear.

We wanted to generate a text file using a script/Code (php ) to fetch real-time train data from a specific station (Circular quay or Wynyard) for next 5-10 trains using API key. can anyone please help or guide on how to create the script with stop ID to generate a text file output.
I have tried to follow the instruction provided on the NSW portal but unable to code with stop ID or generate a text file output. we do have NEC live Parser which will Parse the PHP and will keep refreshing the text file each 600 Mili second.


If you follow the instructions using the API Explorer to download the realtime file in Protocol Buffer format. THe easist way to convert the file to json format is to download a Python script to convert it. All of which are available with examples on the Google GTFS Realtime page at Feed examples  |  Realtime Transit  |  Google Developers

1 Like

Hi Anir –

We also have some APIs which we’ll be releasing publicly in a few week’s time. They are currently going through testing and verification. These may be more suitable to your needs.