X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/c80c80200c0c2e78811d0b96e225406471e0ad48..da7218350b42f6470d575b88b9e6bb72b6e65ee5:/docs/api/Details.md?ds=sidebyside diff --git a/docs/api/Details.md b/docs/api/Details.md index 66b52409..2776bfe2 100644 --- a/docs/api/Details.md +++ b/docs/api/Details.md @@ -10,15 +10,21 @@ Lookup details about a single place by id. The default output is HTML for debugg The details API supports the following two request formats: ``` - https://nominatim.openstreetmap.org/details?osmtype=[N|W|R]&osmid= + https://nominatim.openstreetmap.org/details?osmtype=[N|W|R]&osmid=&class= ``` -Both parameters are required, the type is one of node(N), way(W) or relation(R). - -Or +`osmtype` and `osmid` are required parameter. The type is one of node (N), way (W) +or relation (R). The id must be a number. The `class` parameter is optional and +allows to distinguish between entries, when the corresponding OSM object has more +than one main tag. For example, when a place is tagged with `tourism=hotel` and +`amenity=restaurant`, there will be two place entries in Nominatim, one for a +restaurant, one for a hotel. You need to specify `class=tourism` or `class=amentity` +to get exactly the one you want. If there are multiple places in the database +but the `class` parameter is left out, then one of the places will be chosen +at random and displayed. ``` - https://nominatim.openstreetmap.org/details?placeid= + https://nominatim.openstreetmap.org/details?place_id= ``` Placeids are assigned sequentially during Nominatim data import. The id for a place is different between Nominatim installation (servers) and changes when data gets reimported. Therefore it can't be used as permanent id and shouldn't be used in bug reports. @@ -34,7 +40,7 @@ See [Place Output Formats](Output.md) for details on each format. (Default: html * `json_callback=` -Wrap json output in a callback function (JSONP) i.e. `()`. +Wrap JSON output in a callback function (JSONP) i.e. `()`. Only has an effect for JSON output formats. * `pretty=[0|1]`