How can one retrieve list of unique staions data for tube,dlr ,tram and overground?


#1

If I point to https://api.tfl.gov.uk/Stoppoint/mode/tube the api returns 1683 objects. Which includes duplicated entry in the form of entrance 1, entrance 2 etc.

For example, point to that endpoint above and search for “stationNaptan”: “940GZZLUAMS” youll get 14 results including children element. My aim is to create a List with unique stations name for tube, dlr, tram and overground. Cant figure out how or if it can be done using the api?


#2

hi @syed-hoque,

it may be worth filtering the response from the API using the StopPoint types (perhaps NaptanMetroStation or NaptanRailStation)

regards,

James Evans
Technology Service Operations