Skip to content

Schools

New
Only available in Canada

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.

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.

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: 25 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 scores in, ex. fr

Available: en and fr

default: en

V3 NodeJS Example

require('node-fetch')('https://api.locallogic.co/v3/schools?' + new URLSearchParams({
lat: 43.892958,
lng: -79.426238,
radius: 3000,
limit: 10
}), {
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
}
)
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
}
}
}
// 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
}
}
}
// Plus other high_schools
]
},
"meta": {
"message": "Successfully called v3/schools API.",
"type": "LocalLogic.API.Success",
"statusCode": 200,
"counts": {
"primary_schools": 30,
"high_schools": 24
}
}
}