xyzservices
Source of XYZ tiles providers
What it is and what it does
xyzservices is a lightweight repository of XYZ tile service specifications—URLs, attribution strings, and metadata for raster basemap tile providers. It exposes this data through a Python API (a dict-like Bunch object) and as a compressed JSON file, making it easy to discover and configure tile sources for mapping applications.
The package is designed for developers building interactive or static maps who need to reference standard tile providers like CartoDB, OpenStreetMap, or MapBox. It handles the bookkeeping of provider URLs, required attribution, and token requirements, so you don't have to maintain your own list. Since it has no external runtime dependencies, it installs cleanly and integrates into any Python mapping workflow.
Use it for:
- Populate a map application with a curated list of basemap tile options without hardcoding provider URLs.
- Look up correct attribution strings and usage terms for tile services in your mapping code.
- Configure token-based tile providers (e.g., MapBox) by setting credentials on provider objects.
- Export the embedded providers.json file for use in non-Python mapping tools or web applications.
- Build a tile provider selector UI by iterating over the available providers in a Jupyter notebook.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a Python API and JSON database of XYZ tile service providers for use as raster basemap tiles in maps, with no external runtime dependencies.
Yes. xyzservices is a lightweight, zero-dependency utility that solves a real problem—centralizing tile provider metadata—for anyone building maps in Python. It's actively maintained, permissively licensed, and popular in the geospatial community. Install it if you're using tile-based maps and want a reliable reference for provider URLs and attribution.
Install
xyzservices on PyPI
pip
pip install xyzservicesuv
uv add xyzservicespoetry
poetry add xyzservicesInstalling xyzservices
Before you install
Straightforward install with no runtime dependencies beyond Python itself. The package is actively maintained with a recent release (137 days ago) and lives in the geopandas organization on GitHub.
License in practice
BSD-3-Clause license is permissive; you can use this in commercial and proprietary projects. Note that provider data sourced from leaflet-providers is separately licensed under BSD-2-Clause.
Quickstart
pip install xyzservices
import xyzservices.providers as xyz
url = xyz.CartoDB.Positron.url
attribution = xyz.CartoDB.Positron.attribution
Requires Python 3.8 or later.
Verify before relying
- Whether the embedded providers.json file is updated regularly and how users stay current with new tile services.
- Performance characteristics when working with the full provider inventory in memory.
- Whether token-based providers (like MapBox) require additional setup beyond setting the accessToken attribute.
Package facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 137 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 10,172,772/month — #1,475 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: xyzservices-2026.3.0-py3-none-any.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
contextilyContextily retrieves tile-based map imagery…
permissive · top 15,000 on PyPI
pmtilesRead and write PMTiles archives, a single-file…
permissive · top 15,000 on PyPI
mercantileMercantile converts between geographic…
permissive · top 5,000 on PyPI
pyGeoTileConverts between geographic coordinate systems…
permissive · top 15,000 on PyPI
rio-tilerrio-tiler reads raster data from local and…
permissive · top 15,000 on PyPI
titiler-applicationProvides a ready-to-run FastAPI application for…
permissive · top 15,000 on PyPI
leafmapLeafmap enables interactive geospatial mapping…
permissive · top 15,000 on PyPI
titiler-coreProvides FastAPI-based building blocks to…
permissive · top 15,000 on PyPI
mapboxA Python client library for Mapbox web…
permissive · top 15,000 on PyPI
titiler-mosaicAdds MosaicJSON support to TiTiler, enabling…
permissive · top 15,000 on PyPI