SA Public Transport API

Routes, stops, schedules, and fares for South African public transit networks. Covers Prasa Metrorail, Gautrain, and MyCiTi Bus Rapid Transit with real-time schedule data and fare calculations.

Live

Base URL

https://api.crimate.net/v1/transport

Authentication

Include your Transport API key in the Authorization header.

curl -H "Authorization: Bearer db_transport_live_YOUR_KEY" \
     https://api.crimate.net/v1/transport/routes

Endpoints

GET/v1/transport/routes

List all public transport routes with optional filters

Parameters: provider, type (rail/bus/brt), region, page, per_page

Example

GET /v1/transport/routes?provider=metrorail&region=western_cape
GET/v1/transport/routes/{routeCode}

Get detailed information for a specific route by its code

Parameters: routeCode (required, path)

Example

GET /v1/transport/routes/MTR-CPT-SIM
GET/v1/transport/stops

List all stops/stations with optional route and provider filters

Parameters: route_code, provider, type, page, per_page

Example

GET /v1/transport/stops?provider=gautrain
GET/v1/transport/stops/nearby

Find stops near a geographic coordinate within a given radius

Parameters: lat (required), lon (required), radius_km (default 2), type

Example

GET /v1/transport/stops/nearby?lat=-33.9258&lon=18.4232&radius_km=5
GET/v1/transport/schedules

Get timetable schedules for a route or stop on a given date

Parameters: route_code, stop_code, date (YYYY-MM-DD), direction, page, per_page

Example

GET /v1/transport/schedules?route_code=MTR-CPT-SIM&date=2026-03-10
GET/v1/transport/fares

Retrieve fare information between two stops or for a route

Parameters: route_code, from_stop, to_stop, ticket_type

Example

GET /v1/transport/fares?from_stop=CPT&to_stop=SIM&ticket_type=single
GET/v1/transport/stats

Dataset statistics (total routes, stops, providers, latest update)

Parameters: None

Example

GET /v1/transport/stats

Response Examples

Routes response:

{
  "routes": [
    {
      "route_code": "MTR-CPT-SIM",
      "route_name": "Cape Town - Simon's Town",
      "provider": "Prasa Metrorail",
      "type": "rail",
      "region": "western_cape",
      "stops_count": 28,
      "first_departure": "05:15",
      "last_departure": "21:45",
      "status": "active"
    },
    {
      "route_code": "GT-PTR-JNB",
      "route_name": "Pretoria - Johannesburg",
      "provider": "Gautrain",
      "type": "rail",
      "region": "gauteng",
      "stops_count": 6,
      "first_departure": "05:30",
      "last_departure": "20:30",
      "status": "active"
    }
  ]
}

Try It

Enter your Transport API key to make a live request. Generate a key in the dashboard.

Try It

Make a live API call from your browser

GET
curl -H "Authorization: Bearer db_transport_live_YOUR_KEY" \
     "https://crimate.net/v1/transport/stats"

Data Sources

Prasa Metrorail

Commuter rail services operated by the Passenger Rail Agency of South Africa. Covers Cape Town, Johannesburg, Pretoria, Durban, and East London corridors with timetable and fare data.

Gautrain

High-speed commuter rail linking Johannesburg, Pretoria, and OR Tambo International Airport. Includes station data, schedules, and fare zones.

MyCiTi

Bus Rapid Transit system operated by the City of Cape Town. Covers trunk and feeder routes, stop locations, and integrated fare information.

Rate Limits

TierPriceRate LimitDaily QuotaMonthly Quota
FreeR0/mo10 req/min1001,000
StarterR499/mo60 req/min5,00050,000
ProR1,999/mo300 req/minUnlimited500,000

Error Codes

All error responses follow a consistent JSON format:

{
  "error": "error_code",
  "message": "Human-readable description."
}
StatusError CodeDescription
400invalid_requestThe request body or query parameters are malformed.
401unauthorizedMissing or invalid API key.
403no_subscriptionNo active subscription for this API product.
403quota_exceededDaily or monthly quota exceeded.
404not_foundThe requested resource does not exist.
429rate_limit_exceededToo many requests. Check X-RateLimit-Remaining header.
500internal_errorAn unexpected server error occurred.