Skip to content

Places

Search and retrieve geocode data with the ability to search addresses by prompt.

Addresses list by prompt

Available 2 options with the same functionality but different request methods

By GET method

Endpoint: address = Desired address

js
GET: `/v1/places/autocomplete/${address}`
GET: `/v1/places/autocomplete/${address}`

Response:

json
{
  "data": [
    "UNITY Business Centre, Vienības gatve, Zemgale Suburb, Riga, Latvia",
    "Unity Biznesa Centrs, Citadeles iela, Central District, Riga, Latvia",
    "Daugavpils Unity House, Rīgas iela, Daugavpils, Latvia",
    "Daugavpils Vienības tilts, Daugavas iela, Daugavpils, Latvia",
    "UNITY basketball facility, Grebenščikova iela, Latgale Suburb, Riga, Latvia"
  ]
}
{
  "data": [
    "UNITY Business Centre, Vienības gatve, Zemgale Suburb, Riga, Latvia",
    "Unity Biznesa Centrs, Citadeles iela, Central District, Riga, Latvia",
    "Daugavpils Unity House, Rīgas iela, Daugavpils, Latvia",
    "Daugavpils Vienības tilts, Daugavas iela, Daugavpils, Latvia",
    "UNITY basketball facility, Grebenščikova iela, Latgale Suburb, Riga, Latvia"
  ]
}

By POST method

Endpoint:

js
POST: `/v1/places/autocomplete`
POST: `/v1/places/autocomplete`

Request:

json
{
  "input": "Desired address"
}
{
  "input": "Desired address"
}

Response:

json
{
  "data": [
    "UNITY Business Centre, Vienības gatve, Zemgale Suburb, Riga, Latvia",
    "Unity Biznesa Centrs, Citadeles iela, Central District, Riga, Latvia",
    "Daugavpils Unity House, Rīgas iela, Daugavpils, Latvia",
    "Daugavpils Vienības tilts, Daugavas iela, Daugavpils, Latvia",
    "UNITY basketball facility, Grebenščikova iela, Latgale Suburb, Riga, Latvia"
  ]
}
{
  "data": [
    "UNITY Business Centre, Vienības gatve, Zemgale Suburb, Riga, Latvia",
    "Unity Biznesa Centrs, Citadeles iela, Central District, Riga, Latvia",
    "Daugavpils Unity House, Rīgas iela, Daugavpils, Latvia",
    "Daugavpils Vienības tilts, Daugavas iela, Daugavpils, Latvia",
    "UNITY basketball facility, Grebenščikova iela, Latgale Suburb, Riga, Latvia"
  ]
}

Address geocoding

Available 2 options with the same functionality but different request methods

By GET method

Endpoint: address = Address prompt

js
GET: `/v1/places/geocode/${address}`
GET: `/v1/places/geocode/${address}`

Response:

json
{
  "data": {
    "address": "Vienības gat. 109, Zemgales priekšpilsēta, Rīga, LV-1058, Latvia",
    "country": "LV",
    "coordinates": [
      56.9085346,
      24.0836221
    ]
  }
}
{
  "data": {
    "address": "Vienības gat. 109, Zemgales priekšpilsēta, Rīga, LV-1058, Latvia",
    "country": "LV",
    "coordinates": [
      56.9085346,
      24.0836221
    ]
  }
}

By POST method

Endpoint:

js
POST: `/v1/places/geocode`
POST: `/v1/places/geocode`

Request:

json
{
  "address": "Address string"
}
{
  "address": "Address string"
}

Response:

json
{
  "data": {
    "address": "Vienības gat. 109, Zemgales priekšpilsēta, Rīga, LV-1058, Latvia",
    "country": "LV",
    "coordinates": [
      56.9085346,
      24.0836221
    ]
  }
}
{
  "data": {
    "address": "Vienības gat. 109, Zemgales priekšpilsēta, Rīga, LV-1058, Latvia",
    "country": "LV",
    "coordinates": [
      56.9085346,
      24.0836221
    ]
  }
}

All rights reserved.