Overpass API/Python Wrapper

From OpenStreetMap Wiki
Jump to navigation Jump to search
Overpass Python API
Author: Martijn van Exel
License: Apache (free of charge)
Platform: Python
Version: 0.7.0 (2019-12-11)
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)