Is there a way to work out which buses are electric?

I’m trying to create a list of electric buses (by reg number / number plate) in service today so I can differentiate them within the predictions and other APIs.

The only way I know how to do this right now is to manually download the Bus Fleet Audit Excel file (from March 2021) and use that to lookup which buses are electric.

This is fine, though the data is already out of date as there are many more electric buses that have entered service since March, which are contained within the prediction API responses but aren’t included in the 9-month-old fleet audit.

Is there a better and more up-to-date way to find out which buses are electric without having to wait until the next audit for 2022?

@robhawkes I think you might be able to use the ULEZ APIs such as …/Vehicle/UlezCompliance?vrm={vrm}

Thanks for the advice. I did check out those APIs and they seem promising, though as far as I can tell they don’t say for sure if a vehicle is electric (like in the fleet audit). They do sometimes contain the model of the bus which could be useful.

I did notice that sometimes a vehicle doesn’t exist in the emissions API even though the bus definitely exists and can be queried via other APIs. Also the model is “unknown” for some vehicles.

    "$type": "Tfl.Api.Presentation.Entities.VehicleMatch, Tfl.Api.Presentation.Entities",
    "vrm": "LK64DWG",
    "make": "OPTARE",
    "model": "Unknown",
    "colour": "Red",
    "compliance": "Compliant"

Even so, I think scraping the models from the emissions endpoint might be good enough for a first attempt. It’s just a shame that it only allows one vehicle per query as it’s going to take a lot of requests to populate the entire fleet.

1 Like

@robhawkes Good luck!