Rana Maps developers

Beta

Directions

Today: live (Beta) since 11 November 2026. Routing covers Lagos today; all of Nigeria comes with the Nigeria release.

What it does

Gives a route from an origin to a destination, with optional stops on the way, as a line, a distance and a time.

Request

POST https://maps-api.ranamaps.com/v1/directions/route

curl https://maps-api.ranamaps.com/v1/directions/route \
  -H "X-Rana-Key: $RANA_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "origin": {"lat": 6.4541, "lng": 3.3947},
    "destination": {"lat": 6.5965, "lng": 3.3421},
    "mode": "okada",
    "alternatives": true
  }'
Field Required Notes
origin, destination yes {"lat", "lng"}, or {"place_id": "…"} with one of our place ids. A destination place routes to its open gate
waypoints no Up to 8 points to pass through, in order
mode no car (default), okada, keke, bicycle, walk, transit
alternatives no true for up to two more routes. Ignored with waypoints
avoid no Any of tolls, highways, ferries
departure_time no ISO time, for example 2026-11-11T08:30:00+01:00. Used for gate opening hours, not traffic

Answer (example values)

{
  "routes": [
    {
      "distance_m": 18412,
      "duration_s": 2140,
      "geometry": "o~{zKq}xiE...",
      "legs": [{
        "distance_m": 18412,
        "duration_s": 2140,
        "start": { "lat": 6.4541, "lng": 3.3947 },
        "end": { "lat": 6.5965, "lng": 3.3421 },
        "steps": [{
          "instruction": "Turn right onto Ikorodu Road.",
          "maneuver": "turn-right",
          "distance_m": 2300,
          "duration_s": 260,
          "street_names": ["Ikorodu Road"],
          "location": { "lat": 6.5012, "lng": 3.3778 },
          "geometry": "…"
        }]
      }]
    }
  ],
  "attribution": "© Rana Maps © OpenStreetMap"
}

Coverage

All of Nigeria once the Nigeria release is deployed (built and tested, not live yet). Gates and closed roads are known mostly in Lagos, so routes elsewhere may pass a gate we have not heard of.

Limits

Trial: 60 requests a minute, 2,000 a day. See limits and usage.