The directions API includes a duration in the legs in the response:
https://developers.google.com/maps/documentation/directions/#Legs
These durations will depend on the travel mode (driving, walking, etc) that you specified in the request:
https://developers.google.com/maps/documentation/directions/#TravelModes