You are viewing information on version v2 of the Winnipeg Transit Open Data Web Service API.

API (v2)

Overview

Services

Other versions

  • v3 Overview
  • API Overview

    Winnipeg Transit's Open Data Web Service provides a way for you to retrieve live information about Winnipeg Transit's services by sending GET requests to URLs like: https://api.winnipegtransit.com/web-service-path?and=parameters

    Data is returned in XML format by default. JSON data can be requested by appending ".json" to the path. Returned data is subject to change throughout the day, because it represents a real-time picture of what is currently happening on the streets. Real-time information includes:

    Look here for an example of how to use this API.

    Static Schedule Data

    All of our static schedule data (as opposed to the real-time data provided by our Open Data Web Services) is also available for download in a single file. This file is updated daily and adheres to the General Transit Feed Specification.

    API Key

    Once you've signed up for an account, you will be given an API key. This key must be included in all requests you make, like so: https://api.winnipegtransit.com/v2/stops/10064?api-key=YOUR-API-KEY

    Request Throttling

    Winnipeg Transit's Open Data Web Service throttles requests to prevent its servers from being overloaded. Each API key is allowed 100 requests per IP address per minute.

    API Versions

    To specify the version of our API you wish to use you can prepend the version key to the beginning of a request, like so:

    Version v3: https://api.winnipegtransit.com/v3/stops/10064?api-key=YOUR-API-KEY

    Version v2: https://api.winnipegtransit.com/v2/stops/10064?api-key=YOUR-API-KEY

    URL Types

    The web service supports three types of requests: identity, filter, and wildcard. These generally determine the type of response you'll get.

    Sample URLs are shown in the API documentation for each available web service if you are logged in. The API Explorer uses your API key to show results of web service requests. The explorer allows you to modify parameters and try out the queries provided by the API.
    Examples of invalid URLs are displayed in red italics.

    Identity Queries

    Identity queries return a single result. They're accessed by specifying the unique identifier (ID) of the desired resource.

    eg. https://api.winnipegtransit.com/v2/stops/10064?api-key=YOUR-API-KEY

    Filter Queries

    Filter queries return results according to specified URL parameters. For example, you can filter stop results by a coordinate and a distance. Only stops found within that distance of the coordinate will be returned.

    eg. https://api.winnipegtransit.com/v2/stops?x=633861&y=5525798&distance=100&api-key=YOUR-API-KEY

    Wildcard Queries

    Wildcard queries are queries that match on a string you provide. They're useful for looking up resources based on a name. Like filter queries, wildcard queries can return multiple results.

    eg. https://api.winnipegtransit.com/v2/stops:glas?api-key=YOUR-API-KEY

    Common URL Parameters

    These URL parameters are common to all services and all URL types:

    usage The style of names to return.
    • long: Yields more verbose names.
    • short: Yields terser names.

    JSON

    You can retrieve JSON results for any web service by adding ".json" to the end of the path (before the URL parameters).

    eg.