Use this endpoint to retrieve the Local Profiles of a specific location using an identifier.
GET /profiles/{geog_id}
Parameter | Status | Description |
---|---|---|
geog_id | required | An identifier that we provide for you to request a specific profile (see the Specifying neighbourhoods section) |
Parameter | Status | Description |
---|---|---|
key | required | The ApiKey provided for you |
locale | optional | String value representing the language to return the profiles in. Available:en (English), fr (French) Default: en |
require('request')({method: 'GET',url: 'https://api.locallogic.co/v1/profiles/g20_f25dyhf3',qs: {key: 'YOUR_API_KEY',locale: 'en',}}, function (err, response, body) {// See response example})
{"data": {"attributes": {"transport": "This part of the city is a very pleasant part of Montréal for cyclists and pedestrians. Cycling is convenient in Ville-Marie because there...","services": "In Ville-Marie, families will typically be able to reach daycares and schools on foot. In addition to public schools, there are private elementary and...","character": "Ville-Marie offers a variety of experiences for home buyers who enjoy a vibrant atmosphere and spending time in green spaces. There are a large number of vibrant spots in this area to explore..."},"id": "g20_f25dyhf3"},"meta": {"name": "Ville-Marie","intro": "Ville-Marie is a neighbourhood within Montréal, Quebec.","sections": {"transport": "Transportation","services": "Services","character": "Character","housing": "Housing"},"geometry": [[45.51579,-73.59027],[45.51629,-73.58981],[45.51678,-73.58938],[45.51629,-73.58825],[45.51556,-73.58662],[45.51556,-73.58662],[45.51361,-73.58243],[45.51247,-73.58019],[45.51216,-73.57961],[45.51182,-73.57921],[45.51135,-73.57857],[45.51086,-73.57815],[45.5103,-73.5785],[45.50989,-73.57899],[45.50931,-73.57954],[45.5082,-73.58013]]}}
Important: Make sure to display information under /data/attributes/*
as HTML
.
Use this endpoint to retrieve the names and IDs of geographies (e.g. neighbourhoods, cities, schools) associated with a specific location (lat
/lng
). The geography IDs (e.g. g10_f25dyhcn
) in the returned dictionary can be used to query the Local Profiles by geog_id
.
If present, the /data/schools
dictionary has the following structure:
lat
/lng
).lat
/lng
). If a property is within the bounding box but not in a catchment, the value will be an empty array.The catchment list returned for each school at a given lat
/lng
does not necessarily represent a comprehensive list of catchments for all the programs offered at that school, only programs for which we have data and whose catchment intersects that lat/long. Also in the returned dictionary, under /meta/order
is the order, from smallest to largest, of the overlapping geographies. For example, neighbourhoods (level 10
) are smaller than boroughs (level 20
) and cities (level 30
).
To look up school names, addresses, and other information by school ID, you will need a full list of our schools. Please contact us to obtain this list.
GET /geographies
Parameter | Status | Description |
---|---|---|
lat | required | A decimal number between -90 and 90 (Latitude) |
lng | required | A decimal number between -180 and 180 (Longitude) |
key | required | The API Key provided for you |
require('request')({method: 'GET',url: 'https://api.locallogic.co/v1/geographies',qs: {lat: 45.5017,lng: -73.5656,key: 'YOUR_API_KEY'}}, function (err, response, body) {// See response example})
{"data": {"attributes": {"g10_f25dyhcn": {"name": {"fr": "Le Faubourg Saint-Laurent","en": "Le Faubourg Saint-Laurent"},"level_type": {"fr": "quartier","en": "neighbourhood"},"level": 10},"g20_f25dyhf3": {"name": {"en": "Ville-Marie","fr": "Ville-Marie"},"level_type": {"en": "borough","fr": "arrondissement"},"level": 20},"g30_f25dfkes": {"name": {"en": "Montréal","fr": "Montréal"},"level_type": {"en": "city","fr": "ville"},"level": 30}},"schools": {"f25dyp3f8jj0_elemschool": [{"program": "Regular"}],"f25dsnnze9fy_highschool": [],"f25fccmbsdtp_highschool": [],"f25du6bx1z8d_highschool": [],"f25ds5q2m9uu_highschool": [],"f25dv27mdjbz_elemschool": [],"f25dvqwe1t0k_elemschool": [{"program": "Regular","grades": "pre-K to 6"}],"f25dwngcqrxs_elemschool": [],"f25dszyzwys5_elemschool": [],"f25duju2n5vh_elemschool": [{"program": "English Core","grades": "K to 6"}],"f25dtr3vuj4q_elemschool": [],"f25dypkzuj1t_elemschool": [{"program": "Regular"}],"f25en0kfvy8n_highschool": [{"program": "Regular"}]}},"meta": {"order": ["g10_f25dyhcn","g20_f25dyhf3","g30_f25dfkes"]}}
Use this endpoint to retrieve any information pertaining to geographies (e.g. neighbourhoods, cities, etc.) associated with a specific location either via (lat
/lng
) or specific id.
GET /v2/geographies
Parameter | Status | Description |
---|---|---|
lat | required | A decimal number between -90 and 90 (Latitude) |
lng | required | A decimal number between -180 and 180 (Longitude) |
level | required | Integer code describing the geography level of interest:10 = neighbourhood;20 = borough;30 = city;40 = metropolitan area; Other codes reserved for future use. |
id | optional | Alternative to (lat /lng ) and level above to directly specify LocalLogic entities such as geog_ids (e.g. g10_f25dyhcn ) |
locale | optional | Language code (ISO 639-1 ) in which to return variable information for UI purposes. Available: en , fr . Default: en |
include | optional | User defined comma separated list of variables types to include in the response. Available: geometry = coordinates outlining polygon of geographyscores = location scores throughout the geographyDefault: everything. Extra variable types may be added in the future. |
Header | Status | Description |
---|---|---|
X-API-KEY | required | The ApiKey provided for you |
require('request')({method: 'GET',url: 'https://api.locallogic.co/v2/geographies',qs: {lat: 49.26312,lng:-123.09855,level: 10,locale: 'en',include: 'geometry,scores'},headers: {'X-API-KEY': 'API_KEY'}}, function (err, response, body) {// See response example})
{"data": {"type": "geographies","attributes": {"g10_c2b2qb46": {"geometry": [[[[49.26235, -123.07750],[49.25664, -123.07761],[49.25621, -123.07783],[49.25656, -123.10123],[49.27179, -123.11448],[49.27298, -123.10173],[49.27193, -123.10007],[49.26914, -123.10070],[49.26687, -123.09667],[49.26678, -123.09615],[49.26669, -123.08939],[49.26528, -123.08199],[49.26517, -123.08098],[49.26235, -123.07750]]]],"scores": {"pedestrian_friendly": {"value": 4.9747449953,"text": "walk friendly"},"vibrant": {"value": 3.9535479424,"text": "vibrant"},"nightlife": {"value": 3.2749410187,"text": "night life"},"high_schools": {"value": 3.907385718,"text": "high schools"},"daycares": {"value": 3.6332160426,"text": "day cares"},"cycling_friendly": {"value": 4.1969152074,"text": "cycling friendly"},"transit_friendly": {"value": 4.6218920443,"text": "transit friendly"},"parks": {"value": 3.7772093865,"text": "parks"},"primary_schools": {"value": 4.5081391059,"text": "elementary schools"},"car_friendly": {"value": 1.5028148755,"text": "car friendly"},"cafes": {"value": 4.4695143237,"text": "cafes"},"restaurants": {"value": 4.9843032764,"text": "restaurant"},"quiet": {"value": 2.7852090192,"text": "quiet"},"groceries": {"value": 4.9063299309,"text": "groceries"},"shopping": {"value": 4.7265987192,"text": "shopping"}}}}},"meta": {"code": "LocalLogic.API.Success","detail": "Successfully found requested geography information"}}