Geocoding /geocode
Search for countries, administrative-territorial objects, cities, streets, addresses, and points of interest by name words, as well as reverse geocoding.
Request Schema
https://api.visicom.ua/data-api/5.0/[lang]/geocode[.format]?[categories|ci][&text|t][&word_text|wt][&near|n|intersect|i|contains|co][&radius|r][&limit|l][&country|c][&boost_country|bc][&zoom][&key][&callback]
Request Parameters
| Parameter | Description |
|---|---|
lang | Request and response language. One of (ru, uk, en). |
format | Data format (json, csv). |
categories | ci | List of category IDs separated by commas, in which the object search will be performed. |
categories_exclude|ce | List of category IDs separated by commas to exclude from search results. |
text|t | Text that must appear in the object description. Example: text=Хрещатик, t=Жовтень. |
word_text|wt | Words that must appear in the object description. Example: word_text=Киев. Variants like Київський, Київська etc. will not match. |
near|n | Object ID or geometry in WKT format with no more than 250 vertices. For points, simplified format lng,lat is allowed. Distance to the given geometry will be considered in the result. Example: near=POIA1KIGKN, n=30.5113,50.4550. |
radius|r | Radius in meters around the location specified by near. |
order | Sorting type for objects in the response. Possible values: relevance (sort by relevance to the query), distance (sort by distance from the location specified by near). Default is relevance. |
intersect|i | Object ID or geometry in WKT format with no more than 250 vertices. For points, simplified format lng,lat is allowed. Returns objects whose geometry intersects with the specified geometry. |
contains|co | Object ID or geometry in WKT format with no more than 250 vertices. For points, simplified format lng,lat is allowed. Returns objects whose geometry is contained within the specified geometry. |
zoom|z | Map zoom according to TMS specification. The lower the zoom, the less the coordinates specified by near affect object relevance. |
limit|l | Maximum number of returned objects. Maximum 250. |
country|c | Country code. |
boost_country|bc | Country code. If country is not specified, objects in this country will have higher priority. |
key | Authorization key. |
callback | Function name for JSONP request. |
Mutually exclusive parameters
near,intersect,containstext,word_textcategories,categories_exclude
This request does not return full object geometry. Only the geo-centroid (geo_centroid) and bounding box (bbox) are returned. To get full object description and geometry, use the /feature request.
Response
The structure of the /geocode response depends on the object category (category list). Response schemas by categories:
- adm_country
- adm_district
- adm_level1
- adm_level2
- adm_level3
- hst_district
- adm_settlement
- adr_address
- adr_street
- roa_road
- pois
Examples
Get all streets in Kyiv containing the word "Заплавна":
https://api.visicom.ua/data-api/5.0/en/geocode.json?categories=adr_street&text=Київ, заплавна&key=YOUR_API_KEY
Find the address "Kyiv, Khreshchatyk St, 26":
https://api.visicom.ua/data-api/5.0/en/geocode.json?text=Kyiv, Khreshchatyk St, 26&key=YOUR_API_KEY
Get all restaurants within a 300-meter radius of Visicom company:
https://api.visicom.ua/data-api/5.0/en/geocode.json?categories=poi_restaurant&near=POIA1KIGKN&radius=300&key=YOUR_API_KEY
Find the nearest address within 50 m of a given point:
https://api.visicom.ua/data-api/5.0/en/geocode.json?categories=adr_address&near=30.51043,50.45358&r=50&l=1&key=YOUR_API_KEY