Planisfy
Api

Directions API

Request Valhalla-backed point-to-point routes with GET coordinates or POST JSON bodies.

Directions API

Directions proxy to Valhalla's route action.

Routes

MethodRouteDescription
GET/directions/v1/{profile}/{lon,lat;lon,lat}Route from URL coordinates.
POST/directions/v1/{profile}Route from a bounded Planisfy JSON body.

GET supports 2 to 25 coordinates.

Profiles

Profiles map to Valhalla costing:

ProfilesValhalla costing
driving, driving-traffic, car, autoauto
walking, pedestrianpedestrian
cycling, bicycle, bikebicycle
trucktruck
busbus
motor_scootermotor_scooter
motorcyclemotorcycle

GET parameters

ParameterNotes
alternativesNumber of alternate routes, clamped to 3.
unitsDefaults to kilometers; miles is also supported.
languageDefaults to en.
curl "https://api.example.com/directions/v1/driving/9.1829,48.7758;9.2000,48.7800?units=kilometers" \
  -H "X-API-Key: pk_your_key_here"

POST body

{
  "locations": [
    { "lon": 9.1829, "lat": 48.7758 },
    { "lon": 9.2, "lat": 48.78 }
  ],
  "units": "kilometers",
  "language": "en",
  "alternatives": 0
}

The POST body accepts only locations, units, language, and alternatives. The URL profile determines Valhalla costing; unknown fields are rejected.

Auth, caching, and errors

Requests require API key or session auth and a reachable Valhalla service with graph data for the requested region. Successful GET responses cache for five minutes. Unknown profiles and invalid coordinates return 400 BAD_REQUEST.

On this page