3 Reverse geocoding generates an address from a latitude and longitude.
7 The reverse geocoding API does not exactly compute the address for the
8 coordinate it receives. It works by finding the closest suitable OSM object
9 and returning its address information. This may occasionally lead to
12 First of all, Nominatim only includes OSM objects in
13 its index that are suitable for searching. Small, unnamed paths for example
14 are missing from the database and can therefore not be used for reverse
17 The other issue to be aware of is that the closest OSM object may not always
18 have a similar enough address to the coordinate you were requesting. For
19 example, in dense city areas it may belong to a completely different street.
24 The main format of the reverse API is
27 https://nominatim.openstreetmap.org/reverse?lat=<value>&lon=<value>&<params>
30 where `lat` and `lon` are latitude and longitutde of a coordinate in WGS84
31 projection. The API returns exactly one result or an error when the coordinate
32 is in an area with no OSM data coverage.
34 Additional paramters are accepted as listed below.
36 !!! warning "Deprecation warning"
37 The reverse API used to allow address lookup for a single OSM object by
38 its OSM id. This use is now deprecated. Use the [Address Lookup API](../Lookup)
43 * `format=[xml|json|jsonv2|geojson|geocodejson]`
45 See [Place Output Formats](Output.md) for details on each format. (Default: xml)
47 * `json_callback=<string>`
49 Wrap JSON output in a callback function ([JSONP](https://en.wikipedia.org/wiki/JSONP)) i.e. `<string>(<json>)`.
50 Only has an effect for JSON output formats.
54 * `addressdetails=[0|1]`
56 Include a breakdown of the address into elements. (Default: 1)
61 Include additional information in the result if available,
62 e.g. wikipedia link, opening hours. (Default: 0)
67 Include a list of alternative names in the results. These may include
68 language variants, references, operator and brand. (Default: 0)
71 ### Language of results
73 * `accept-language=<browser language string>`
75 Preferred language order for showing search results, overrides the value
76 specified in the "Accept-Language" HTTP header.
77 Either use a standard RFC2616 accept-language string or a simple
78 comma-separated list of language codes.
84 Level of detail required for the address. Default: 18. This is a number that
85 corresponds roughly to the zoom level used in XYZ tile sources in frameworks
86 like Leaflet.js, Openlayers etc.
87 In terms of address details the zoom levels are as follows:
97 17 | major and minor streets
103 * `polygon_geojson=1`
108 Output geometry of results as a GeoJSON, KML, SVG or WKT. Only one of these
109 options can be used at a time. (Default: 0)
111 * `polygon_threshold=0.0`
113 Return a simplified version of the output geometry. The parameter is the
114 tolerance in degrees with which the geometry may differ from the original
115 geometry. Topology is preserved in the result. (Default: 0.0)
119 * `email=<valid email address>`
121 If you are making large numbers of request please include an appropriate email
122 address to identify your requests. See Nominatim's [Usage Policy](https://operations.osmfoundation.org/policies/nominatim/) for more details.
127 Output assorted developer debug information. Data on internals of Nominatim's
128 "Search Loop" logic, and SQL queries. The output is (rough) HTML format.
129 This overrides the specified machine readable format. (Default: 0)
134 * [https://nominatim.openstreetmap.org/reverse?format=xml&lat=52.5487429714954&lon=-1.81602098644987&zoom=18&addressdetails=1](https://nominatim.openstreetmap.org/reverse?format=xml&lat=52.5487429714954&lon=-1.81602098644987&zoom=18&addressdetails=1)
137 <reversegeocode timestamp="Fri, 06 Nov 09 16:33:54 +0000" querystring="...">
138 <result place_id="1620612" osm_type="node" osm_id="452010817">
139 135, Pilkington Avenue, Wylde Green, City of Birmingham, West Midlands (county), B72, United Kingdom
142 <house_number>135</house_number>
143 <road>Pilkington Avenue</road>
144 <village>Wylde Green</village>
145 <town>Sutton Coldfield</town>
146 <city>City of Birmingham</city>
147 <county>West Midlands (county)</county>
148 <postcode>B72</postcode>
149 <country>United Kingdom</country>
150 <country_code>gb</country_code>
155 ##### Example with `format=jsonv2`
157 * [https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=-34.44076&lon=-58.70521](https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=-34.44076&lon=-58.70521)
161 "place_id":"134140761",
162 "licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright",
164 "osm_id":"280940520",
168 "category":"highway",
171 "addresstype":"road",
172 "display_name":"Autopista Pedro Eugenio Aramburu, El Triángulo, Partido de Malvinas Argentinas, Buenos Aires, 1.619, Argentina",
173 "name":"Autopista Pedro Eugenio Aramburu",
175 "road":"Autopista Pedro Eugenio Aramburu",
176 "village":"El Triángulo",
177 "state_district":"Partido de Malvinas Argentinas",
178 "state":"Buenos Aires",
180 "country":"Argentina",
183 "boundingbox":["-34.44159","-34.4370994","-58.7086067","-58.7044712"]
187 ##### Example with `format=geojson`
189 * [https://nominatim.openstreetmap.org/reverse?format=geojson&lat=44.50155&lon=11.33989](https://nominatim.openstreetmap.org/reverse?format=geojson&lat=44.50155&lon=11.33989)
193 "type": "FeatureCollection",
194 "licence": "Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",
199 "place_id": "18512203",
201 "osm_id": "1704756187",
206 "addresstype": "place",
208 "display_name": "71, Via Guglielmo Marconi, Saragozza-Porto, Bologna, BO, Emilia-Romagna, 40122, Italy",
210 "house_number": "71",
211 "road": "Via Guglielmo Marconi",
212 "suburb": "Saragozza-Porto",
215 "state": "Emilia-Romagna",
239 ##### Example with `format=geocodejson`
241 [https://nominatim.openstreetmap.org/reverse?format=geocodejson&lat=60.2299&lon=11.1663](https://nominatim.openstreetmap.org/reverse?format=geocodejson&lat=60.2299&lon=11.1663)
245 "type": "FeatureCollection",
248 "attribution": "Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",
250 "query": "60.229917843587,11.16630979382"
256 "place_id": "42700574",
258 "osm_id": "3110596255",
261 "label": "1, Løvenbergvegen, Mogreina, Ullensaker, Akershus, 2054, Norway",
264 "street": "Løvenbergvegen",
266 "county": "Akershus",
269 "level7": "Ullensaker",
270 "level4": "Akershus",