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.
Base URL
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/routesEndpoints
/v1/transport/routesList all public transport routes with optional filters
Parameters: provider, type (rail/bus/brt), region, page, per_page
Example
GET /v1/transport/routes?provider=metrorail®ion=western_cape/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/v1/transport/stopsList all stops/stations with optional route and provider filters
Parameters: route_code, provider, type, page, per_page
Example
GET /v1/transport/stops?provider=gautrain/v1/transport/stops/nearbyFind 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/v1/transport/schedulesGet 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/v1/transport/faresRetrieve 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/v1/transport/statsDataset statistics (total routes, stops, providers, latest update)
Parameters: None
Example
GET /v1/transport/statsResponse 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
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
| Tier | Price | Rate Limit | Daily Quota | Monthly Quota |
|---|---|---|---|---|
| Free | R0/mo | 10 req/min | 100 | 1,000 |
| Starter | R499/mo | 60 req/min | 5,000 | 50,000 |
| Pro | R1,999/mo | 300 req/min | Unlimited | 500,000 |
Error Codes
All error responses follow a consistent JSON format:
{
"error": "error_code",
"message": "Human-readable description."
}| Status | Error Code | Description |
|---|---|---|
| 400 | invalid_request | The request body or query parameters are malformed. |
| 401 | unauthorized | Missing or invalid API key. |
| 403 | no_subscription | No active subscription for this API product. |
| 403 | quota_exceeded | Daily or monthly quota exceeded. |
| 404 | not_found | The requested resource does not exist. |
| 429 | rate_limit_exceeded | Too many requests. Check X-RateLimit-Remaining header. |
| 500 | internal_error | An unexpected server error occurred. |