I’m trying to create a request that returns train journeys between Penrith and Central station however I’m having bus trips returned as well.
I’ve tried looking at the documentation and found nothing there to indicate how to exclude or only include a mode of transport.
I also tried the steps in the forum post below and they didn’t seem to work.
This is my request, if I’m using exclMOT_ID wrong please let me know.
https://api.transport.nsw.gov.au/v1/tp/trip?outputFormat=rapidJSON&coordOutputFormat=EPSG%3A4326&depArrMacro=dep&itdDate=20250217&itdTime=0952&type_origin=any&name_origin=10101252&type_destination=any&name_destination=10101100&calcNumberOfTrips=6&TfNSWTR=true&version=10.2.1.42&itOptionsActive=1&cycleSpeed=16&exclMOT_4=1&exclMOT_5=1&exclMOT_7=1&exclMOT_9=1&exclMOT_11=1
Hello,
Thanks for reaching out to Transport NSW. You can check the flags mentioned in the document (Trip Planner APIs - Trip Planner APIs - TfNSW Open Data Hub and Developer Portal)
excludedMeans=1 exclMOT_1=1
Please try with various combinations and let me know if you need more information.
Regards
Balaji
phelum
3
2 Likes