Transport
Transport copied to clipboard
"type" ignored in locations query
I'm trying to get a list of stations but it seems that all location types are returned instead:
doc: http://transport.opendata.ch/docs.html#locations request: http://transport.opendata.ch/v1/locations?query=Z%C3%BCrich-Bahnhofstrasse&type=station response:
...
{"id":null,"name":"UBS Switzerland AG Bahnhofstrasse, Z\u00fcrich, Bahnhofstr. 72","score":null,"coordinate":{"type":"WGS84","x":null,"y":null},"distance":null}
...
I would expect to receive a list with only stations
in it, no pois
or addresses
.
Correct, the type
parameter is currently not supported, there's no matching parameter on https://timetable.search.ch/api/help#stationboard.
Use the official list if you're not interested in autocompletion: https://opentransportdata.swiss/de/dataset/didok
Thanks, Christian. That list helped a lot and I'm able to query the connections
endpoint successfully. @fabian, if you don't plan to support the type
query, you're free to close this issue.
Thank you both very much.
Is it planned to support this parameter anytime in the near future? If not maybe you could remove it from the documentation as it currently implies the parameter is working as expected.