1. Directions with encoded polyline result
Curl request
$ curl 'https://utils.limosys.net/geo/directions?waypoints=Origin+Address%7CWaypoint+Address%7C25.0%2C-25.0%7CDestination+Address&key=YOUR_GEO_API_KEY' -i -X GET \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Accept: application/json'
HTTP request
GET /geo/directions?waypoints=Origin+Address%7CWaypoint+Address%7C25.0%2C-25.0%7CDestination+Address&key=YOUR_GEO_API_KEY HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: utils.limosys.net
HTTP response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, GET, PUT, OPTIONS, DELETE
Access-Control-Max-Age: 3600
Access-Control-Allow-Headers: origin, content-type, accept, authorization
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Set-Cookie
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 233
[{"routes":[{"pointsEncoded":"3nC0D3DP01NT51337","duration":10,"distance":10,"waypointsEncoded":"3NC0D3DW47P01NT5","boundsSW":{"lat":25.0,"lon":-25.0},"boundsNE":{"lat":25.0,"lon":-25.0}}],"source":"LOCAL","duration":0,"distance":0}]
HTTPie request
$ http GET 'https://utils.limosys.net/geo/directions?waypoints=Origin+Address%7CWaypoint+Address%7C25.0%2C-25.0%7CDestination+Address&key=YOUR_GEO_API_KEY' \
'Content-Type:application/json;charset=UTF-8' \
'Accept:application/json'
Request body
Request parameters
Parameter | Description |
---|---|
|
Addresses or Coordinates separated by vertical bar "|" |
|
Limosys API Key |
|
Calculate alternative routes if available "yes", or "no" (Optional) |
|
Route with traffic if available "yes", or "no" (Optional) |
|
Fetch from thirdparty "yes" or "no" (Optional) |
|
"yes" or "no" - default "yes" - only encoded points returned (Optional) |
Response body
[{"routes":[{"pointsEncoded":"3nC0D3DP01NT51337","duration":10,"distance":10,"waypointsEncoded":"3NC0D3DW47P01NT5","boundsSW":{"lat":25.0,"lon":-25.0},"boundsNE":{"lat":25.0,"lon":-25.0}}],"source":"LOCAL","duration":0,"distance":0}]
Response fields
Path | Type | Description |
---|---|---|
|
|
Array of alternative directions - empty if not found |
|
|
Duration in seconds |
|
|
Distance in meters |
|
|
Array of routes (legs) - usually just one, will only parse to legs with 'encoded=no' |
|
|
Encoded polyline |
|
|
Route duration in seconds |
|
|
Route distance in meters |
|
|
Original waypoints snapped to route and encoded |
|
|
Route South-West LatLng bounds |
|
|
Route North-East LatLng bounds |
|
|
Source of Directions Data LOCAL, MBOX, LOCAL_TRAFFIC, LOCAL_TRAFFIC_ADJUSTED, LOCAL_LIVE_TRAFFIC, GOOGLE |
2. Directions with LatLng coordinates result
Curl request
$ curl 'https://utils.limosys.net/geo/directions?waypoints=Origin+Address%7CWaypoint+Address%7C25.0%2C-25.0%7CDestination+Address&key=YOUR_GEO_API_KEY&encoded=no' -i -X GET \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Accept: application/json'
HTTP request
GET /geo/directions?waypoints=Origin+Address%7CWaypoint+Address%7C25.0%2C-25.0%7CDestination+Address&key=YOUR_GEO_API_KEY&encoded=no HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: utils.limosys.net
HTTP response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, GET, PUT, OPTIONS, DELETE
Access-Control-Max-Age: 3600
Access-Control-Allow-Headers: origin, content-type, accept, authorization
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Set-Cookie
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 484
[{"routes":[{"points":[{"lat":25.0,"lon":-25.0},{"lat":25.0,"lon":-25.0},{"lat":25.0,"lon":-25.0},{"lat":25.0,"lon":-25.0},{"lat":25.0,"lon":-25.0},{"lat":25.0,"lon":-25.0},{"lat":25.0,"lon":-25.0},{"lat":25.0,"lon":-25.0}],"duration":10,"distance":10,"waypoints":[{"lat":25.0,"lon":-25.0},{"lat":25.0,"lon":-25.0},{"lat":25.0,"lon":-25.0},{"lat":25.0,"lon":-25.0}],"boundsSW":{"lat":25.0,"lon":-25.0},"boundsNE":{"lat":25.0,"lon":-25.0}}],"source":"LOCAL","duration":0,"distance":0}]
HTTPie request
$ http GET 'https://utils.limosys.net/geo/directions?waypoints=Origin+Address%7CWaypoint+Address%7C25.0%2C-25.0%7CDestination+Address&key=YOUR_GEO_API_KEY&encoded=no' \
'Content-Type:application/json;charset=UTF-8' \
'Accept:application/json'
Request body
Request parameters
Parameter | Description |
---|---|
|
Addresses or Coordinates separated by vertical bar "|" |
|
Limosys API Key |
|
"yes" or "no" - default "yes" - only encoded points returned (Optional) |
Response body
[{"routes":[{"points":[{"lat":25.0,"lon":-25.0},{"lat":25.0,"lon":-25.0},{"lat":25.0,"lon":-25.0},{"lat":25.0,"lon":-25.0},{"lat":25.0,"lon":-25.0},{"lat":25.0,"lon":-25.0},{"lat":25.0,"lon":-25.0},{"lat":25.0,"lon":-25.0}],"duration":10,"distance":10,"waypoints":[{"lat":25.0,"lon":-25.0},{"lat":25.0,"lon":-25.0},{"lat":25.0,"lon":-25.0},{"lat":25.0,"lon":-25.0}],"boundsSW":{"lat":25.0,"lon":-25.0},"boundsNE":{"lat":25.0,"lon":-25.0}}],"source":"LOCAL","duration":0,"distance":0}]
Response fields
Path | Type | Description |
---|---|---|
|
|
Array of alternative directions - empty if not found |
|
|
Duration in seconds |
|
|
Distance in meters |
|
|
Array of routes (legs) - usually just one, will only parse to legs with 'encoded=no' |
|
|
Decoded LatLng points |
|
|
Route duration in seconds |
|
|
Route distance in meters |
|
|
Original waypoints snapped to route |
|
|
Route South-West LatLng bounds |
|
|
Route North-East LatLng bounds |
|
|
Source of Directions Data LOCAL, MBOX, LOCAL_TRAFFIC, LOCAL_TRAFFIC_ADJUSTED, LOCAL_LIVE_TRAFFIC, GOOGLE |
3. Directions Not Found
Curl request
$ curl 'https://utils.limosys.net/geo/directions?waypoints=NON-EXISTENT+ADDRESS+1%7C0.0%2C+-0.0&key=YOUR_GEO_API_KEY&encoded=no' -i -X GET \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Accept: application/json'
HTTP request
GET /geo/directions?waypoints=NON-EXISTENT+ADDRESS+1%7C0.0%2C+-0.0&key=YOUR_GEO_API_KEY&encoded=no HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: utils.limosys.net
HTTP response
HTTP/1.1 404 Not Found
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, GET, PUT, OPTIONS, DELETE
Access-Control-Max-Age: 3600
Access-Control-Allow-Headers: origin, content-type, accept, authorization
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Set-Cookie
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
HTTPie request
$ http GET 'https://utils.limosys.net/geo/directions?waypoints=NON-EXISTENT+ADDRESS+1%7C0.0%2C+-0.0&key=YOUR_GEO_API_KEY&encoded=no' \
'Content-Type:application/json;charset=UTF-8' \
'Accept:application/json'
Request body
Request parameters
Parameter | Description |
---|---|
|
Addresses or Coordinates separated by vertical bar "|" |
|
Limosys API Key |
|
"yes" or "no" - default "yes" - only encoded points returned (Optional) |
Response body
4. Directions Bad Request
Curl request
$ curl 'https://utils.limosys.net/geo/directions?waypoints=SINGLE+WAYPOINT&key=YOUR_GEO_API_KEY&encoded=no' -i -X GET \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Accept: application/json'
HTTP request
GET /geo/directions?waypoints=SINGLE+WAYPOINT&key=YOUR_GEO_API_KEY&encoded=no HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: utils.limosys.net
HTTP response
HTTP/1.1 400 Bad Request
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, GET, PUT, OPTIONS, DELETE
Access-Control-Max-Age: 3600
Access-Control-Allow-Headers: origin, content-type, accept, authorization
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Set-Cookie
Content-Type: application/json
Content-Length: 20
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Not enough waypoints
HTTPie request
$ http GET 'https://utils.limosys.net/geo/directions?waypoints=SINGLE+WAYPOINT&key=YOUR_GEO_API_KEY&encoded=no' \
'Content-Type:application/json;charset=UTF-8' \
'Accept:application/json'
Request body
Request parameters
Parameter | Description |
---|---|
|
Addresses or Coordinates separated by vertical bar "|" |
|
Limosys API Key |
|
"yes" or "no" - default "yes" - only encoded points returned (Optional) |
Response body
Not enough waypoints