X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/3af8dc95806b2784943926e383b33592a7e93bad..8c3a0efe8b75a06279998e66a932d8a56c483961:/docs/api/Search.md?ds=sidebyside diff --git a/docs/api/Search.md b/docs/api/Search.md index 4b9d773c..c18655dc 100644 --- a/docs/api/Search.md +++ b/docs/api/Search.md @@ -1,6 +1,6 @@ # Search queries -The search API allows to look up a location from a textual description. +The search API allows you to look up a location from a textual description. Nominatim supports structured as well as free-form search queries. The search query may also contain @@ -46,7 +46,7 @@ In this form, the query may be given through two different sets of parameters: Structured requests are faster but are less robust against alternative OSM tagging schemas. **Do not combine with** `q=` **parameter**. -All three query forms accept the additional paramters listed below. +All three query forms accept the additional parameters listed below. ### Output format @@ -56,7 +56,7 @@ See [Place Output Formats](Output.md) for details on each format. (Default: html * `json_callback=` -Wrap json output in a callback function ([JSONP](https://en.wikipedia.org/wiki/JSONP)) i.e. `()`. +Wrap JSON output in a callback function ([JSONP](https://en.wikipedia.org/wiki/JSONP)) i.e. `()`. Only has an effect for JSON output formats. ### Output details @@ -92,8 +92,12 @@ comma-separated list of language codes. * `countrycodes=[,][,]...` Limit search results to one or more countries. `` must be the -ISO 3166-1alpha2 code, e.g. `gb` for the United Kingdom, `de` for Germany. +[ISO 3166-1alpha2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code, +e.g. `gb` for the United Kingdom, `de` for Germany. +Each place in Nominatim is assigned to one country code based +on `admin_level=2` tags, in rare cases to none (for example in +international waters outside any country). * `exclude_place_ids=,,,` The preferred area to find search results. Any two corner points of the box -are accepted in any order as long as they span a real box. +are accepted in any order as long as they span a real box. `x` is longitude, +`y` is latitude. * `bounded=[0|1]` @@ -167,21 +172,27 @@ This overrides the specified machine readable format. (Default: 0) ## Examples -##### XML with polygon points +##### XML with kml polygon -* [https://nominatim.openstreetmap.org/search?q=135+pilkington+avenue,+birmingham&format=xml&polygon=1&addressdetails=1](https://nominatim.openstreetmap.org/search?q=135+pilkington+avenue,+birmingham&format=xml&polygon=1&addressdetails=1) -* [https://nominatim.openstreetmap.org/search/gb/birmingham/pilkington%20avenue/135?format=xml&polygon=1&addressdetails=1](https://nominatim.openstreetmap.org/search/gb/birmingham/pilkington%20avenue/135?format=xml&polygon=1&addressdetails=1) -* [https://nominatim.openstreetmap.org/search/135%20pilkington%20avenue,%20birmingham?format=xml&polygon=1&addressdetails=1](https://nominatim.openstreetmap.org/search/135%20pilkington%20avenue,%20birmingham?format=xml&polygon=1&addressdetails=1) +* [https://nominatim.openstreetmap.org/search?q=135+pilkington+avenue,+birmingham&format=xml&polygon_geojson=1&addressdetails=1](https://nominatim.openstreetmap.org/search?q=135+pilkington+avenue,+birmingham&format=xml&polygon_geojson=1&addressdetails=1) ```xml - + + + + + -1.816513,52.548756599999997 -1.816434,52.548747300000002 -1.816429,52.5487629 -1.8163717,52.548756099999999 -1.8163464,52.548834599999999 -1.8164599,52.548848100000001 -1.8164685,52.5488213 -1.8164913,52.548824000000003 -1.816513,52.548756599999997 + + + + 135 Pilkington Avenue Wylde Green @@ -237,7 +248,7 @@ This overrides the specified machine readable format. (Default: 0) ##### JSON with address details -[https://nominatim.openstreetmap.org/?format=json&addressdetails=1&q=bakery+in+berlin+wedding&format=json&limit=1](https://nominatim.openstreetmap.org/?format=json&addressdetails=1&q=bakery+in+berlin+wedding&format=json&limit=1) +[https://nominatim.openstreetmap.org/?addressdetails=1&q=bakery+in+berlin+wedding&format=json&limit=1](https://nominatim.openstreetmap.org/?addressdetails=1&q=bakery+in+berlin+wedding&format=json&limit=1) ```json {