Geocoding API returns locations matching text query and sorted by current location of customer. Full URL for requests is https://api.strues-maps.lt/v1/search. Only successful requests are counted towards soft limits and are billed. It is recommended to check whether the city of geocoding query and the city of geocoding result match when doing batch processing.
text=query
Query contains data to search for in location names or addresses.
point.long=long
Optional parameter used to sort results. Longitude of current location. Longitude must be supplied in WGS84 projection, also known as EPSG 4326.
point.lat=lat
Optional parameter used to sort results. Latitude of current location. Latitude must be supplied in WGS84 projection, also known as EPSG 4326.
size=number
Number of matching results to return.
api_key=your_personal_api_key
Api key is provided after registration. Api key is used for service configuration like soft limits and billing.
200 - Successful response
Request was successfully. Response body contains distance and duration of the fastest route between all pairs of supplied coordinates.
400 - Bad request exception
Returned if parameters are not provided or provided in an invalid format.
401 - Unauthorized
Returned if api key is invalid.
429 - Too many requests
Returned if soft limits are reached.
402 - Payment required
Returned if user has insufficient funds to make a request.
500 - Internal server error
Returned if unexpected error has occurred. We are working on it to resolve it.
Response body contains data in GeoJSON format.
{
"code": "Ok",
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
24.081432,
54.961336
]
},
"properties": {
"id": "relation/7306770",
"layer": "venue",
"source": "openstreetmap",
"name": "Kauno tarptautinis oro uostas",
"street": "Oro uosto g",
"housenumber": "4",
"confidence": 0.8,
"distance": 29,
"match_type": "exact",
"accuracy": "point"
},
"bbox": [
24.0509198,
54.9595084,
24.122255,
54.9669672
]
},
],
"bbox": [
23.926172,
54.915673,
24.122255,
54.9669672
]
}
code - "Ok" or "Error"
type - "FeatureCollection"
features[i] - list of features matching query
features[i].type - "Feature"
features[i].geometry.type - "Point"
features[i].geometry.coordinates - Longitude and latitude of location
or address. Coordinates must be supplied in
WGS84 projection, also known as EPSG 4326.
features[i].properties.id - id of location or address.
features[i].properties.layer - "venue"
features[i].properties.source - "openstreetmap"
features[i].properties.name - name of location or address.
features[i].properties.housenumber - house number of location.
features[i].properties.street - street name of location.
features[i].properties.postalcode - postal code of location.
features[i].properties.distance - distance from supplied coordinates in meters.
features[i].properties.confidence:
1.0: distance is less than 1m
0.9: distance is less than 10m
0.8: distance is less than 100m
0.7: distance is less than 250m
0.6: distance is less than 1km
0.5: distance is more than 1km
features[i].properties.accuracy - "point" or "centroid"
features[i].properties.match_type:
exact - if result is exactly what is in search query;
interpolated - if you are querying address, and exact address cannot be found, but it is possible to estimate where it might be;
fallback - if exact result is not found, a related result is returned;
features[i].bbox - bounding box of feature.
bbox - bounding box of feature collection.