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();
$url = 'https://api.transittracker.ca/v2/agencies';
$response = $client->get(
    $url,
    [
        '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();
$url = 'https://api.transittracker.ca/v2/agencies/stm';
$response = $client->get(
    $url,
    [
        '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();
$url = 'https://api.transittracker.ca/v2/alerts';
$response = $client->get(
    $url,
    [
        '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();
$url = 'https://api.transittracker.ca/v2/alerts/2';
$response = $client->get(
    $url,
    [
        '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();
$url = 'https://api.transittracker.ca/v2/regions/mtl/alerts';
$response = $client->get(
    $url,
    [
        '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();
$url = 'https://api.transittracker.ca/v2/health';
$response = $client->get(
    $url,
    [
        '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/est/blocks" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: en"
$client = new \GuzzleHttp\Client();
$url = 'https://api.transittracker.ca/v2/agencies/stm/trips/est/blocks';
$response = $client->get(
    $url,
    [
        '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/est/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: est

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

Example request:
curl --request GET \
    --get "https://api.transittracker.ca/v2/agencies/stm/shapes/omnis" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: en"
$client = new \GuzzleHttp\Client();
$url = 'https://api.transittracker.ca/v2/agencies/stm/shapes/omnis';
$response = $client->get(
    $url,
    [
        '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/omnis'
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: omnis

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();
$url = 'https://api.transittracker.ca/v2/landing';
$response = $client->get(
    $url,
    [
        '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();
$url = 'https://api.transittracker.ca/v2/landing/vehicles';
$response = $client->get(
    $url,
    [
        '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();
$url = 'https://api.transittracker.ca/v2/links';
$response = $client->get(
    $url,
    [
        '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/dolor" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: en"
$client = new \GuzzleHttp\Client();
$url = 'https://api.transittracker.ca/v2/links/dolor';
$response = $client->get(
    $url,
    [
        '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/dolor'
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();
$url = 'https://api.transittracker.ca/v2/regions';
$response = $client->get(
    $url,
    [
        '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();
$url = 'https://api.transittracker.ca/v2/regions/mtl';
$response = $client->get(
    $url,
    [
        '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();
$url = 'https://api.transittracker.ca/v2/tags';
$response = $client->get(
    $url,
    [
        '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();
$url = 'https://api.transittracker.ca/v2/tags/1';
$response = $client->get(
    $url,
    [
        '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();
$url = 'https://api.transittracker.ca/v2/agencies/stm/vehicles';
$response = $client->get(
    $url,
    [
        '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}/vehicles.geojson

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();
$url = 'https://api.transittracker.ca/v2/agencies/stm/vehicles.geojson';
$response = $client->get(
    $url,
    [
        '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.geojson'
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}/vehicles.geojson

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Accept-Language      

Example: en

URL Parameters

agency   string   

The agency. Example: stm

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

Example request:
curl --request GET \
    --get "https://api.transittracker.ca/v2/agencies/stm/vehicles/veniam" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: en"
$client = new \GuzzleHttp\Client();
$url = 'https://api.transittracker.ca/v2/agencies/stm/vehicles/veniam';
$response = $client->get(
    $url,
    [
        '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/veniam'
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: veniam

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();
$url = 'https://api.transittracker.ca/v2/vehicles';
$response = $client->get(
    $url,
    [
        '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.geojson

Example request:
curl --request GET \
    --get "https://api.transittracker.ca/v2/vehicles.geojson" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: en"
$client = new \GuzzleHttp\Client();
$url = 'https://api.transittracker.ca/v2/vehicles.geojson';
$response = $client->get(
    $url,
    [
        '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.geojson'
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.geojson

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();
$url = 'https://api.transittracker.ca/v2/vehicles/1';
$response = $client->get(
    $url,
    [
        '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