3 Reverse geocoding generates an address from a coordinate given as
 
   4 latitude and longitude.
 
   8 The reverse geocoding API does not exactly compute the address for the
 
   9 coordinate it receives. It works by finding the closest suitable OSM object
 
  10 and returning its address information. This may occasionally lead to
 
  13 First of all, Nominatim only includes OSM objects in
 
  14 its index that are suitable for searching. Small, unnamed paths for example
 
  15 are missing from the database and can therefore not be used for reverse
 
  18 The other issue to be aware of is that the closest OSM object may not always
 
  19 have a similar enough address to the coordinate you were requesting. For
 
  20 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.
 
  35 !!! danger "Deprecation warning"
 
  36     The reverse API used to allow address lookup for a single OSM object by
 
  37     its OSM id for `[PHP-only]`. The use is considered deprecated.
 
  38     Use the [Address Lookup API](Lookup.md) instead.
 
  40 !!! danger "Deprecation warning"
 
  41     The API can also be used with the URL
 
  42     `https://nominatim.openstreetmap.org/reverse.php`. This is now deprecated
 
  43     and will be removed in future versions.
 
  48 This section lists additional parameters to further influence the output.
 
  52 | Parameter | Value | Default |
 
  53 |-----------| ----- | ------- |
 
  54 | format    | one of: `xml`, `json`, `jsonv2`, `geojson`, `geocodejson` | `xml` |
 
  56 See [Place Output Formats](Output.md) for details on each format.
 
  59 | Parameter | Value | Default |
 
  60 |-----------| ----- | ------- |
 
  61 | json_callback | function name | _unset_ |
 
  63 When given, then JSON output will be wrapped in a callback function with
 
  64 the given name. See [JSONP](https://en.wikipedia.org/wiki/JSONP) for more
 
  67 Only has an effect for JSON output formats.
 
  72 | Parameter | Value | Default |
 
  73 |-----------| ----- | ------- |
 
  74 | addressdetails | 0 or 1 | 1 |
 
  76 When set to 1, include a breakdown of the address into elements.
 
  77 The exact content of the address breakdown depends on the output format.
 
  80     If you are interested in a stable classification of address categories
 
  81     (suburb, city, state, etc), have a look at the `geocodejson` format.
 
  82     All other formats return classifications according to OSM tagging.
 
  83     There is a much larger set of categories and they are not always consistent,
 
  84     which makes them very hard to work with.
 
  87 | Parameter | Value | Default |
 
  88 |-----------| ----- | ------- |
 
  89 | extratags | 0 or 1 | 0 |
 
  91 When set to 1, the response include any additional information in the result
 
  92 that is available in the database, e.g. wikipedia link, opening hours.
 
  95 | Parameter | Value | Default |
 
  96 |-----------| ----- | ------- |
 
  97 | namedetails | 0 or 1 | 0 |
 
  99 When set to 1, include a full list of names for the result. These may include
 
 100 language variants, older names, references and brand.
 
 103 ### Language of results
 
 105 | Parameter | Value | Default |
 
 106 |-----------| ----- | ------- |
 
 107 | accept-language | browser language string | content of "Accept-Language" HTTP header |
 
 109 Preferred language order for showing search results. This may either be
 
 110 a simple comma-separated list of language codes or have the same format
 
 111 as the ["Accept-Language" HTTP header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language).
 
 114     First-time users of Nominatim tend to be confused that they get different
 
 115     results when using Nominatim in the browser versus in a command-line tool
 
 116     like wget or curl. The command-line tools
 
 117     usually don't send any Accept-Language header, prompting Nominatim
 
 118     to show results in the local language. Browsers on the contratry always
 
 119     send the currently chosen browser language.
 
 122 ### Result restriction
 
 124 | Parameter | Value | Default |
 
 125 |-----------| ----- | ------- |
 
 128 Level of detail required for the address. This is a number that
 
 129 corresponds roughly to the zoom level used in XYZ tile sources in frameworks
 
 130 like Leaflet.js, Openlayers etc.
 
 131 In terms of address details the zoom levels are as follows:
 
 133  zoom | address detail
 
 134  -----|---------------
 
 140   13  | village / suburb
 
 144   17  | major and minor streets
 
 148 | Parameter | Value | Default |
 
 149 |-----------| ----- | ------- |
 
 150 | layer     | comma-separated list of: `address`, `poi`, `railway`, `natural`, `manmade` | _unset_ (no restriction) |
 
 154 The layer filter allows to select places by themes.
 
 156 The `address` layer contains all places that make up an address:
 
 157 address points with house numbers, streets, inhabited places (suburbs, villages,
 
 158 cities, states etc.) and administrative boundaries.
 
 160 The `poi` layer selects all point of interest. This includes classic points
 
 161 of interest like restaurants, shops, hotels but also less obvious features
 
 162 like recycling bins, guideposts or benches.
 
 164 The `railway` layer includes railway infrastructure like tracks.
 
 165 Note that in Nominatim's standard configuration, only very few railway
 
 166 features are imported into the database.
 
 168 The `natural` layer collects features like rivers, lakes and mountains while
 
 169 the `manmade` layer functions as a catch-all for features not covered by the
 
 175 | Parameter | Value  | Default |
 
 176 |-----------| -----  | ------- |
 
 177 | polygon_geojson | 0 or 1 | 0 |
 
 178 | polygon_kml     | 0 or 1 | 0 |
 
 179 | polygon_svg     | 0 or 1 | 0 |
 
 180 | polygon_text    | 0 or 1 | 0 |
 
 182 Add the full geometry of the place to the result output. Output formats
 
 183 in GeoJSON, KML, SVG or WKT are supported. Only one of these
 
 184 options can be used at a time.
 
 186 | Parameter | Value  | Default |
 
 187 |-----------| -----  | ------- |
 
 188 | polygon_threshold | floating-point number | 0.0 |
 
 190 When one of the polygon_* outputs is chosen, return a simplified version
 
 191 of the output geometry. The parameter describes the
 
 192 tolerance in degrees with which the geometry may differ from the original
 
 193 geometry. Topology is preserved in the geometry.
 
 198 | Parameter | Value  | Default |
 
 199 |-----------| -----  | ------- |
 
 200 | email     | valid email address | _unset_ |
 
 202 If you are making large numbers of request please include an appropriate email
 
 203 address to identify your requests. See Nominatim's
 
 204 [Usage Policy](https://operations.osmfoundation.org/policies/nominatim/) for more details.
 
 207 | Parameter | Value  | Default |
 
 208 |-----------| -----  | ------- |
 
 209 | debug     | 0 or 1 | 0       |
 
 211 Output assorted developer debug information. Data on internals of Nominatim's
 
 212 "search loop" logic, and SQL queries. The output is HTML format.
 
 213 This overrides the specified machine readable format.
 
 218 * [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)
 
 221   <reversegeocode timestamp="Fri, 06 Nov 09 16:33:54 +0000" querystring="...">
 
 222     <result place_id="1620612" osm_type="node" osm_id="452010817">
 
 223       135, Pilkington Avenue, Wylde Green, City of Birmingham, West Midlands (county), B72, United Kingdom
 
 226       <house_number>135</house_number>
 
 227       <road>Pilkington Avenue</road>
 
 228       <village>Wylde Green</village>
 
 229       <town>Sutton Coldfield</town>
 
 230       <city>City of Birmingham</city>
 
 231       <county>West Midlands (county)</county>
 
 232       <postcode>B72</postcode>
 
 233       <country>United Kingdom</country>
 
 234       <country_code>gb</country_code>
 
 239 ##### Example with `format=jsonv2`
 
 241 * [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)
 
 245   "place_id":"134140761",
 
 246   "licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright",
 
 248   "osm_id":"280940520",
 
 252   "category":"highway",
 
 255   "addresstype":"road",
 
 256   "display_name":"Autopista Pedro Eugenio Aramburu, El Triángulo, Partido de Malvinas Argentinas, Buenos Aires, 1.619, Argentina",
 
 257   "name":"Autopista Pedro Eugenio Aramburu",
 
 259     "road":"Autopista Pedro Eugenio Aramburu",
 
 260     "village":"El Triángulo",
 
 261     "state_district":"Partido de Malvinas Argentinas",
 
 262     "state":"Buenos Aires",
 
 264     "country":"Argentina",
 
 267   "boundingbox":["-34.44159","-34.4370994","-58.7086067","-58.7044712"]
 
 271 ##### Example with `format=geojson`
 
 273 * [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)
 
 277   "type": "FeatureCollection",
 
 278   "licence": "Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",
 
 283         "place_id": "18512203",
 
 285         "osm_id": "1704756187",
 
 290         "addresstype": "place",
 
 292         "display_name": "71, Via Guglielmo Marconi, Saragozza-Porto, Bologna, BO, Emilia-Romagna, 40122, Italy",
 
 294           "house_number": "71",
 
 295           "road": "Via Guglielmo Marconi",
 
 296           "suburb": "Saragozza-Porto",
 
 299           "state": "Emilia-Romagna",
 
 323 ##### Example with `format=geocodejson`
 
 325 [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)
 
 329   "type": "FeatureCollection",
 
 332     "attribution": "Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",
 
 334     "query": "60.229917843587,11.16630979382"
 
 340         "place_id": "42700574",
 
 342         "osm_id": "3110596255",
 
 345         "label": "1, Løvenbergvegen, Mogreina, Ullensaker, Akershus, 2054, Norway",
 
 348         "street": "Løvenbergvegen",
 
 350         "county": "Akershus",
 
 353           "level7": "Ullensaker",
 
 354           "level4": "Akershus",