After working with the Google Directions API for a project I found multiple responses with a (much) shorter value in duration_in_traffic than duration. An example extract from one of the responses i got:
"duration": {
"text": "23 mins",
"value": 1374
},
"duration_in_traffic": {
"text": "16 mins",
"value": 941
},
"end_address": "2868 Mission St, San Francisco, CA 94110, USA",
"end_location": {
"lat": 37.7522994,
"lng": -122.4184684
},
"start_address": "O'Farrell St & Powell St, San Francisco, CA 94102, USA",
"start_location": {
"lat": 37.78640559999999,
"lng": -122.4082846
},
This doesn’t seem to make much sense to me, since i assumed duration is simply the duration without traffic, while duration_in_traffic obviously incorporates traffic conditions. I found an answer on a different thread, but the person answering provided no source to back up his or her claim/observation. Is there more information about the duration response field out there besides the documentation itself, which just describes it as “[indicating] the total duration of this leg”? Is there a source stating that it actually is the average time for that route? And what is the difference between duration and duration_in_traffic?