Overpass API/Python Wrapper

From OpenStreetMap Wiki
Jump to: navigation, search
Overpass Python API
Screenshot of Overpass Python API
Author: Martijn van Exel
License: Apache (free of charge)
Platform: Python
Version: 0.6.0 (2018-04-06)
Language: English
Source code: https://github.com/mvexel/overpass-api-python-wrapper
Programming language: Python

Python 2/3 API for Overpass

A simple but powerful Python interface to the Overpass API

>>> import overpass
>>> api = overpass.API()
>>> response = api.get('node["name"="Salt Lake City"]')
>>> print [(
...     feature['properties']['name'],
...     feature['id']) for feature in response["features"]]
[(u'Salt Lake City', 150935219), (u'Salt Lake City', 585370637)]

You can find more examples and documentation on Github (see box)