Predicting the map matched road ahead

I am using the map matcher to snap points live to the road network. Now I would like to get a short prediction ahead of the car. I would then like to make the naive assumption that the car will continue on the same road (through any intersection). My initial idea is to just extrapolate a few coordinates in the same direction ahead and map match on that. I have also been thinking about extracting the OSM way and just use that, but then it will be broken in intesections. Anyone have thought about and come to any conclusions on this?

You could use the /route endpoint and a heading and end location (both derived from your map matching results). There should be no need to extract OSM ways as this information does already exist in GraphHopper.

I am doing matching live as the vehicle moves so I don’t have an end location, which is why I want to get the prediction.

How can I extract the current road (OSM way id) which the car is travelling on?