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

waypoints

Addresses or Coordinates separated by vertical bar "|"

key

Limosys API Key

alternatives

Calculate alternative routes if available "yes", or "no" (Optional)

traffic

Route with traffic if available "yes", or "no" (Optional)

fetch

Fetch from thirdparty "yes" or "no" (Optional)

encoded

"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

Array of alternative directions - empty if not found

[].duration

Number

Duration in seconds

[].distance

Number

Distance in meters

[].routes[]

Array

Array of routes (legs) - usually just one, will only parse to legs with 'encoded=no'

[].routes[].pointsEncoded

String

Encoded polyline

[].routes[].duration

Number

Route duration in seconds

[].routes[].distance

Number

Route distance in meters

[].routes[].waypointsEncoded

String

Original waypoints snapped to route and encoded

[].routes[].boundsSW

Object

Route South-West LatLng bounds

[].routes[].boundsNE

Object

Route North-East LatLng bounds

[].source

String

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

waypoints

Addresses or Coordinates separated by vertical bar "|"

key

Limosys API Key

encoded

"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

Array of alternative directions - empty if not found

[].duration

Number

Duration in seconds

[].distance

Number

Distance in meters

[].routes[]

Array

Array of routes (legs) - usually just one, will only parse to legs with 'encoded=no'

[].routes[].points[]

Array

Decoded LatLng points

[].routes[].duration

Number

Route duration in seconds

[].routes[].distance

Number

Route distance in meters

[].routes[].waypoints[]

Array

Original waypoints snapped to route

[].routes[].boundsSW

Object

Route South-West LatLng bounds

[].routes[].boundsNE

Object

Route North-East LatLng bounds

[].source

String

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

waypoints

Addresses or Coordinates separated by vertical bar "|"

key

Limosys API Key

encoded

"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

waypoints

Addresses or Coordinates separated by vertical bar "|"

key

Limosys API Key

encoded

"yes" or "no" - default "yes" - only encoded points returned (Optional)

Response body

Not enough waypoints