MapQuest Nominatim Search API Web Service

 

Nominatim (from the Latin, 'by name') is a tool to search OpenStreetMap (OSM) data by name and address and to generate synthetic addresses of OSM points (reverse geocoding). Located at http://open.mapquestapi.com/nominatim/v1/search, Nominatim is also used as one of the sources for the search box on the OSM homepage and currently powers the search for all the MapQuest Open Beta domains (http://open.mapquest.*).

 

Web Service Resources

Nominatim Search API Developer's Guide

Instructions, code samples, and demos all combined in easy-to-follow, easy-to-use documentation.

Open Forums

Discuss and collaborate with other Nominatim Search API Web Service developers.

 

See also: Nominatim Broken Polygon Tool

 

Features

Search

Nominatim indexes named (or numbered) features with the OSM data set and a subset of other unnamed features (pubs, hotels, churches, etc).

 

Search terms are processed left to right so

pilkington avenue, birmingham

 

will work, and

birmingham, pilkington avenue

 

will fail. Commas are optional but improve performance by reducing the complexity of the search so

pilkington avenue birmingham

 

will succeed. If house numbers have been defined for an area, they will be used:

135 pilkington avenue, birmingham

 

Local Search

Enclosing the query string in [ ] allows Nominatim to do a facility search. For example, q=[pub] returns results where type=pub in OpenStreetMap.  Setting bounded=1 will restrict the search to just the bounding box or route:

 

http://open.mapquestapi.com/nominatim/v1/search?q=windsor+[castle]&viewbox=-1.99,52.02,0.78,50.94

 

Search along a Route

When searching along a route (hint: combine Nominatim with the Open Directions API Web Service), the option to set the route width and have it search within the specified distance is available. Acceptable values are between 0 and 1 (buffer radius in degrees).

 

Additional samples and documentation can be found by visiting the Nominatim Search API Developer's Guide.

 

Reverse Geocoding / Address lookup

Nominatim also provides reverse geocoding and address lookups. Reverse geocoding generates an address from a latitude and longitude. Use the optional zoom parameter to specify the level of detail required.

 

Source Code

Nominatim is based around the PostgreSQL import utility osm2pgsql using the alternative gazetteer output option. The source for osm2pgsql can be obtained at http://svn.openstreetmap.org/applications/utils/export/osm2pgsql. Indexing and search are performed using a combination of C, PL/pgSQL and PHP. The source for this can be found here at http://svn.openstreetmap.org/applications/utils/export/osm2pgsql/gazetteer/.

 

Full installation instructions can be found at Nominatim/Installation on the OSM Wiki page.

 

Terms of Use

The MapQuest Nominatim Search API Web Service is available for use for free under the following conditions:

 

  • OpenStreetMap must be given credit for the data – see this section of OSM's legal FAQ for details.

  • Please place “Nominatim Search Courtesy of MapQuest ” on your page, or in the copyright area of the map and link the word “MapQuest” to http://www.mapquest.com. Below is a code snippet you can use for your site:

 

<p>Nominatim Search Courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="http://developer.mapquest.com/content/osm/mq_logo.png"></p>

 

  • If your application will get heavy usage, please let us know by sending us an email at open@mapquest.com. Please include the estimate of your expected usage so that we will be aware and accommodate the extra traffic.

  • If there will be an announcement (for example – a press release or a corporate announcement), please contact MapQuest at open@mapquest.com to let us know of the good news and any expected jumps in the Nominatim Search API Web Service usage.

  • Usage of the Nominatim Search API Web Service is at your own risk.

  • Usage of the Nominatim Search API Web Service is governed by paragraph 9, section (a) of the MapQuest Developer Network Terms of Use.
  •  

OpenStreetMap data is licensed under the Open Data Commons Open Database License (ODbL).