Skip to content

API

Overview

The Protomaps Map API is a hosted, CDN-accelerated web service for interactive maps on the web. The Map API serves square Web Mercator tiles based on the MVT Vector Tiles specification : vector-tile-spec

Endpoints

The Protomaps hosted tile API is available at https://api.protomaps.com/.

  • Access requires an API key.
  • Requests made from a web browser are subject to Cross-Origin Resource Sharing (CORS) limitations. The list of allowed sites can be set per API key at the Dashboard.
  • Requests made from localhost with a valid API key are not subject to CORS restrictions; this is useful for local development. For domain names used in development and staging environments, set them to allowed on the Dashboard.

The URL for accessing map tiles is:

https://api.protomaps.com/tiles/v3.json?key=<KEY>
// or for raw tiles:
https://api.protomaps.com/tiles/v3/{z}/{x}/{y}.mvt?key=<KEY>

For V2 tiles, compatible with v1 styles:

https://api.protomaps.com/tiles/v2/{z}/{x}/{y}.pbf?key=<KEY>

Other assets such as JavaScript Libraries, map styles, and fonts, can be loaded from content delivery networks and do not need an API key.

For hosted versions of the styles through the API:

https://api.protomaps.com/styles/v2/light.json?key=<KEY>
https://api.protomaps.com/styles/v2/dark.json?key=<KEY>
https://api.protomaps.com/styles/v2/white.json?key=<KEY>
https://api.protomaps.com/styles/v2/grayscale.json?key=<KEY>
https://api.protomaps.com/styles/v2/black.json?key=<KEY>

MapLibre GL glyphs can be loaded at this URL:

glyphs: "https://protomaps.github.io/basemaps-assets/fonts/{fontstack}/{range}.pbf"

Other

Minutely Extracts is an on-demand downloader for raw OpenStreetMap data, built from minute-level planet snapshots.

Downloads are provided in PBF format, which is interoperable with most tooling, such as:

Try Geofabrik Downloads if you need less frequently updated data clipped to administrative boundaries.

Programmatic API

See the SliceOSM project on GitHub.