Bus stop identification for use with the Journey Planner


#1

Hi, the following request returns bus journeys from Brandon Hill Cemetery to Shannon Corner Superstores:

https://api.tfl.gov.uk/Journey/JourneyResults/BANDON%20HILL%20CEMETERY/to/SHANNON%20CORNER%20SUPERSTORES?

This works fine but some bus stop names are not unique. Is it possible to use Stop_Code_LBSL, Bus_Stop_Code or Naptan_Atco from your ‘London Bus Stops.xls’ document to uniquely identify bus stops. If so please include some examples.


#2

To get a list of Bus Stops, use the StopPoint API e.g.

https://api.tfl.gov.uk/StopPoint/Mode/bus?page=1

The API is paginated so if you want to retrieve all the bus stops you’ll need to request subsequent pages…

If you just want to get the full StopPoint details for the AtcoCode, get the StopPoint by Id:

https://api.tfl.gov.uk/StopPoint/490010374A

More info on this API in this blog post.


#3

Thanks, I can use the icsCode from that list to uniquely identify bus stops, so

https://api.tfl.gov.uk/Journey/JourneyResults/BANDON%20HILL%20CEMETERY/to/SHANNON%20CORNER%20SUPERSTORES?

would be :

https://api.tfl.gov.uk/Journey/JourneyResults/1003576/to/1003967?

Cheers Tim.