# Sample API WebRequests

**URL:** <https://opendataforum.transport.nsw.gov.au/t/sample-api-webrequests/1249>\
**Category:** How to\
**Created:** [March 30, 2018, 7:02am UTC](https://opendataforum.transport.nsw.gov.au/t/sample-api-webrequests/1249 "2018-03-30T07:02:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SMDauto](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@SMDauto](https://opendataforum.transport.nsw.gov.au/u/SMDauto)\
**Post date:** [March 30, 2018, 7:02am UTC](https://opendataforum.transport.nsw.gov.au/t/sample-api-webrequests/1249/1 "2018-03-30T07:02:36Z")

</div>

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.

Thanks!

---

<div class="post-metadata">

**Author:** ![jxeeno](https://sea1.discourse-cdn.com/flex019/user_avatar/opendataforum.transport.nsw.gov.au/jxeeno/32/210_2.png) [@jxeeno](https://opendataforum.transport.nsw.gov.au/u/jxeeno)\
**Post date:** [March 31, 2018, 7:34am UTC](https://opendataforum.transport.nsw.gov.au/t/sample-api-webrequests/1249/2 "2018-03-31T07:34:51Z")

</div>

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!

Cheers,  
Ken
