title: Difference between duration and duration_in_traffic in Google Directions API Response
body: <p>After working with the <a href="https://developers.google.com/maps/documentation/directions/intro" rel="nofollow noreferrer">Google Directions API</a> for a project I found multiple responses with a (much) shorter value in <em>duration_in_traffic</em> than <em>duration</em>. An example extract from one of the responses i got:</p>
  
  <pre><code>"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 &amp; Powell St, San Francisco, CA 94102, USA",
  "start_location": {
      "lat": 37.78640559999999,
      "lng": -122.4082846
  },
  </code></pre>
  
  <p>This doesn’t seem to make much sense to me, since i assumed <em>duration</em> is simply the <em>duration</em> <strong>without traffic</strong>, while <em>duration_in_traffic</em> obviously incorporates traffic conditions. I found an <a href="https://stackoverflow.com/questions/38863927/duration-in-traffic-less-than-duration-in-google-distance-matrix-api">answer</a> 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 <em>duration</em> response field out there besides the <a href="https://developers.google.com/maps/documentation/directions/intro#Legs" rel="nofollow noreferrer">documentation</a> 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?</p>