How to get all stop points and current location for a vehicle?

When I have the vehicle ID of a bus (or tube, tram…),
which API can I use to fetch all the stop points and its current location ?

Thanks a lot

You’ll be looking for https://api.tfl.gov.uk/line/dlr/arrivals for the whole arrivals.

Hi Brian

Thanks a lot for your reply.

Can I achieve this with this API?

For example, for bus 135 with a vehicle, I’d like to list all the bus stops from start to destination, then highlight the current location (between two stop points) ?

You get the list of stops using https://api.tfl.gov.uk/line/135/Route/sequence/inbound and/or https://api.tfl.gov.uk/line/135/Route/sequence/outbound and then pick the live data from https://api.tfl.gov.uk/line/135/arrivals

:slight_smile:

Of course the “between two stop points” is the trickiest bit…

Hi Brian

Thanks a lot for your advices.

Would it be better if to get the live arrivals with this API (If the vehicle id is available)?
https://api.tfl.gov.uk/Vehicle/LJ61GVZ/Arrivals

it’s another option. I prefer to use “wider calls” and filter as this reduces the chances of running into accidental rate limiting.