MENU navbar-image

Introduction

Welcome to the Transit Tracker API Documentation! The API is completely free, as long as it is used without excess. Transit Tracker data is free of charge, but it is mandatory to credit agency data when specified. Credits are registered in the v2/agencies API, in the license object.

Bienvenue à la documentation de l'API de Transit Tracker! L'API est complètement gratuite, tant qu'elle est utilisée sans excès. Les données de Transit Tracker sont libre de droit, mais il est obligatoire de créditer les données des agences lorsque spécifié. Les crédits sont inscrit dans l'API v2/agencies, dans l'objet license.

Authenticating requests

This API is not authenticated.

Agencies

GET v2/agencies

Example request:
curl --request GET \
    --get "https://api.transittracker.ca/v2/agencies" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: en"
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.transittracker.ca/v2/agencies',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Accept-Language' => 'en',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.transittracker.ca/v2/agencies'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Accept-Language': 'en'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (503):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "message": "Service Unavailable"
}
 

Request   

GET v2/agencies

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Accept-Language      

Example: en

GET v2/agencies/{agency_slug}

Example request:
curl --request GET \
    --get "https://api.transittracker.ca/v2/agencies/stm" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: en"
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.transittracker.ca/v2/agencies/stm',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Accept-Language' => 'en',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.transittracker.ca/v2/agencies/stm'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Accept-Language': 'en'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (503):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "message": "Service Unavailable"
}
 

Request   

GET v2/agencies/{agency_slug}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Accept-Language      

Example: en

URL Parameters

agency_slug   string   

The slug of the agency. Example: stm

Alerts

GET v2/alerts

Example request:
curl --request GET \
    --get "https://api.transittracker.ca/v2/alerts" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: en"
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.transittracker.ca/v2/alerts',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Accept-Language' => 'en',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.transittracker.ca/v2/alerts'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Accept-Language': 'en'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (503):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "message": "Service Unavailable"
}
 

Request   

GET v2/alerts

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Accept-Language      

Example: en

GET v2/alerts/{alert_id}

Example request:
curl --request GET \
    --get "https://api.transittracker.ca/v2/alerts/2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: en"
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.transittracker.ca/v2/alerts/2',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Accept-Language' => 'en',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.transittracker.ca/v2/alerts/2'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Accept-Language': 'en'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (503):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "message": "Service Unavailable"
}
 

Request   

GET v2/alerts/{alert_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Accept-Language      

Example: en

URL Parameters

alert_id   integer   

The ID of the alert. Example: 2

GET v2/regions/{region_slug}/alerts

Example request:
curl --request GET \
    --get "https://api.transittracker.ca/v2/regions/mtl/alerts" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: en"
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.transittracker.ca/v2/regions/mtl/alerts',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Accept-Language' => 'en',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.transittracker.ca/v2/regions/mtl/alerts'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Accept-Language': 'en'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (503):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "message": "Service Unavailable"
}
 

Request   

GET v2/regions/{region_slug}/alerts

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Accept-Language      

Example: en

URL Parameters

region_slug   string   

The slug of the region. Example: mtl

Endpoints

GET v2/health

Example request:
curl --request GET \
    --get "https://api.transittracker.ca/v2/health" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: en"
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.transittracker.ca/v2/health',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Accept-Language' => 'en',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.transittracker.ca/v2/health'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Accept-Language': 'en'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (503):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "message": "Service Unavailable"
}
 

Request   

GET v2/health

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Accept-Language      

Example: en

GET v2/agencies/{agencySlug}/trips/{tripId}/blocks

Example request:
curl --request GET \
    --get "https://api.transittracker.ca/v2/agencies/stm/trips/ut/blocks" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: en"
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.transittracker.ca/v2/agencies/stm/trips/ut/blocks',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Accept-Language' => 'en',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.transittracker.ca/v2/agencies/stm/trips/ut/blocks'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Accept-Language': 'en'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (503):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "message": "Service Unavailable"
}
 

Request   

GET v2/agencies/{agencySlug}/trips/{tripId}/blocks

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Accept-Language      

Example: en

URL Parameters

agencySlug   string   

Example: stm

tripId   string   

Example: ut

GET v2/agencies/{agencySlug}/shapes/{shapeId}

Example request:
curl --request GET \
    --get "https://api.transittracker.ca/v2/agencies/stm/shapes/iure" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: en"
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.transittracker.ca/v2/agencies/stm/shapes/iure',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Accept-Language' => 'en',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.transittracker.ca/v2/agencies/stm/shapes/iure'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Accept-Language': 'en'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (503):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "message": "Service Unavailable"
}
 

Request   

GET v2/agencies/{agencySlug}/shapes/{shapeId}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Accept-Language      

Example: en

URL Parameters

agencySlug   string   

Example: stm

shapeId   string   

Example: iure

Landing

GeoJSON ressources used on the landing page

GET v2/landing

Example request:
curl --request GET \
    --get "https://api.transittracker.ca/v2/landing" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: en"
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.transittracker.ca/v2/landing',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Accept-Language' => 'en',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.transittracker.ca/v2/landing'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Accept-Language': 'en'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (503):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "message": "Service Unavailable"
}
 

Request   

GET v2/landing

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Accept-Language      

Example: en

GET v2/landing/vehicles

