GetSearchResult (POST)

The action route is responsible for handling the location search query based on the search key the user submitted and the language used.


Name Type Description Required?
searchKey String User input search key **true**
Language String The language where the search will be targeted to **true**



  "totalCount": "<Total count from all result items>",
  "locations": [ // Array from search result items
      "id": "<result identifier>",
      "rank": "<semantic ordering number>",
      "lon": "<longitude>",
      "village": "<municipality>",
      "name": "<name>",
      "zoomLevel": "<zoom level>",
      "type": "<result type>",
      "lat": "<latitude>"


Returns HTTP code 500 with an error message as a string in response body. Will return an error if the searchKey param is empty, if it contains the * character and is under 4 characters long or if it contains more than one * characters.


Example query for Paikkatietoikkuna

With POST params:

name value
searchKey Hiihtomäentie 35
Language fi


      "id":0,"rank":50,"lon":"390968.165","village":"Helsinki","name":"Hiihtomäentie 35","zoomLevel":"10","type":"Osoite","lat":"6675689.387"
      "id":1,"rank":50,"lon":"261353.172","village":"Vöyri","name":"Hiihtomäentie 35","zoomLevel":"10","type":"Osoite","lat":"7009010.485"

Example curl request

Last modified: Fri Jun 07 2024 11:06:13 GMT+0300 (Eastern European Summer Time)