Early accessWe are building Rana Maps in the open: all of Nigeria on the map, Lagos in the most detail.See what is live

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
maps-api.ranamaps.com/v1/directions/route
A Rana Maps render of Lagos: a gold route runs from Victoria Island across Ikoyi and the Lekki–Ikoyi bridge to Lekki Phase I, with a blue start pin and a green end pin.

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.

CarOkadaKekeBicycleWalk
5travel modes
8waypoints, in order
2alternative routes
100matrix cells per call

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.
Illustration: an okada route that ends at an estate's open gate, not the closed one
The route ends at the open gate.

Options

One request, the options you need.

Mode or optionWhat you get
CarThe default. Vans and ride quotes.
OkadaA motorcycle taxi route.
KekeA tricycle taxi route.
BicycleShort hops.
WalkLast-metre legs and walking directions.
WaypointsUp to 8 stops, in order.
AlternativesUp to two, not together with waypoints.
AvoidTolls, 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.
Illustration: 3 riders by 4 drops, best matches in gold with minutes
3 × 4 = 12 cells in one call.

The request

One call, one route.

Coordinates or place ids in. Fields are in the directions docs.

# 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

Price

Free every month, then per 1,000.

Billed in naira, before VAT. See pricing.

Directions₦2,500per 1,000 requests25,000 free a month
Distance matrix₦1,500per 1,000 cells25,000 cells free
Snap to roads₦2,000per 1,000 requests25,000 free a month

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.