Пошук місць і POI
Autocomplete.search
Повнотекстовий пошук міст, вулиць, адрес і точок інтересу.
Параметри body
| Тіло запиту | Тип | Опис |
|---|---|---|
query | string ОБОВ’ЯЗКОВЕ | Search phrase. |
types | string[] | Restrict to "place" and/or "poi". Default: both. |
Приклад запиту
{
"query": "Warszawa Domaniewska 37"
}Приклад відповіді
{
"result": {
"items": [
{
"type": "place",
"subtype": "building",
"name": "Domaniewska 37, 02-672 Warszawa",
"province": "mazowieckie",
"place": "Warszawa",
"quarter": "Mokotów",
"street": "Domaniewska",
"number": "37",
"postal_code": "02-672",
"coords": {
"x": 21.0071318,
"y": 52.18284
}
},
{
"type": "place",
"subtype": "building",
"name": "Domaniewska 37A, 02-672 Warszawa",
"place": "Warszawa",
"street": "Domaniewska",
"number": "37A",
"postal_code": "02-672",
"coords": {
"x": 21.0070156,
"y": 52.18238
}
}
]
}
}поля result
| поля result | Тип | Опис |
|---|---|---|
items[].type | string | place | poi. |
items[].subtype | string | Detailed type (POI category or place/street/building). |
items[].name | string | Display name. |
items[].province | string | Province. |
items[].district | string | District. |
items[].community | string | Community. |
items[].place | string | City. |
items[].quarter | string | Quarter. |
items[].street | string | Street. |
items[].number | string | Building number. |
items[].postal_code | string | Postal code. |
items[].coords | object | { x, y } longitude / latitude. |