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 longitude 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 parameters 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.md)
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:
100 17 | major and minor streets
106 * `polygon_geojson=1`
111 Output geometry of results as a GeoJSON, KML, SVG or WKT. Only one of these
112 options can be used at a time. (Default: 0)
114 * `polygon_threshold=0.0`
116 Return a simplified version of the output geometry. The parameter is the
117 tolerance in degrees with which the geometry may differ from the original
118 geometry. Topology is preserved in the result. (Default: 0.0)
122 * `email=<valid email address>`
124 If you are making a large number of requests, please include an appropriate email
125 address to identify your requests. See Nominatim's [Usage Policy](https://operations.osmfoundation.org/policies/nominatim/) for more details.
130 Output assorted developer debug information. Data on internals of Nominatim's
131 "Search Loop" logic, and SQL queries. The output is (rough) HTML format.
132 This overrides the specified machine readable format. (Default: 0)
137 * [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)
140 <reversegeocode timestamp="Fri, 06 Nov 09 16:33:54 +0000" querystring="...">
141 <result place_id="1620612" osm_type="node" osm_id="452010817">
142 135, Pilkington Avenue, Wylde Green, City of Birmingham, West Midlands (county), B72, United Kingdom
145 <house_number>135</house_number>
146 <road>Pilkington Avenue</road>
147 <village>Wylde Green</village>
148 <town>Sutton Coldfield</town>
149 <city>City of Birmingham</city>
150 <county>West Midlands (county)</county>
151 <postcode>B72</postcode>
152 <country>United Kingdom</country>
153 <country_code>gb</country_code>
158 ##### Example with `format=jsonv2`
160 * [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)
164 "place_id":"134140761",
165 "licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright",
167 "osm_id":"280940520",
171 "category":"highway",
174 "addresstype":"road",
175 "display_name":"Autopista Pedro Eugenio Aramburu, El Triángulo, Partido de Malvinas Argentinas, Buenos Aires, 1.619, Argentina",
176 "name":"Autopista Pedro Eugenio Aramburu",
178 "road":"Autopista Pedro Eugenio Aramburu",
179 "village":"El Triángulo",
180 "state_district":"Partido de Malvinas Argentinas",
181 "state":"Buenos Aires",
183 "country":"Argentina",
186 "boundingbox":["-34.44159","-34.4370994","-58.7086067","-58.7044712"]
190 ##### Example with `format=geojson`
192 * [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)
196 "type": "FeatureCollection",
197 "licence": "Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",
202 "place_id": "18512203",
204 "osm_id": "1704756187",
209 "addresstype": "place",
211 "display_name": "71, Via Guglielmo Marconi, Saragozza-Porto, Bologna, BO, Emilia-Romagna, 40122, Italy",
213 "house_number": "71",
214 "road": "Via Guglielmo Marconi",
215 "suburb": "Saragozza-Porto",
218 "state": "Emilia-Romagna",
242 ##### Example with `format=geocodejson`
244 [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)
248 "type": "FeatureCollection",
251 "attribution": "Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",
253 "query": "60.229917843587,11.16630979382"
259 "place_id": "42700574",
261 "osm_id": "3110596255",
264 "label": "1, Løvenbergvegen, Mogreina, Ullensaker, Akershus, 2054, Norway",
267 "street": "Løvenbergvegen",
269 "county": "Akershus",
272 "level7": "Ullensaker",
273 "level4": "Akershus",