Example request:
curl --request GET \
    --get "https://api.transittracker.ca/v2/landing/vehicles" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: en"
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.transittracker.ca/v2/landing/vehicles',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Accept-Language' => 'en',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.transittracker.ca/v2/landing/vehicles'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Accept-Language': 'en'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (503):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "message": "Service Unavailable"
}
 

Request   

GET v2/landing/vehicles

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Accept-Language      

Example: en

Link

Example request:
curl --request GET \
    --get "https://api.transittracker.ca/v2/links" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: en"
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.transittracker.ca/v2/links',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Accept-Language' => 'en',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.transittracker.ca/v2/links'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Accept-Language': 'en'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (503):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "message": "Service Unavailable"
}
 

Example request:
curl --request GET \
    --get "https://api.transittracker.ca/v2/links/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: en"
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.transittracker.ca/v2/links/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Accept-Language' => 'en',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.transittracker.ca/v2/links/1'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Accept-Language': 'en'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (503):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "message": "Service Unavailable"
}
 

Regions

GET v2/regions

Example request:
curl --request GET \
    --get "https://api.transittracker.ca/v2/regions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: en"
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.transittracker.ca/v2/regions',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Accept-Language' => 'en',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.transittracker.ca/v2/regions'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Accept-Language': 'en'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (503):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "message": "Service Unavailable"
}
 

Request   

GET v2/regions

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Accept-Language      

Example: en

GET v2/regions/{region_slug}

Example request:
curl --request GET \
    --get "https://api.transittracker.ca/v2/regions/mtl" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: en"
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.transittracker.ca/v2/regions/mtl',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Accept-Language' => 'en',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.transittracker.ca/v2/regions/mtl'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Accept-Language': 'en'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (503):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "message": "Service Unavailable"
}
 

Request   

GET v2/regions/{region_slug}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Accept-Language      

Example: en

URL Parameters

region_slug   string   

The slug of the region. Example: mtl

Tags

GET v2/tags

Example request:
curl --request GET \
    --get "https://api.transittracker.ca/v2/tags" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: en"
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.transittracker.ca/v2/tags',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Accept-Language' => 'en',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.transittracker.ca/v2/tags'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Accept-Language': 'en'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (503):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "message": "Service Unavailable"
}
 

Request   

GET v2/tags

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Accept-Language      

Example: en

GET v2/tags/{tag_id}

Example request:
curl --request GET \
    --get "https://api.transittracker.ca/v2/tags/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: en"
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.transittracker.ca/v2/tags/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Accept-Language' => 'en',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.transittracker.ca/v2/tags/1'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Accept-Language': 'en'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (503):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "message": "Service Unavailable"
}
 

Request   

GET v2/tags/{tag_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Accept-Language      

Example: en

URL Parameters

tag_id   integer   

The ID of the tag. Example: 1

Vehicles

GET v2/agencies/{agency_slug}/vehicles

Example request:
curl --request GET \
    --get "https://api.transittracker.ca/v2/agencies/stm/vehicles?geojson=" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: en"
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.transittracker.ca/v2/agencies/stm/vehicles',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Accept-Language' => 'en',
        ],
        'query' => [
            'geojson' => '0',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.transittracker.ca/v2/agencies/stm/vehicles'
params = {
  'geojson': '0',
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Accept-Language': 'en'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (503):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "message": "Service Unavailable"
}
 

Request   

GET v2/agencies/{agency_slug}/vehicles

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Accept-Language      

Example: en

URL Parameters

agency_slug   string   

The slug of the agency. Example: stm

Query Parameters

geojson   boolean  optional  

Include a GeoJSON FeatureCollection to the response. Defaults to true. Example: false

GET v2/agencies/{agency_slug}/vehicles/{vehicle}

Example request:
curl --request GET \
    --get "https://api.transittracker.ca/v2/agencies/stm/vehicles/modi" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: en"
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.transittracker.ca/v2/agencies/stm/vehicles/modi',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Accept-Language' => 'en',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.transittracker.ca/v2/agencies/stm/vehicles/modi'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Accept-Language': 'en'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (503):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "message": "Service Unavailable"
}
 

Request   

GET v2/agencies/{agency_slug}/vehicles/{vehicle}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Accept-Language      

Example: en

URL Parameters

agency_slug   string   

The slug of the agency. Example: stm

vehicle   string   

The vehicle. Example: modi

GET v2/vehicles

Example request:
curl --request GET \
    --get "https://api.transittracker.ca/v2/vehicles" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: en"
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.transittracker.ca/v2/vehicles',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Accept-Language' => 'en',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.transittracker.ca/v2/vehicles'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Accept-Language': 'en'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (503):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "message": "Service Unavailable"
}
 

Request   

GET v2/vehicles

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Accept-Language      

Example: en

GET v2/vehicles/{vehicle_id}

Example request:
curl --request GET \
    --get "https://api.transittracker.ca/v2/vehicles/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: en"
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.transittracker.ca/v2/vehicles/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Accept-Language' => 'en',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.transittracker.ca/v2/vehicles/1'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Accept-Language': 'en'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (503):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "message": "Service Unavailable"
}
 

Request   

GET v2/vehicles/{vehicle_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Accept-Language      

Example: en

URL Parameters

vehicle_id   integer   

The ID of the vehicle. Example: 1