Hello. I’d like to get results for ONLY bus when I search for bus, ONLY tube when I search for tube, etc. I thought this would be the effect of mode=Bus or mode=Tube, but when I call
https://api.tfl.gov.uk/Journey/JourneyResults/1008644/to/1000206?&mode=Bus
I get routes that include “summary”: “Victoria line to Victoria”.
I’ve tried increasing the walking time, but this doesn’t help. I’m analysing the results of a commuter survey where, in this case, someone has said they get the bus from Kennington to Sloane Square, so it doesn’t matter if a route including tube would be quicker- it absolutely has to be a bus route.
Many thanks,
PK
@pk_traveller You’ve done the right thing - the modes are listed under - https://api.tfl.gov.uk/Line/Meta/Modes
I guess the answer is “deploy filters” on the output.
From what I recall, you often get a walking route too, even when you’ve not specifically asked for one of those either.
Thanks very much for this, @briantist. I looked at the data a bit more and realised I probably don’t have enough precision for bus routes- people have just said the area, not the bus stop, so it will be very hard to ensure I’m really reproducing people’s actual trips, even if I filter for just bus travel. I’ll ask them to provide more precise data next time we do this, and look into filtering in the interim.
Thanks again.
@pk_traveller If you want a list of Bus Stops (by usable Naptan codes) I can recommend Download national stop data - NaPTAN - DfT as a good data source.