Directions API returning traffic light waypoints


I’m working on a project where we are trying to adjust the returned travel time from the directions API by the observed speed of Ambulance vehicles travelling along the same route.

At the moment the prediction error is still significant, especially during emergency driving. I believe part of the prediction error correlates to the requirement for the Ambulance vehicle to slow to a safe speed before proceeding through a traffic light controlled intersection.

I’d like to add into the prediction model the number of traffic light controlled intersections encountered across the route. This data appears available in the Map website. Where the route travels in a straight line through a set of traffic lights there is no waypoint or other information return to indicate the presence of the traffic lights.

Is it possible to configure a local server to return the number of traffic lights encountered? Either as a total count through that segment of the route or as separate waypoints for each encounter would be sufficient for what I’m trying to do.