Points of interest (POIs) near a location can be accessed via Local Logic’s POIs endpoint, documented below. POIs will be returned in order of least to greatest linear_distance
away from the specified lat
/lng
(or the center of the specified polygon
) for each respective POI category.
GET v3/pois
The following categories of POIs are available.
Category | POI Category Name |
---|---|
Groceries (General) | groceries |
Groceries (Specialized) | groceries_specialized |
Shopping | shopping |
Nightlife | nightlife |
Restaurants | restaurants |
Cafes | cafes |
Daycares* | daycares |
Bus Stops | bus_stops |
Rapid Transit Stations | rapid_transit_stations |
Train Stations | train_stations |
Parks | parks |
Healthy Restaurants | healthy_restaurants |
Fitness | fitness |
Sport Facilities | sport_facilities |
Health Care | health_care |
Pet Care | pet_care |
Car Fueling Stations | car_fueling_stations |
Art, Culture and Science | art_culture_science |
Home Improvement | home_improvement |
Personal Care | personal_care |
* Canada only
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.
Header | Status | Description |
---|---|---|
Authorization | required | Your bearer token retrieved from our authorization API, ex. Bearer eyJhbGci... |
Accept | required | The datatype to request, this API will return application/json . |
The region to be queried by the endpoint can be defined two ways: (1) by specifying a lat
/lng
coordinate, with optional radius
parameters, (2) or by providing a polygon
parameter.
When using the lat
/lng
coordinate query method without specifying radius
parameter, the endpoint will return points of interest within 5km of the coordinates. When including radius
parameters, the resulting circular area around the lat
/lng
coordinate will be queried.
When using the polygon
query method, the points of interest returned will be contained in the region defined by the polygon area. Polygons are specified using the WKT format. The only accepted type is POLYGON
, and holes are not supported. Each polygon point must be defined as a lng
/lat
coordinate.
API Limitations
Up to 30 POIs can be obtained per category when multiple categories are called through the API. When a single category of POIs is requested in the parameters, up to 500 POIs will be returned.
proximity.walking
data, including walking distance
and walking travel_time
is currently only available for the 5 closest POIs for each category. The quality
value represents whether the data is calculated
or estimated
.
Warning
Parameter | Status | Description |
---|---|---|
lat | optional | A decimal number between -90 and 90 (Latitude) |
lng | optional | A decimal number between -180 and 180 (Longitude) |
radius | optional | A positive float number (Circle radius) |
polygon | optional | List of 2D lng/lat points that define a 2D polygon, using the WKT representation |
include | required | A comma separated list of POI category names. See the above table's POI Category Name column for a full list of available categories. |
limit | optional | The limit of POIs returned per POI category. default: 30 maximum: 30 if multiple POI categories specified in the include parameter, otherwise 500 if only one single POI category |
require('node-fetch')('https://api.locallogic.co/v3/pois?' + new URLSearchParams({lat: 41.847206,lng: -87.668825,include: 'cafes,bus_stops',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)})
import requestsresponse = requests.get("https://api.locallogic.co/v3/pois",headers={"Accept": "application/json","Authorization": "Bearer eyJhbGciOiJ..."},params={"lat": 43.593611,"lng": -79.536194,"include": 'cafes,bus_stops',"radius": 3000,"limit": 10})print(response.json())
{"data": {"cafes": [{"name": "Tim Hortons","address": "11940 111 Ave Nw","city": "Edmonton","province": "AB","postalcode": "T5G0E5","country": "Canada","lat": 53.559654,"lng": -113.528046,"url": "http://timhortons.com/ca","proximity": {"linear_distance": 0.491,"walking": {"quality": "calculated","distance": 0.522,"travel_time": 6}}},{"name": "European Sweetness Ltd","address": "12212 107 Ave Nw","city": "Edmonton","province": "AB","postalcode": "T5M4A8","country": "Canada","lat": 53.551163,"lng": -113.53287,"proximity": {"linear_distance": 0.613,"walking": {"quality": "calculated","distance": 1.001,"travel_time": 12}}},{"name": "Second Cup","address": "11640 104 Ave Nw","city": "Edmonton","province": "AB","postalcode": "T5K2T7","country": "Canada","lat": 53.547203,"lng": -113.52228,"url": "http://secondcup.com","proximity": {"linear_distance": 0.95,"walking": {"quality": "calculated","distance": 1.029,"travel_time": 12}}},// Plus other cafes],"bus_stops": [{"name": "119 Street & 111 Avenue","country": "Canada","lat": 53.558764,"lng": -113.526336,"routes": [{"short_name": "125","long_name": "Belvedere - Jasper Place","route_color": "#FFFFFF","text_color": "#000000"}],"proximity": {"linear_distance": 0.386}},// Plus other bus_stops]},"meta": {"message": "Successfully called v3/pois API.","type": "LocalLogic.API.Success","statusCode": 200,"counts": {"cafes": 10,"bus_stops": 10}}}