Documentation

Build on Nairobi's
Transit Data Layer

API reference, integration guides, and code examples for developers building on real-time matatu telemetry and the Matatu Pulse platform.

Getting Started in 5 Minutes

The Matatu Pulse API provides real-time vehicle telemetry, route data, ETA predictions, and historical trip records for Nairobi's matatu network. Here's how to make your first request.

Authentication

All API requests require a Bearer token passed in the Authorization header. Obtain your API key from the developer dashboard.

cURL JavaScript Python
# Get live vehicle positions for Route 46
curl -X GET "https://api.matatupulse.co.ke/v1/routes/46/vehicles" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

Example Response

Vehicle positions are returned as GeoJSON-compatible objects with heading, speed, and sacco metadata.


  {
    "route_id": "46",
    "route_name": "CBD → Kangemi",
    "updated_at": "2025-02-21T08:14:32Z",
    "vehicles": [
      {
        "id": "KBZ-441A",
        "lat": -1.2687,
        "lng": 36.8031,
        "heading": 274,
        "speed_kmh": 32,
        "sacco": "Supermetro",
        "occupancy": "medium",
        "timestamp": "2025-02-21T08:14:29Z"
      }
    ]
  }

Core Endpoints

All endpoints are versioned under https://api.matatupulse.co.ke/v1. The WebSocket feed is available at wss://stream.matatupulse.co.ke/v1.

MethodEndpointDescription
GET/routesList all tracked routes with metadata
GET/routes/{id}/vehiclesLive vehicle positions for a route
GET/routes/{id}/etaETA predictions for all stops on a route
GET/vehicles/{id}Single vehicle live status and metadata
GET/stops/{id}/arrivalsUpcoming arrivals at a specific stage
GET/faresCurrent fare estimates by route
WS/stream/routes/{id}Real-time position stream for a route
WS/stream/vehicles/{id}Real-time stream for a single vehicle

Recent Changelog

Subscribe to the full changelog for detailed release notes.

v1.4.0
Feb 2025
Fares endpoint GA

The /fares endpoint is now generally available after 3 months in beta. Returns current and peak-hour estimates by route.

v1.3.2
Jan 2025
Occupancy field added

Vehicle responses now include an `occupancy` field (low / medium / high) derived from sacco-reported load data.

v1.3.0
Nov 2024
WebSocket heartbeats

Added 30s ping/pong heartbeat to WebSocket connections to prevent silent disconnections on mobile data.

v1.2.0
Sep 2024
Historical trip API

Opened historical trip data endpoints covering all routes back to January 2024 in 15-minute aggregated intervals.

For Riders

Stop Guessing When Your Matatu Arrives

Live tracking, arrival predictions, and fare estimates — so every commute runs on your terms.

Download App
For Operators

Running a Sacco or Fleet?

Real-time tracking, delay alerts, route analytics, and optimization tools built for Nairobi roads.

Request a Demo