GET /v1/reverse returns up to size places within a radius of a point, nearest first. Each result has its distance in kilometres.
Parameters
| Parameter | Type | Default | Meaning |
|---|---|---|---|
point.lat | number −90–90 | required | Latitude of the point. |
point.lon | number −180–180 | required | Longitude of the point. |
boundary.circle.radius | number, > 0 and ≤ 100 | 1 | Search radius in kilometres. |
size | integer 1–40 | 10 | Number of results. |
layers | list | both | venue, address. |
boundary.country | list | every country | ISO 3166-1 alpha-2 codes. |
focus.point.lat and focus.point.lon are accepted but have no effect here.
Example
curl 'http://localhost:4000/v1/reverse?point.lat=48.8584&point.lon=2.2945&size=1'
{
"features": [
{
"geometry": {
"coordinates": [
2.2944247,
48.8583885
],
"type": "Point"
},
"properties": {
"country": "France",
"country_code": "FR",
"county": "Paris",
"distance": 0.006,
"gid": "geolith:venue:679858559648361093",
"id": "679858559648361093",
"importance": 0.512499988079071,
"label": "Paris, France Eu, Paris, Île-de-France, France",
"layer": "venue",
"locality": "Paris",
"name": "Paris, France Eu",
"region": "Île-de-France",
"source": "geolith"
},
"type": "Feature"
}
],
"geocoding": {
"attribution": "https://search.geolith.app/attribution",
"engine": {
"name": "geolith-search",
"version": "0.1.0"
},
"query": {
"boundary.circle.radius": 1.0,
"point.lat": 48.8584,
"point.lon": 2.2945,
"size": 1
},
"version": "0.2"
},
"type": "FeatureCollection"
}
See Reverse geocoding for how the nearest places are found.