Filter the coordinates generated from Directions API to 100 maximum

You could use line simplification on the output to produce similar lines with less points.
It might not work with the matching afterwards though, if the shape will be a lot different than before.

Best regards