Request

origin: 75 9th Ave New York, NY destinations: Bridgewater Commons, Commons Way, Bridgewater, NJ|The Mall At Short Hills, Morris Turnpike, Short Hills, NJ|Monmouth Mall, Eatontown, NJ|Westfield Garden State Plaza, Garden State Plaza Boulevard, Paramus, NJ|Newport Centre Mall, Jersey City, NJ departure_time: 1541202457 traffic_model: best_guess mode: driving key: API_KEY

URL

https://maps.googleapis.com/maps/api/distancematrix/json?origins=75+9th+Ave+New+York,+NY&destinations=Bridgewater+Commons,+Commons+Way,+Bridgewater,+NJ|The+Mall+At+Short+Hills,+Morris+Turnpike,+Short+Hills,+NJ|Monmouth+Mall,+Eatontown,+NJ|Westfield+Garden+State+Plaza,+Garden+State+Plaza+Boulevard,+Paramus,+NJ|Newport+Centre+Mall,+Jersey+City,+NJ&departure_time=1541202457&traffic_model=best_guess&key=YOUR_API_KEY
XML

Response

<?xml version="1.0" encoding="UTF-8"?> <DistanceMatrixResponse> <status>OK</status> <origin_address>75 Ninth Ave, New York, NY 10011, USA</origin_address> <destination_address>Commons Way, Bridgewater, NJ 08807, USA</destination_address> <destination_address>Morris Turnpike, Short Hills, NJ 07078, USA</destination_address> <destination_address>Monmouth Mall, Eatontown, NJ 07724, USA</destination_address> <destination_address>Garden State Plaza Blvd, Paramus, NJ 07652, USA</destination_address> <destination_address>Newport Centre Mall, Jersey City, NJ 07302, USA</destination_address> <row> <element> <status>OK</status> <duration> <value>3334</value> <text>56 mins</text> </duration> <distance> <value>68781</value> <text>68.8 km</text> </distance> <duration_in_traffic> <value>3687</value> <text>1 hour 1 min</text> </duration_in_traffic> </element> <element> <status>OK</status> <duration> <value>2138</value> <text>36 mins</text> </duration> <distance> <value>34806</value> <text>34.8 km</text> </distance> <duration_in_traffic> <value>2487</value> <text>41 mins</text> </duration_in_traffic> </element> <element> <status>OK</status> <duration> <value>3930</value> <text>1 hour 6 mins</text> </duration> <distance> <value>86322</value> <text>86.3 km</text> </distance> <duration_in_traffic> <value>4044</value> <text>1 hour 7 mins</text> </duration_in_traffic> </element> <element> <status>OK</status> <duration> <value>2009</value> <text>33 mins</text> </duration> <distance> <value>32278</value> <text>32.3 km</text> </distance> <duration_in_traffic> <value>2082</value> <text>35 mins</text> </duration_in_traffic> </element> <element> <status>OK</status> <duration> <value>1113</value> <text>19 mins</text> </duration> <distance> <value>6879</value> <text>6.9 km</text> </distance> <duration_in_traffic> <value>1444</value> <text>24 mins</text> </duration_in_traffic> </element> </row> </DistanceMatrixResponse>
JSON

Response

{ "destination_addresses" : [ "Commons Way, Bridgewater, NJ 08807, USA", "Morris Turnpike, Short Hills, NJ 07078, USA", "Monmouth Mall, Eatontown, NJ 07724, USA", "Garden State Plaza Blvd, Paramus, NJ 07652, USA", "Newport Centre Mall, Jersey City, NJ 07302, USA" ], "origin_addresses" : [ "75 Ninth Ave, New York, NY 10011, USA" ], "rows" : [ { "elements" : [ { "distance" : { "text" : "68.8 km", "value" : 68781 }, "duration" : { "text" : "56 mins", "value" : 3334 }, "duration_in_traffic" : { "text" : "1 hour 1 min", "value" : 3687 }, "status" : "OK" }, { "distance" : { "text" : "34.8 km", "value" : 34806 }, "duration" : { "text" : "36 mins", "value" : 2138 }, "duration_in_traffic" : { "text" : "41 mins", "value" : 2487 }, "status" : "OK" }, { "distance" : { "text" : "86.3 km", "value" : 86322 }, "duration" : { "text" : "1 hour 6 mins", "value" : 3930 }, "duration_in_traffic" : { "text" : "1 hour 7 mins", "value" : 4044 }, "status" : "OK" }, { "distance" : { "text" : "32.3 km", "value" : 32278 }, "duration" : { "text" : "33 mins", "value" : 2009 }, "duration_in_traffic" : { "text" : "35 mins", "value" : 2082 }, "status" : "OK" }, { "distance" : { "text" : "6.9 km", "value" : 6879 }, "duration" : { "text" : "19 mins", "value" : 1113 }, "duration_in_traffic" : { "text" : "24 mins", "value" : 1444 }, "status" : "OK" } ] } ], "status" : "OK" }