XYZ Services Tiles Providers

2026.3.0 · active · verified Thu Apr 09

xyzservices provides a comprehensive collection of XYZ tile providers for mapping applications, offering easy access to various base maps and overlays. It helps users integrate tile services into geospatial libraries like Folium, Leaflet, and Contextily. The current version is 2026.3.0, and it maintains a rapid release cadence, typically monthly or bi-monthly, to reflect changes in upstream tile providers.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to import the providers, access a specific tile provider (CartoDB Positron), and retrieve its basic properties like URL and attribution. Some providers may require an API key, which can be formatted into the URL template.

import xyzservices.providers as xyz

# Access a common, free-to-use provider
provider = xyz.CartoDB.Positron

print(f"Provider Name: {provider.name}")
print(f"URL Template: {provider.url}")
print(f"Attribution: {provider.attribution}")
print(f"Minimum Zoom: {provider.min_zoom}, Maximum Zoom: {provider.max_zoom}")

# Example of a provider that often requires an API key
# API_KEY = os.environ.get('MAPTILER_API_KEY', '')
# if API_KEY:
#     maptiler_provider = xyz.MapTiler.Basic.format(apiKey=API_KEY)
#     print(f"\nMapTiler Basic URL (with key): {maptiler_provider.url}")
# else:
#     print("\nNote: MAPTILER_API_KEY environment variable not set. MapTiler providers often require an API key.")

view raw JSON →