Find Routes
GET
https://api.woosmap.com/distance/route/json
Get distance, duration and path (as a polyline) for a pair of origin and destination, based on the recommended route between those two points for a specified travel mode.
Rate limit: 10/1s
Rate limit with TRAFFIC: 20/1s
Authorization
Query Parameters
waypoints
object
mode
string Defaults to
driving method
string Defaults to
time units
string Defaults to
metric language
string Defaults to
en avoid
object
arrival_time
object
departure_time
object
origin
string required
destination
string required
alternatives
boolean Defaults to
false details
string Defaults to
none Header Parameters
accept-language
object
Response
Successful Response
Errors
401
Unable to locate credentials.
application/json
detail
string required
402
Out of free quota.
application/json
detail
string required
403
Credentials found, but not matching.
application/json
detail
string required
422
Validation Error
429
Rate limit reached
application/json
details
string required
curl -L 'https://api.woosmap.com/distance/route/json?origin=49.31067%2C4.14525&destination=49.31344%2C4.15293&mode=driving&language=en&alternatives=true&method=distance&details=full&key=YOUR_PUBLIC_API_KEY' \
-H 'Referer: http://localhost'
const requestOptions = {
method: "GET",
redirect: "follow"
};
fetch("https://api.woosmap.com/distance/route/json?origin=49.31067%2C4.14525&destination=49.31344%2C4.15293&mode=driving&language=en&alternatives=true&method=distance&details=full&key=YOUR_PUBLIC_API_KEY", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
import requests
url = "https://api.woosmap.com/distance/route/json?origin=49.31067%2C4.14525&destination=49.31344%2C4.15293&mode=driving&language=en&alternatives=true&method=distance&details=full&key=YOUR_PUBLIC_API_KEY"
payload = {}
headers = {
'Referer': 'http://localhost'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
{
"status": "OK",
"routes": [
{
"overview_polyline": {
"points": "a_~kHgrhXu@yAe@y@c@q@e@q@c@o@e@m@y@eAa@g@a@c@Y[UUQQYUQOSOQKSKOKQISIWKSEUEMCQAa@CeA@[E}@EUAOEOGKKIOM[I]Ea@A[?QBIBU?WFWDOLUP[P]j@y@^g@`@i@NUNONMJKJIFELCJBJAHGFIDMBSASBKDILURa@LWt@eAHO"
},
"bounds": {
"northeast": {
"lat": 49.315678,
"lng": 4.152915
},
"southwest": {
"lat": 49.31073,
"lng": 4.145162
}
},
"notice": "",
"legs": [
{
"distance": {
"text": "1 km",
"value": 1038
},
"duration": {
"text": "1 min",
"value": 75
},
"start_location": {
"lat": 49.31067,
"lng": 4.14525
},
"end_location": {
"lat": 49.31344,
"lng": 4.15293
},
"start_waypoint": 0,
"end_waypoint": 1,
"end_address": "D 30",
"start_address": "D 151",
"steps": [
{
"distance": "676 m",
"duration": "1 min",
"polyline": "a_~kHgrhXu@yAe@y@c@q@e@q@c@o@e@m@y@eAa@g@a@c@Y[UUQQYUQOSOQKSKOKQISIWKSEUEMCQAa@CeA@[E}@EUAOEOGKKIOM[I]Ea@A[?Q",
"start_location": {
"lat": 49.31073,
"lng": 4.145163
},
"end_location": {
"lat": 49.315679,
"lng": 4.149621
},
"travel_mode": "DRIVING",
"instructions": {
"action": 2,
"summary": "Drive northeast on D 151.",
"verbal_succint": "Drive northeast. Then Enter the roundabout and take the 2nd exit onto D 30.",
"verbal_before": "Drive northeast on D 151. Then Enter the roundabout and take the 2nd exit onto D 30.",
"verbal_after": "Continue for 700 meters."
}
},
{
"distance": "22 m",
"duration": "1 min",
"polyline": "}}~kHcniXBIBU?W",
"start_location": {
"lat": 49.315679,
"lng": 4.149621
},
"end_location": {
"lat": 49.31563,
"lng": 4.149905
},
"travel_mode": "DRIVING",
"instructions": {
"action": 26,
"summary": "Enter the roundabout and take the 2nd exit onto D 30.",
"verbal_alert": "Enter the roundabout and take the 2nd exit onto D 30.",
"verbal_succint": "Enter the roundabout and take the 2nd exit.",
"verbal_before": "Enter the roundabout and take the 2nd exit onto D 30."
}
},
{
"distance": "198 m",
"duration": "1 min",
"polyline": "u}~kH{oiXFWDOLUP[P]j@y@^g@`@i@NUNONMJKJIFELC",
"start_location": {
"lat": 49.31563,
"lng": 4.149905
},
"end_location": {
"lat": 49.314292,
"lng": 4.151623
},
"travel_mode": "DRIVING",
"instructions": {
"action": 27,
"summary": "Exit the roundabout onto D 30.",
"verbal_succint": "Exit the roundabout.",
"verbal_before": "Exit the roundabout onto D 30.",
"verbal_after": "Continue for 200 meters."
}
},
{
"distance": "46 m",
"duration": "1 min",
"polyline": "iu~kHsziXJBJAHGFIDMBSAS",
"start_location": {
"lat": 49.314292,
"lng": 4.151623
},
"end_location": {
"lat": 49.314041,
"lng": 4.151976
},
"travel_mode": "DRIVING",
"instructions": {
"action": 26,
"summary": "Enter the roundabout and take the 2nd exit onto D 30.",
"verbal_alert": "Enter the roundabout and take the 2nd exit onto D 30.",
"verbal_succint": "Enter the roundabout and take the 2nd exit.",
"verbal_before": "Enter the roundabout and take the 2nd exit onto D 30."
}
},
{
"distance": "96 m",
"duration": "1 min",
"polyline": "ws~kHy|iXBKDILURa@LWt@eAHO",
"start_location": {
"lat": 49.314041,
"lng": 4.151976
},
"end_location": {
"lat": 49.313431,
"lng": 4.152916
},
"travel_mode": "DRIVING",
"instructions": {
"action": 27,
"summary": "Exit the roundabout onto D 30.",
"verbal_succint": "Exit the roundabout. Then, in 100 meters, You will arrive at your destination.",
"verbal_before": "Exit the roundabout onto D 30. Then, in 100 meters, You will arrive at your destination.",
"verbal_after": "Continue for 100 meters."
}
},
{
"distance": "1 m",
"duration": "1 min",
"polyline": "}o~kHubjX",
"start_location": {
"lat": 49.313431,
"lng": 4.152916
},
"end_location": {
"lat": 49.313431,
"lng": 4.152916
},
"travel_mode": "DRIVING",
"instructions": {
"action": 4,
"summary": "You have arrived at your destination.",
"verbal_alert": "You will arrive at your destination.",
"verbal_before": "You have arrived at your destination."
}
}
]
}
],
"main_route_name": "D 151",
"recommended": true
}
]
}