overpy
Python Wrapper to access the OpenStreepMap Overpass API
What it is and what it does
Overpy is a Python client for the Overpass API, a read-only interface to OpenStreetMap data. It handles the HTTP communication with Overpass servers and parses responses into Python objects representing ways, nodes, and relations from the map. The package abstracts away the details of Overpass query syntax and response parsing, letting you focus on extracting geographic features by their tags and coordinates.
Typical workflows involve constructing an Overpass query (a specialized language for filtering OSM data), submitting it through the api.query() method, and then iterating over the returned ways, nodes, and relations to extract tags and geometry. The package also provides helper functions for common tasks like finding streets or intersections by name within a geographic boundary.
Use it for:
- Extract road networks, buildings, or amenities from OpenStreetMap for a specific region
- Build location-based applications that need current OSM data without maintaining a local database
- Analyze geographic features (e.g., all restaurants or parks) within a bounding box
- Geocode addresses or find intersections by querying OSM directly
- Research or validate OpenStreetMap data coverage in a given area
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python wrapper for querying the Overpass API to retrieve and parse OpenStreetMap data in JSON and XML formats.
Yes. Overpy is actively maintained, has no external dependencies, supports current Python versions, carries a permissive MIT license, and fills a clear niche for developers who need to query OpenStreetMap data programmatically. Install it if you're building location-aware applications or need to extract geographic features from OSM.
Install
overpy on PyPI
pip
pip install overpyuv
uv add overpypoetry
poetry add overpyInstalling overpy
Before you install
Low install friction with no runtime dependencies. Actively maintained as of July 2026 with consistent release history since 2014. Supports modern Python versions (3.6+) and PyPy.
License in practice
MIT license permits commercial and private use with minimal restrictions; you must include the license notice in distributions.
Quickstart
pip install overpy
import overpy
api = overpy.Overpass()
result = api.query('way(50.746,7.154,50.748,7.157) ["highway"]; (._;>;); out body;')
for way in result.ways:
print(way.tags.get('name', 'n/a'))
Verify before relying
- Whether Overpass API rate limits or authentication requirements affect typical usage patterns
- Performance characteristics when querying large geographic areas or complex filters
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 984 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 103,365/month — #12,809 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: overpy-0.7-py3-none-any.whl
Keywords: OverPy, Overpass, OSM, OpenStreetMap
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
osm2geojsonConverts OpenStreetMap and Overpass API data…
permissive · top 15,000 on PyPI
osmiumosmium provides Python bindings for the…
permissive · top 15,000 on PyPI
osmnxOSMnx downloads, models, and analyzes street…
permissive · top 15,000 on PyPI
python-geohashpython-geohash encodes and decodes geographic…
unclear · top 15,000 on PyPI
meteomaticsConnects Python applications to the Meteomatics…
permissive · top 15,000 on PyPI
cityseerComputes network centrality, land-use…
agpl · top 15,000 on PyPI
polylineEncodes and decodes geographic coordinate…
unclear · top 5,000 on PyPI
staticmapGenerates static map images with geographic…
unclear · top 15,000 on PyPI
pykmlpyKML parses and creates KML documents using a…
permissive · top 15,000 on PyPI
contextilyContextily retrieves tile-based map imagery…
permissive · top 15,000 on PyPI