Planning journeys earlier has always been tough, since traffic conditions vary greatly over time. Developers have used live traffic information from the Google Maps APIs for years to assist drivers with this problem, however up to currently, this has been accessible just for journeys beginning near to the traveling date, and restricted to Google Maps for Work customers only.

Today Google tends to extend traffic predictions within the Google Maps APIs – a feature for predictive decisions in travel times. This may let developers set up a journey hours, days or perhaps weeks ahead, using Google’s model of what the traffic conditions are going to be like on that day.

Using these new traffic options is super simple—just add the time of departure parameter to Directions API queries and the results will contain the period of time estimate given the predicted traffic conditions at that moment. The route returned could also change depending on traffic conditions, that lets developers, suggest the quickest route to their users. As an example, the image below shows the quickest route from San Francisco International Airport to the Mountain view at the Google campus, late at midnight when there’s no traffic (blue), and through peak hour when an accident on main road 101 has slowed traffic to a crawl (red).

Screen Shot 2015-11-10 at 8.26.11 PM

Since traffic conditions are varied, developers will set an optional traffic model parameter to decide on whether or not you would like to choose between estimated options of the travel time.

To learn additional about the traffic features within the Google Maps features, please take a look at this video or check out the documentation for the Directions API.