Developer portal for the General Transit Feed Specification
Real-time (GTFS-RT) Feed
Contact
Please contact our support team at octranspo-dev@ottawa.ca on any questions related to the developer portal.
GTFS Real-time
GTFS Real-Time or GTFS-RT provides a standardized format for transmitting real-time updates about public transit systems. This includes information about vehicle locations, arrival times, departure times, and service alerts.
OC Transpo as part of the GTFS-RT feed provides vehicle locations and trip updates that include arrival and departure times. Service alerts is not available at this time.
For more information please refer to the official GTFS-RT documentation
GTFS Schedule
GTFS-RT is designed to work alongside the static GTFS (General Transit Feed Specification) format. GTFS defines a static schedule and structure for public transit data, while GTFS-RT adds real-time updates to this data.
Download the OC Transpo GTFS static files here.
OC Transpo strongly recommends the download of GTFS Schedule file on a daily basis to ensure the GTFS-RT feed is compatible.
The preferred time to download the compressed zip file would be between mid-night and 2 am EST, just before the start of service day.
API Subscriptions
Click on Product for subscription details. Available to authorised users only.
Base URL
https://nextrip-public-api.azure-api.net/octranspo/
API Version
The APIs will use versioning within the URL path. The current version is v1.
Common Parameters
Name
Value
Description
format
String ( optional )
The format for the response. Valid formats include:
json
protobuf
Default value is protobuf
API Methods
Vehicle Positions
URL
https://nextrip-public-api.azure-api.net/octranspo/gtfs-rt-vp/v1/VehiclePositions
The example using CURL. Replace the <SUBSCRIPTION_KEY> with the subscription key assigned.
Results in JSON
curl -X GET 'https://nextrip-public-api.azure-api.net/octranspo/gtfs-rt-vp/v1/VehiclePositions?format=json' -H 'Ocp-Apim-Subscription-Key: <SUBSCRIPTION_KEY>'
Results in Protobuf
curl -X GET 'https://nextrip-public-api.azure-api.net/octranspo/gtfs-rt-vp/v1/VehiclePositions' -H 'Ocp-Apim -Subscription-Key: <SUBSCRIPTION_KEY>'
OR
curl -X GET 'https://nextrip-public-api.azure-api.net/octranspo/gtfs-rt-vp/v1/VehiclePositions?format=protobuf' -H 'Ocp-Apim-Subscription-Key: <SUBSCRIPTION_KEY>'
Trip Updates
URL
Results in JSON
curl -X GET 'https://nextrip-public-api.azure-api.net/octranspo/gtfs-rt-tp/v1/TripUpdates?format=json' -H 'Ocp-Apim-Subscription-Key: <SUBSCRIPTION_KEY>'
Results in Protobuf
curl -X GET 'https://nextrip-public-api.azure-api.net/octranspo/gtfs-rt-tp/v1/TripUpdates' -H 'Ocp-Apim-Subscription-Key: < SUBSCRIPTION_KEY >'
OR
curl -X GET 'https://nextrip-public-api.azure-api.net/octranspo/gtfs-rt-tp/v1/TripUpdates?format=protobuf' -H 'Ocp-Apim-Subscription-Key: <SUBSCRIPTION_KEY>'