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.

Real examples. Requests and responses were made against https://api.elemroot.com/places. Longer responses are shortened (…).
Contents

Endpoints

Base: https://api.elemroot.com/places. Every request carries the API key as parameter key.

PathPurpose
/v1/places/searchSearch by name or category
/v1/places/{id}One place by identifier (pid or Wikidata ID Q…)
/v1/places/categoriesPoint of interest categories and their names in the chosen language
/v1/places/metaDataset version and number of places by type

Search parameters

These parameters apply to /v1/places/search. Unknown parameters are ignored.

ParamMeaningPossible values / exampleDefault
q *Search text, 1–100 characters. Required unless category is givenEndla raba, pharmacy, fuel Pärnu—
langLanguage of names and categorieset, en, ru, local (the place's own language)et
limitNumber of results1…5010
includePoints of interest alongside placespoi—
typesOnly these types (comma-separated). poi = points of interest onlypoi, city,town, lakeall place types
categoryPoint of interest category or subtype (up to 20, comma-separated); q is then optionalpharmacy, fuel, healthcare—
nearProximity: latitude,longitude. A search by category returns the nearest first59.437,24.745—
bboxArea limit: minLon,minLat,maxLon,maxLat24.70,59.42,24.80,59.46—
countryOnly these countries, ISO2 (comma-separated)EE, LV,LT—
exclude_countryLeave out these countries, ISO2 (comma-separated)RU—
autocompleteThe last word may be incomplete (search while typing)1, 01
fuzzyAllow typosauto, 1, 0auto
groupStops with the same name close together: stops = one result (see stops), none = each stop separatelystops, nonestops
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:

ParameterWhat you get
include=poiplaces and points of interest together
types=poipoints 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"
Compute the distance yourself. The response has no distance; the order is nearest first. The distance is between 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):

kindNameExample subtypes
accommodationAccommodationhotel, guest_house, camp_site
automotiveAutomotivefuel, charging_station, parking, car_repair
cultureCulturemuseum, theatre, cinema
educationEducationschool, kindergarten, library
emergencyEmergency servicespolice, fire_station, ambulance_station
financeFinanceatm, bank
food_drinkFood and drinkcafe, restaurant, fast_food, pub
healthcareHealthcarepharmacy, hospital, dentist
industrialIndustry and energypower_plant, wind_farm, quarry
leisureLeisurepark, playground, sauna
outdoorOutdoorsviewpoint, observation_tower, picnic_site
publicPublic facilitiestoilets, post_office, townhall, recycling
religionReligionchurch, monastery
servicesServicesparcel_locker, hairdresser, veterinary
shoppingShoppingsupermarket, convenience, mall
sportSportsports_centre, fitness_centre, swimming_pool
tourismSightsattraction, manor, castle
transportTransportbus_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.

FieldMeaning
queryThe 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.pidPlace identifier (see one place by identifier)
geometryPoint [longitude, latitude] (WGS84)
bboxExtent of the place [minLon, minLat, maxLon, maxLat], when available
typePlace type (see places by name) or poi
name, name_localName in the chosen language and in the place's own language
labelDisplay text: name, region, country
country, country_name, regionCountry code (ISO2), country name and region
wikidata, populationWikidata ID and population, when available
importance, scoreImportance of the place 0…1 and match score 0…1 (ordering)
matchHow 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)
zoomSuggested map zoom for showing this place
kind, kind_detailPoint of interest category and subtype (see categories)
categorySubtype name in the chosen language
icon_categoryIcon group (the same as in the vector map points of interest layer)
map_id, on_mapID of the same object on the vector map and whether the object is on the map
address, phone, website, opening_hours, brandAddress, 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
stopsHow 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

CodeBodyWhen
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"}

API reference (Swagger UI) → Interactive try-it-out. OpenAPI spec (YAML file) → Machine-readable API description for tooling. Note: opens as a raw YAML file.