Transport for Ottawa, Canada API
Overview
The OC Transpo API provides real-time GPS bus tracking and schedule data for Ottawa's public transit system in Canada. You need to register for an API key on the OC Transpo developer page to access the data. The API returns XML or JSON and is useful for building apps that show live bus locations and next departures.
Beginner Tip
Register for an API ID and key at octranspo.com/en/plan-your-trip/travel-tools/developers and use the GetNextTripsForStop method to get upcoming arrivals at any stop by its four-digit stop number. Stop numbers are printed on every bus stop sign in Ottawa.
Available Data
Example Response
{
"route": "Line 1",
"origin": "Station A",
"destination": "Station B",
"departure": "08:30",
"arrival": "09:15",
"status": "On Time",
"delays_min": 0
} Field Reference
StopNo The four-digit identifier of the queried bus stop, matching the number printed on the stop sign. StopDescription Human-readable location description of the stop, such as RIDEAU / WALLER. RouteNo The route number of the bus service returning trips for this stop. TripDestination The final destination of the trip, shown as it appears on the bus headsign. AdjustedScheduleTime Adjusted arrival time in minutes from now, combining schedule data with real-time GPS updates. GPSSpeed Current speed of the bus in km/h as reported by the onboard GPS unit. Implementation Example
const url = "https://www.octranspo.com/en/plan-your-trip/travel-tools/developers";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
headers: {
"X-API-Key": "YOUR_API_KEY"
}
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Matrix Score Breakdown
Partially tested on Apr 5, 2026
Technical Specifications
Related Tags
Similar APIs
View All →AIS Hub
AIS Hub aggregates real-time Automatic Identification System data from a global network of shore-based receivers to track marine vessels.
AZ511
AZ511 is the official Arizona Department of Transportation traffic data API providing real-time road conditions, incidents, and camera information for Arizona highways.
Bay Area Rapid Transit
⭐ Beginner's PickThe BART API provides real-time train arrival predictions, station information, and service advisories for the Bay Area Rapid Transit system in the San Francisco Bay Area.
BlaBlaCar
BlaBlaCar provides programmatic access to search car sharing trips via REST API.
Boston MBTA Transit
⭐ Beginner's PickThe Boston MBTA Transit API gives you real-time data for the Massachusetts Bay Transportation Authority, including train, bus, and ferry arrivals.