Xapi Service Developer's Guide
Xapi (pronounced zappy) is a read-only OpenStreetMap (OSM) Extended API that provides enhanced search and querying capabilities for nodes, ways and relations. The query can be defined by OSM tags and/or a bounding box and will return all current data that match the entered search terms. Comments, feedback, and support questions can be posted in our Open Forums.
Below is a simple example of a Xapi request to help further understand the service. An XML document containing the nodes that match the
[key=value] pair within the bounding box will be returned.
Choose the OSM element type and enter the
[key=value] pair you wish to search. A comprehensive list of map features and
[key=value] pairs can be found on the Map Features - OpenStreetMap Wiki page.
Search by Area
If you already know the search area, enter the coordinates below. Otherwise feel free to use the map to zoom to your location. The coordinates will update dynamically.
The following table describes the selection predicates that may be included to make a Xapi request.
|tag||Features with the specified OSM tags will be returned, many of which can be found here. Format must be in the form [key=value].
|bbox||Bounding box used to limit the extent of the result document. Usage of
Must be in the following order:
Union operators can also be used to select both multiple keys and multiple values. For example,
node[amenity=pub|restaurant] will select all pubs and restaurants. Additional information can be found on the Xapi - OpenStreetMap Wiki page.
|Sample XML Response|
<node id="486343837" version="3" timestamp="2010-05-20T06:32:50Z" uid="12055" user="aude" changeset="4754157" lat="38.8975639" lon="-77.0202807"> <tag k="name" v="The Green Turtle Sports Bar & Grill"/> <tag k="amenity" v="pub"/> <tag k="addr:street" v="F Street NW"/> <tag k="addr:housenumber" v="601"/> </node> ...
OpenStreetMap data is licensed under the Open Data Commons Open Database License (ODbL).