Sample API WebRequests


I’m new to open data @ transport NSW and I am having some trouble constructing web requests to get responses in JSON format.

Can anyone post some sample web request strings (related to any of the real time APIs) that will create a JSON encoded response.



Hey @SMDauto,

I’m assuming you’re looking for public transport real-time feeds.

If you’re after JSON encoded responses, you can check out the Trip Planner API. You should be able to get example requests using the Explore API function on the Open Data Hub.

Some of the other real time APIs are provided in the GTFS-realtime standard, which uses Protocol Buffers to encode the data. There are other forum threads which go into a bit more detail on how you can use these feeds.

Hope that helps!