Simple data request (I hope)

I would like to create a list of bus chassis and body types using the data shown in the real-time trips feed. I just need to be able to download the file a few times to collect all the different types. How would I go about doing that please? I haven’t done any development work with the TFNSW data but I can deal with getting APIs, writing Javascript etc.
Thanks

Hi @RonB1949, welcome to our forum!

You can find the bus model/chassis in the Vehicle Positions API under the vehicle_model attribute for the vehicle_descriptor field. See below.
image
As for getting the file you can either call the API directly or download it through our API explorer. To do this you need to register on our website and set up an application to get an API key, see our get started page for a walk through.

Thanks,
Alex

Hi Alex
All good. I have an application and an API key. It works when I use ‘Try it out’ Now I just need some simple php code to return the data file. I have used php before but not curl. Any examples available please?
Thanks

Hi @RonB1949, our API explorer gives you a sample curl command after using the ‘Try it out!’ button. Unfortunately we provide very limited support for coding, we like to focus on the data! Hopefully another developer in our wonderful community can help out.

Also make sure to have a look at the following blog posts that outline how to use our data to build applications:

Thanks,
Alex