MapScale Docs
•••
MapScale API
GET/v1/route

Calculate a route with query parameters

Calculate a route between two or more ordered waypoints using a compact URL request.

LIVE API PLAYGROUND

Sign in or create an account

Continue to run live requests directly from the docs.

Sends this request to the live API and shows the real response.

Parameters

Equivalent request
curl \
  -H "X-MapScale-Key: $MAPSCALE_API_KEY" \
  "https://api.mapscale.io/v1/route?coordinates=100.5018%2C13.7563%3B100.5348%2C13.7466&profile=driving&lang=th"
Response
Default response
{
  "code": "Ok",
  "routes": [
    {
      "distance": 5420,
      "duration": 780,
      "geometry": {
        "type": "LineString",
        "coordinates": [
          [
            100.5018,
            13.7563
          ],
          [
            100.5348,
            13.7466
          ]
        ]
      },
      "legs": [
        {
          "distance": 5420,
          "duration": 780
        }
      ]
    }
  ],
  "waypoints": [
    {
      "location": [
        100.5018,
        13.7563
      ]
    },
    {
      "location": [
        100.5348,
        13.7466
      ]
    }
  ]
}

Responses

200Route computedapplication/json
400Invalid requestapplication/json
401mapscale/effect-api/UnauthorizedFailureapplication/json
403mapscale/effect-api/ForbiddenFailureapplication/json
404No route was foundapplication/json
429mapscale/effect-api/RateLimitedFailureapplication/json
500mapscale/effect-api/MiddlewareInternalFailureapplication/json
502Upstream routing engine failureapplication/json
503Upstream routing engine unavailable | mapscale/effect-api/UpstreamUnavailableFailureapplication/json

On this page