API Documentation

Integrate OS Open Zoomstack vector tiles into your UK web and mobile applications with our simple API.

Authentication

Include your API key in all requests using one of these methods:

Query parameter:

https://zoomstacker.com/api/v1/tiles/5/16/10.pbf?api_key=YOUR_API_KEY

Request header:

X-API-Key: YOUR_API_KEY

Endpoints

  • /api/v1/tiles/{z}/{x}/{y}.pbf – Vector tiles (z, x, y are zoom, column, row)
  • /api/v1/tilejson – TileJSON metadata for the default style
  • /api/v1/tilejson/:style – TileJSON for a specific style

Map Styles

These styles are available as static files (no API key required for the style URL itself; tiles still require your key):

  • /styles/OS_Open_Zoomstack/light.json – Light style with muted colours
  • /styles/OS_Open_Zoomstack/night.json – Dark style for night mode
  • /styles/OS_Open_Zoomstack/road.json – Road-focused style
  • /styles/OS_Open_Zoomstack/outdoor.json – Outdoor/hiking style
  • /styles/OS_Open_Zoomstack/basic.json – Simplified basic style

Example: MapLibre GL JS

const map = new maplibregl.Map({
  container: 'map',
  style: 'https://zoomstacker.com/styles/OS_Open_Zoomstack/light.json',
  center: [-2.5, 54],
  zoom: 6
});

map.addControl(new maplibregl.NavigationControl());

Example: Vector Tiles API

fetch('https://zoomstacker.com/api/v1/tiles/5/16/10.pbf?api_key=YOUR_API_KEY')
  .then(response => response.arrayBuffer())
  .then(data => {
    // Process the vector tile data
  });

Domain Restrictions

For production use, restrict your API key to specific domains in your dashboard. Requests from unauthorised domains will be rejected.