Places and points of interest guide
Search places by name anywhere in the world and points of interest in Estonia, Latvia and Lithuania by name or category. A search by category returns the nearest first. The response is GeoJSON.
https://api.elemroot.com/places. Longer responses are shortened (…).
Endpoints
Base: https://api.elemroot.com/places. Every request carries the API key as parameter key.
| Path | Purpose |
|---|---|
/v1/places/search | Search by name or category |
/v1/places/{id} | One place by identifier (pid or Wikidata ID Q…) |
/v1/places/categories | Point of interest categories and their names in the chosen language |
/v1/places/meta | Dataset version and number of places by type |
Search parameters
These parameters apply to /v1/places/search. Unknown parameters are ignored.
| Param | Meaning | Possible values / example | Default |
|---|---|---|---|
q * | Search text, 1–100 characters. Required unless category is given | Endla raba, pharmacy, fuel Pärnu | — |
lang | Language of names and categories | et, en, ru, local (the place's own language) | et |
limit | Number of results | 1…50 | 10 |
include | Points of interest alongside places | poi | — |
types | Only these types (comma-separated). poi = points of interest only | poi, city,town, lake | all place types |
category | Point of interest category or subtype (up to 20, comma-separated); q is then optional | pharmacy, fuel, healthcare | — |
near | Proximity: latitude,longitude. A search by category returns the nearest first | 59.437,24.745 | — |
bbox | Area limit: minLon,minLat,maxLon,maxLat | 24.70,59.42,24.80,59.46 | — |
country | Only these countries, ISO2 (comma-separated) | EE, LV,LT | — |
exclude_country | Leave out these countries, ISO2 (comma-separated) | RU | — |
autocomplete | The last word may be incomplete (search while typing) | 1, 0 | 1 |
fuzzy | Allow typos | auto, 1, 0 | auto |
group | Stops with the same name close together: stops = one result (see stops), none = each stop separately | stops, none | stops |
key * | API key (without a key 403) | docs_… | — |
Places by name
Without extra parameters the service searches places: countries, counties and regions, municipalities, cities, villages, districts, lakes, rivers, seas, bays, islands, peninsulas, mountains, airports and well-known buildings (castles, churches, museums, universities, stadiums, bridges). In Estonia also bogs, forests, valleys, cliffs, shoals, natural features and protected areas.
curl "https://api.elemroot.com/places/v1/places/search?q=Endla%20raba&limit=1&lang=en&key=docs_3d4e64fa1755d7299cb78bf6"
{
"type": "FeatureCollection",
"query": { "q": "Endla raba", "norm": "endla raba", "lang": "en", "fuzzy": false, "took_ms": 2 },
"features": [
{
"type": "Feature",
"id": "ee_placename:NO100229054",
"geometry": { "type": "Point", "coordinates": [26.158284, 58.851629] },
"bbox": [26.158284, 58.851628, 26.158284, 58.851628],
"properties": {
"pid": "ee_placename:NO100229054",
"type": "bog",
"name": "Endla raba",
"name_local": "Endla raba",
"label": "Endla raba, Jõgeva County, Estonia",
"country": "EE",
"country_name": "Estonia",
"region": "Jõgeva County",
"importance": 0.07,
"score": 0.575,
"match": { "lang": "local", "kind": "exact", "field": "name" },
"zoom": 12
}
}
],
…
}
The name comes in the chosen language (lang); the local name is in name_local.
The same request in Russian returns the name Таллин for Tallinn:
curl "https://api.elemroot.com/places/v1/places/search?q=Tallinn&lang=ru&limit=1&key=docs_3d4e64fa1755d7299cb78bf6"
Results can be limited by type and country:
curl "https://api.elemroot.com/places/v1/places/search?q=Peipsi&types=lake&limit=3&key=docs_3d4e64fa1755d7299cb78bf6"
curl "https://api.elemroot.com/places/v1/places/search?q=Riga&country=LV&limit=3&key=docs_3d4e64fa1755d7299cb78bf6"
Place types in field type (the same name works in parameter types):
country, region, county,
municipality, city, town,
village, hamlet, suburb,
quarter, borough, neighbourhood,
island, archipelago, islet,
sea, bay, strait,
cape, peninsula, isthmus,
lake, river, peak,
volcano, mountain_range, glacier,
airport, station, castle,
church, museum, university,
school, hospital, stadium,
theatre, government, square,
monument, bridge, park,
landmark, building, in Estonia also
bog, forest, valley,
hill, cliff, shoal,
natural, protected_area, named_place;
a point of interest has poi.
Points of interest
Points of interest in Estonia, Latvia and Lithuania (shops, pharmacies, fuel stations, cafés, museums, bus stops, car parks and more) are included only when the request asks for them:
| Parameter | What you get |
|---|---|
include=poi | places and points of interest together |
types=poi | points of interest only |
category=… | points of interest of that category only (nearest) |
Without them the response is the same as a plain place search. Name search for points of interest: every word of the query must appear in the name or in the place name; word order does not matter.
curl "https://api.elemroot.com/places/v1/places/search?q=Rimi%20%C3%9Clemiste&include=poi&limit=2&lang=en&key=docs_3d4e64fa1755d7299cb78bf6"
{
"type": "FeatureCollection",
"query": { "q": "Rimi Ülemiste", "norm": "rimi ulemiste", "lang": "en", "fuzzy": true, "took_ms": 5 },
"features": [
{
"type": "Feature",
"id": "w878352266",
"geometry": { "type": "Point", "coordinates": [24.795831, 59.421566] },
"properties": {
"pid": "w878352266",
"type": "poi",
"name": "Rimi",
"label": "Rimi, Tallinn, Estonia",
"country": "EE",
"region": "Tallinn",
"match": { "lang": "poi", "kind": "word", "field": "context" },
"zoom": 17,
"kind": "shopping",
"kind_detail": "supermarket",
"category": "Supermarket",
"icon_category": "shopping",
"map_id": 8783522662,
"on_map": true,
"address": "Suur-Sõjamäe 4",
"phone": "+372 681 1360",
"website": "https://www.rimi.ee/",
"opening_hours": "Mo-Su 08:00-22:00",
"brand": "Rimi",
…
}
},
…
],
…
}
A point of interest has type poi and extra fields (see response fields).
map_id is the ID of the same object in the points of interest layer of the vector map.
When a point of interest is also a place (for example a museum), it comes as one result: the place type and the point of interest fields together.
match.field tells where the query matched. name: the whole query is in the name of the point of interest.
context: part of the query is the place where the point of interest is (a shopping centre, a settlement or a street),
like “Ülemiste” in the query “Rimi Ülemiste” above. category: the result was found by category (see nearest).
This lets you show results found by name separately from those found by location.
Stops
Stops with the same name close together (bus, tram and ferry stops, platforms; for example “Viru keskus 1” … “Viru keskus 6”) come as one result.
The stops field tells how many stops it contains; the name and location are those of one stop. Each stop separately: group=none.
curl "https://api.elemroot.com/places/v1/places/search?q=Viru%20keskus&types=poi&near=59.437,24.745&limit=10&lang=en&key=docs_3d4e64fa1755d7299cb78bf6"
{ "id": "n344390496", "properties": { "name": "Viru keskus 6", "category": "Bus stop", "kind_detail": "bus_stop", "stops": 6, … } }
Nearest by category
When q is a category word in Estonian, English or Russian (apteek,
pharmacy, аптека), you get points of interest of that category,
nearest to near first. The results have match.kind category.
curl "https://api.elemroot.com/places/v1/places/search?q=pharmacy&include=poi&near=59.437,24.745&limit=3&lang=en&key=docs_3d4e64fa1755d7299cb78bf6"
{
"features": [
{ "id": "n600228722", "properties": { "name": "Town Hall Pharmacy", "name_local": "Raeapteek", "category": "Pharmacy", "match": { "lang": "poi", "kind": "category", "field": "category" }, … } },
{ "id": "n7755823513", "properties": { "name": "Benu", "category": "Pharmacy", "address": "Aia 7", … } },
{ "id": "w777971862", "properties": { "name": "Tallinna Linnaapteek Solarises", "category": "Pharmacy", "address": "Estonia pst 9", … } }
],
…
}
A settlement name in the query sets the proximity to that settlement; near is then not needed:
curl "https://api.elemroot.com/places/v1/places/search?q=fuel%20P%C3%A4rnu&include=poi&limit=3&lang=en&key=docs_3d4e64fa1755d7299cb78bf6"
A specific category can also be given with parameter category (then q is not needed). The value
is a category (kind, e.g. healthcare) or a subtype (kind_detail,
e.g. pharmacy), several separated by commas:
curl "https://api.elemroot.com/places/v1/places/search?category=fuel&types=poi&near=58.385,24.497&limit=3&lang=en&key=docs_3d4e64fa1755d7299cb78bf6"
{
"type": "FeatureCollection",
"query": { "q": "", "norm": "", "lang": "en", "fuzzy": false, "took_ms": 0 },
"features": [
{
"type": "Feature",
"id": "w74663564",
"geometry": { "type": "Point", "coordinates": [24.494649, 58.391923] },
"properties": {
"pid": "w74663564",
"type": "poi",
"name": "Neste",
"label": "Neste, Pärnu, Estonia",
"match": { "lang": "poi", "kind": "category", "field": "category" },
"kind": "automotive",
"kind_detail": "fuel",
"category": "Fuel station",
"address": "J. V. Jannseni 1, Pärnu",
"opening_hours": "24/7",
"brand": "Neste",
…
}
},
…
],
…
}
The nearest are searched within growing radii (3, 15, 60 and 300 km). Without near the order is by
importance. bbox limits the area, for example pharmacies in central Tallinn:
curl "https://api.elemroot.com/places/v1/places/search?category=pharmacy&types=poi&bbox=24.70,59.42,24.80,59.46&limit=3&key=docs_3d4e64fa1755d7299cb78bf6"
near and geometry.coordinates (coordinates are in the order longitude, latitude).
Categories
/v1/places/categories returns all categories and subtypes with names in the chosen language and the
number of points of interest. The names are ready for a user interface (buttons, filters).
curl "https://api.elemroot.com/places/v1/places/categories?lang=en&key=docs_3d4e64fa1755d7299cb78bf6"
{
"categories": [
{
"kind": "accommodation",
"label": "Accommodation",
"icon_category": "tourism",
"count": 3951,
"details": [
{ "kind_detail": "apartment", "label": "Holiday apartment", "count": 184 },
{ "kind_detail": "camp_site", "label": "Campsite", "count": 903 },
…
]
},
…
],
"lang": "en"
}
18 categories (kind), each with several subtypes (kind_detail):
kind | Name | Example subtypes |
|---|---|---|
accommodation | Accommodation | hotel, guest_house, camp_site |
automotive | Automotive | fuel, charging_station, parking, car_repair |
culture | Culture | museum, theatre, cinema |
education | Education | school, kindergarten, library |
emergency | Emergency services | police, fire_station, ambulance_station |
finance | Finance | atm, bank |
food_drink | Food and drink | cafe, restaurant, fast_food, pub |
healthcare | Healthcare | pharmacy, hospital, dentist |
industrial | Industry and energy | power_plant, wind_farm, quarry |
leisure | Leisure | park, playground, sauna |
outdoor | Outdoors | viewpoint, observation_tower, picnic_site |
public | Public facilities | toilets, post_office, townhall, recycling |
religion | Religion | church, monastery |
services | Services | parcel_locker, hairdresser, veterinary |
shopping | Shopping | supermarket, convenience, mall |
sport | Sport | sports_centre, fitness_centre, swimming_pool |
tourism | Sights | attraction, manor, castle |
transport | Transport | bus_stop, railway_station, harbour |
One place by identifier
/v1/places/{id} returns one place (a GeoJSON Feature, without the score and
match fields). id is the pid from a response or a Wikidata ID:
curl "https://api.elemroot.com/places/v1/places/w878352266?lang=en&key=docs_3d4e64fa1755d7299cb78bf6"
curl "https://api.elemroot.com/places/v1/places/Q90?lang=en&key=docs_3d4e64fa1755d7299cb78bf6"
pid forms: n…, w…, r… (map objects),
ee_placename:NO… (Estonian place names) and others; treat the identifier as an opaque string.
An ID may change when the dataset is updated; for a lasting link keep wikidata as well, when present.
Response fields
The search response is a GeoJSON FeatureCollection. Empty fields are left out of the response.
| Field | Meaning |
|---|---|
query | The request as the service sees it: q, normalised norm, lang, fuzzy (whether typo tolerance was used), took_ms; partial true if the search stopped at its time limit |
features[].id, properties.pid | Place identifier (see one place by identifier) |
geometry | Point [longitude, latitude] (WGS84) |
bbox | Extent of the place [minLon, minLat, maxLon, maxLat], when available |
type | Place type (see places by name) or poi |
name, name_local | Name in the chosen language and in the place's own language |
label | Display text: name, region, country |
country, country_name, region | Country code (ISO2), country name and region |
wikidata, population | Wikidata ID and population, when available |
importance, score | Importance of the place 0…1 and match score 0…1 (ordering) |
match | How the result was found: kind exact, prefix, word, substring, fuzzy or category; lang = the name that matched; field = where the query matched: name, context or category (see points of interest) |
zoom | Suggested map zoom for showing this place |
kind, kind_detail | Point of interest category and subtype (see categories) |
category | Subtype name in the chosen language |
icon_category | Icon group (the same as in the vector map points of interest layer) |
map_id, on_map | ID of the same object on the vector map and whether the object is on the map |
address, phone, website, opening_hours, brand | Address, phone, website, opening hours (e.g. Mo-Fr 08:30-20:00; Sa 10:00-18:00, off = closed, 24/7 = always open) and brand of a point of interest, when available |
stops | How many stops with the same name are together in this result (see stops), when there are at least two |
Autocomplete and typos
By default (autocomplete=1) the last word may be incomplete: Tallinn Airp finds
Tallinn Airport. When searching while typing, send a request after each keystroke; autocomplete=0 requires whole words.
fuzzy=auto allows typos when there is no exact match: Tartuu finds Tartu
(match.kind fuzzy). An airport can also be found by its code:
TLL (match.lang code).
Cache
A successful response has Cache-Control: public, max-age=86400 and an ETag; a repeated request
with If-None-Match returns 304. Errors and partial responses cut off by the time
limit (query.partial) have Cache-Control: no-store. CORS is open
(Access-Control-Allow-Origin: *).
Error handling
| Code | Body | When |
|---|---|---|
400 | {"error":"bad_param","param":"limit"} | invalid parameter (param tells which) |
400 | {"error":"q_required","param":"q"} | neither q nor category given |
403 | {"error":"invalid_api_key"} | key missing, wrong or without access to this service |
404 | {"error":"not_found"} | no place with this identifier |
curl "https://api.elemroot.com/places/v1/places/search?q=pharmacy&limit=99&key=docs_3d4e64fa1755d7299cb78bf6"
{"error":"bad_param","param":"limit"}