Skip to content

Schools Canada

New
Only available in Canada

GET v3/schools

Schools near a location can be accessed via Local Logic’s Schools endpoint, documented below. Schools will always be returned in order of least to greatest linear_distance away from the specified lat/lng.

GET v3/schools

Up to 30 elementary schools and 30 high schools in a 25 000 meter (25 km or 15.53 miles) radius can be obtained through the API.

proximity.walking data, including walking distance and walking travel_time is currently only available for the 5 closest schools. The quality value represents whether the data is calculated or estimated.

Keys under school_attributes and school_board_attributes may not always be present, depending on the richness of our dataset.

V3 Header Request Parameters

This API uses JWT token based authentication. This JWT Bearer token is what is used to populate the Authorization header below.

Instructions on how to retrieve this token can be found at Accessing the API → V3 API Authorization.

HeaderStatusDescription
AuthorizationrequiredYour bearer token retrieved from our authorization API, ex. Bearer eyJhbGci...
AcceptrequiredThe datatype to request, this API will return application/json.

V3 QueryString Request Parameters

ParameterStatusDescription
latrequiredA decimal number between -90 and 90, representing the latitude.
lngrequiredA decimal number between -180 and 180, representing the longitude.
radiusoptionalUsed to specify the maximum distance (in meters) away from the input lat/lng.

default: 5 000 meters

maximum: 25 000 meters
limitoptionalThe limit of schools returned.

default: 30

maximum: 30
localeoptionalString value representing the two letter ISO 361-1 language code to return the payload in, ex. fr

Available: en and fr

default: en

* translations only available for the following fields:
  • school_attributes.levels
  • school_attributes.language
  • school_attributes.types
  • school_attributes.programs
  • catchments.*.level
  • catchments.*.program
include_catchmentsoptionalDefaults to false. A boolean to get the school attendance catchments area or not. If true, the response will contain a catchments key that will contain the list of catchments. It may be an empty list when the catchments information is unavailable, which is the case for private schools and some public schools. The catchments key will not be defined if include_catchments is false.

V3 NodeJS Example

require('node-fetch')('https://api.locallogic.co/v3/schools?' + new URLSearchParams({
lat: 43.892958,
lng: -79.426238,
radius: 3000,
limit: 10,
include_catchments: true
}), {
method: 'GET',
headers: {
Accept: 'application/json',
Authorization: 'Bearer eyJhbGciOiJ...'
}
})
.then(response => response.json())
.then(body => {
console.log(body)
})
.catch(error => {
console.log(error)
})

V3 Python Example

import requests
response = requests.get(
"https://api.locallogic.co/v3/schools",
headers={
"Accept": "application/json",
"Authorization": "Bearer eyJhbGciOiJ..."},
params={
"lat": 43.892958,
"lng": -79.426238,
"radius": 3000,
"limit": 10,
"include_catchments": True
}
)
print(response.json())

200 - V3 Response Example

{
"data": {
"primary_schools": [
{
"name": "Beverley Acres Public School",
"address": "283 Neal Dr",
"city": "Richmond Hill",
"province": "ON",
"postalcode": "L4C 3L3",
"country": "Canada",
"lat": 43.889188,
"lng": -79.423505,
"url": "http://beverleyacres.ps.yrdsb.ca",
"school_attributes": {
"levels": ["elementary"],
"grades": "1-8",
"languages": ["en", "fr"],
"types": ["public"],
"programs": ["French Immersion"]
},
"school_board_attributes": {
"name": "York Region District School Board",
"url": "http://www.yrdsb.ca"
},
"proximity": {
"linear_distance": 0,
"walking": {
"quality": "calculated",
"distance": 87,
"travel_time": 1
}
}
"catchments": [
{
"geometry": [[[[43.91933, -79.38866], [43.91067, -79.38655], ...]]]
"inside": true,
"program": "french immersion",
"grades": "4-8",
"level": "elementary"
}
]
}
// Plus other primary_schools
],
"high_schools": [
{
"name": "TMS School - Elgin Mills",
"address": "500 Elgin Mills Road E",
"city": "Richmond Hill",
"province": "ON",
"postalcode": "L4C 5G1",
"country": "Canada",
"lat": 43.892958,
"lng": -79.426238,
"url": "http://www.tmsschool.ca",
"school_attributes": {
"levels": ["elementary", "secondary"],
"types": ["private"]
},
"proximity": {
"linear_distance": 472,
"walking": {
"quality": "calculated",
"distance": 472,
"travel_time": 5
}
},
"catchments": []
}
// Plus other high_schools
]
},
"meta": {
"message": "Successfully called v3/schools API.",
"type": "LocalLogic.API.Success",
"statusCode": 200,
"counts": {
"primary_schools": 30,
"high_schools": 24
}
}
}

Data Dictionary

The following is a table that contains payload fields and describes their meaning and possible values.

field                                                       description                                    values                       format                   
nameThe name of the school.Max string length: 107
Average string length: 28
String
urlThe website of the school.Max string length: 113
Average string length: 33
String
school_attributes.levelsThe levels of education offered by the school. It will depend on each individual school board, but generally, each level roughly corresponds with the following grade ranges:
  • preschool: kindergarten
  • elementary: grades 1 to 8
  • middle: grades 6 to 8
  • secondary: grades 9 to 12
  • preschool
  • elementary
  • middle
  • secondary
  • A list of strings from the values column. Ex: ['elementary', ‘secondary’]
    school_attributes.gradesThe grades offered by the school.Different range combinations:
  • 1 through 13
  • PK: pre-kindergarten
  • JK: junior kindergarten
  • SK: senior kindergarten
  • N: nursery
  • M: maternelle
  • A string containing a grade range from the values column, separated by a dash. Ex: JK-8
    school_attributes.languagesThe languages of instruction.Non-exhaustive list:
  • en: English
  • fr: French
  • ar: Arabic
  • cr: Cree
  • A list of strings from the values column. Ex: ['en', 'fr']
    school_attributes.programsThe programs offered by the school.Non-exhaustive list:
  • IB
  • French Immersion
  • Catholic
  • Arts

  • Max sum of string lengths: 100
    Average sum of string lengths: 17
    A list of strings from the values column. Ex: ['IB', ‘Arts’]
    school_attributes.typesThe type of the school.
  • public
  • private
  • A list of strings from the values column. Ex: ['public']
    school_board_attributes.nameThe name of the school board.Max string length: 73
    Average string length: 24
    String
    school_board_attributes.urlThe website of the school board.Max string length: 50
    Average string length: 22
    String
    proximity.walking.distanceThe distance in meters between the school and the input lat/lng.Integer
    proximity.walking.timeThe time it takes in minutes to travel between the school and the input lat/lng.Integer
    catchments.*.geometryA lat/lng multipolygon of the catchment area.List
    catchments.*.insideWhether or not the queried lat/lng fall inside the catchment.Bool
    catchments.*.programThe program offered to this catchment.String
    catchments.*.gradeThe grade offered to this catchment. Refer to school_attributes.grades for more information.String
    catchments.*.levelThe level offered to this catchment. Refer to school_attributes.levels for more information.String
    © Local Logic 2022