Directions API
A directions API with okada and keke routes.
One request gives a route, a distance and a time for a car, okada, keke, bicycle or on foot. Estate gates and closed roads are left out.
- Beta
- All of Nigeria
- Free every month to start
A real route from our routing engine, drawn by our own web SDK. Map data © Rana Maps © OpenStreetMap.
Modes
Routes the way people really travel.
Arrive at the way in, not the wall.
A pin on the wall sends a rider round the block.
- Gates left out. Closed gates and roads are skipped, from contributor reports.
- Places route to the open gate. Send a place as the destination.
- Opening hours. Add a departure_time and gate hours are used.
- Lagos first. Routing covers all Nigeria; gates are known mostly in Lagos.
Options
One request, the options you need.
| Mode or option | What you get |
|---|---|
| The default. Vans and ride quotes. | |
| A motorcycle taxi route. | |
| A tricycle taxi route. | |
| Short hops. | |
| Last-metre legs and walking directions. | |
| Up to 8 stops, in order. | |
| Up to two, not together with waypoints. | |
| Tolls, highways or ferries. |
A distance matrix for planning the day.
Every origin to every destination, in one call.
- Up to 100 cells. Origins times destinations. 10 by 10 fits; 20 by 10 does not.
- About a quarter of a second. For a 10 by 10 matrix in Lagos on our test machine.
- Same modes, same gates. Match 10 riders to 10 pickups.
- Clean GPS. Snap to roads takes up to 100 points. See delivery and dispatch.
# Okada route with an alternative 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}' # Back: distance_m, duration_s, route line, steps
Honest limits
What works today.
Works today
- Five modes. car, okada, keke, bicycle, walk
- Gates and closed roads. left out of the route
- Distance matrix. up to 100 cells
Not yet
- Live traffic. times come from typical speeds
- Public transport. transit answers with no routes for now
- Navigation session. the API is stateless; send the latest position as the new origin
Questions
Directions questions.
Something else? Write to us and a person will answer.
Which travel modes does the directions API support?
Car (the default), okada, keke, bicycle and walk. Public transport answers with no routes for now.
Does it use live traffic?
No. Times come from typical speeds, not today's traffic.
How does it handle estate gates?
Gates and roads closed to a mode are left out of the route, and a place destination routes to its open gate. Gates are known mostly in Lagos.
How many stops can a route have?
Up to 8 waypoints, in order. You can also ask for up to two alternative routes, though not together with waypoints.
How big can a distance matrix be?
Up to 100 cells per request, which is origins multiplied by destinations. Each cell counts as one unit of usage.
Route your first okada in minutes.
Create your organisation, make a key and call the API. Your first requests every month are free.