# Filter params departure\_mon

**URL:** <https://opendataforum.transport.nsw.gov.au/t/filter-params-departure-mon/1063>\
**Category:** How to\
**Created:** [October 17, 2017, 5:44am UTC](https://opendataforum.transport.nsw.gov.au/t/filter-params-departure-mon/1063 "2017-10-17T05:44:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![devguy](https://avatars.discourse-cdn.com/v4/letter/d/c0e974/32.png) [@devguy](https://opendataforum.transport.nsw.gov.au/u/devguy)\
**Post date:** [October 17, 2017, 5:44am UTC](https://opendataforum.transport.nsw.gov.au/t/filter-params-departure-mon/1063/1 "2017-10-17T05:44:47Z")

</div>

GET /departure\_mon

can you “filter” by adding params in the url request

For example:

how do you limit the returned results to just “ **BUS** ” ?

---

<div class="post-metadata">

**Author:** ![yvonne.lee](https://avatars.discourse-cdn.com/v4/letter/y/c37758/32.png) [@yvonne.lee](https://opendataforum.transport.nsw.gov.au/u/yvonne.lee)\
**Post date:** [October 17, 2017, 8:20am UTC](https://opendataforum.transport.nsw.gov.au/t/filter-params-departure-mon/1063/2 "2017-10-17T08:20:18Z")

</div>

I’m hoping one of our lovely app developers will jump in here but basically I would use the Stop ID to indicate the type of stop and therefore the mode… as a hint our stop IDs tend to be in the format of PostcodeNumber e.g. 2000434 is a stop near our office.

---

<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:** [October 17, 2017, 9:23am UTC](https://opendataforum.transport.nsw.gov.au/t/filter-params-departure-mon/1063/3 "2017-10-17T09:23:43Z")

</div>

`departure_mon` can work on a mode-exclusion basis. By default, it returns all means/modes of transport. You can then specify modes to exclude using the `exclMOT_<MOTId>=1` parameter.

The MOTIds are:

- 1 = Trains
- 4 = tram
- 5 = bus
- 7 = coach
- 9 = ferry
- (and I think 11 = school bus but I’d double check)

For example, if you wanted to exclude everything except bus, you’d do:

`&exclMOT_1=1&exclMOT_4=1&exclMOT_7=1&exclMOT_9=1&exclMOT_11=1`

Hope that makes sense 🙂

---

<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:** [October 17, 2017, 9:34am UTC](https://opendataforum.transport.nsw.gov.au/t/filter-params-departure-mon/1063/4 "2017-10-17T09:34:45Z")

</div>

There’s also some documentation produced by Transport for London ([http://content.tfl.gov.uk/journey-planner-api-documentation.pdf](http://content.tfl.gov.uk/journey-planner-api-documentation.pdf)) which may be useful. Both TfNSW and TfL use EFA for their trip planning APIs and so some of the request parameters would be similar.

On there, they list `inclMOT_<MOTId>=1` as an option as long as you have the parameter `includedMeans=1` as well. I haven’t tested this on TfNSW’s API though.
