API reference

Every endpoint, with examples.

The native /v1 surface — every path is also reachable under its Mapbox / MapTiler-compatible alias. Base URL https://api.mapwright.io; authenticate with ?key=YOUR_KEY (or an Authorization header). Keys, scopes and quotas are managed from your console.

Native API (/v1)

The canonical, versioned surface. Every endpoint below is also reachable under its Mapbox/MapTiler-compatible alias (shown on each card and detailed in the sections that follow) — swap the prefix for /v1 to use the native form. Same keys, scopes, caching.

GET /v1/tiles/{id}/{z}/{x}/{y}.{mvt|png|webp} key :tiles

Vector or raster tile from a tileset.

drop-in /tiles/{id}/{z}/{x}/{y}.{ext}

curl "https://api.mapwright.io/v1/tiles/streets/14/4957/6059.mvt?key={KEY}"
GET /v1/tiles/{id}/query/{lng},{lat}.json key :tiles

Tilequery — features near a point from a vector tileset (radius, limit, layers, geometry, dedupe).

drop-in /v4/{id}/tilequery/{lng},{lat}.json

curl "https://api.mapwright.io/v1/tiles/streets/query/-71.065,42.36.json?radius=50&key={KEY}"
GET /v1/styles/{id}.json key :styles

MapLibre GL style document.

drop-in /styles/{id}/style.json

curl "https://api.mapwright.io/v1/styles/dark.json?key={KEY}"
GET /v1/static/{id}/{lon},{lat},{zoom}/{w}x{h}.{png|jpg|webp} key :styles

Server-rendered static map image (bbox/auto + markers/path/geojson too).

drop-in /maps/{id}/static/…

curl "https://api.mapwright.io/v1/static/streets/-71.06,42.36,13/600x400.png?key={KEY}"
GET /v1/geocode/{query}.json key :tiles

Forward or reverse ({lng},{lat}) geocoding; batch with “;”.

drop-in /geocoding/{query}.json

curl "https://api.mapwright.io/v1/geocode/-71.06,42.36.json?key={KEY}"
GET /v1/route/{profile}/{coords}.json key :routing

Directions; also /v1/route/matrix/… and /v1/route/isochrone/…. profile = driving | walking | cycling.

drop-in /directions/v5/{profile}/{coords}

curl "https://api.mapwright.io/v1/route/driving/-122.42,37.78;-122.40,37.79.json?steps=true&key={KEY}"
GET /v1/elevation/{lng},{lat}.json key :tiles

Elevation in metres at a point.

drop-in /elevation/{lng},{lat}.json

curl "https://api.mapwright.io/v1/elevation/-104.99,39.74.json?key={KEY}"

Tiles

Vector and raster tiles. Require a key with the "tiles" scope.

GET /tiles/{id}/{z}/{x}/{y}.mvt key :tiles

Vector tile (MVT) from a tileset; .pbf accepted as an alias.

  • id Tileset id
  • z / x / y Tile coordinates
curl "https://api.mapwright.io/tiles/streets/14/4957/6059.mvt?key={KEY}"
GET /tiles/{id}/{z}/{x}/{y}.{png,jpg,webp} key :tiles

Raster tile from a raster tileset (e.g. ingested GeoTIFF imagery).

curl "https://api.mapwright.io/tiles/imagery/13/2479/3029.png?key={KEY}"
GET /tiles/{id}.json key :tiles

TileJSON 3.0 (vector or raster, by the archive type).

curl "https://api.mapwright.io/tiles/streets.json?key={KEY}"
GET /v4/{id}/tilequery/{lng},{lat}.json key :tiles

Tilequery: features near a point from a vector tileset (Mapbox-compatible). Params: radius (m), limit, layers, geometry, dedupe.

  • id Vector tileset id
  • lng,lat Query point
  • radius Search radius in metres (default 0)
  • limit Max features (default 5, max 50)
curl "https://api.mapwright.io/v4/streets/tilequery/-71.065,42.36.json?radius=50&limit=5&key={KEY}"
GET /images/{id}/{z}/{x}/{y} key :tiles

Images API alias for a raster tileset (+ /images/{id}/image.json). standard, extension inferred.

curl "https://api.mapwright.io/images/imagery/13/2479/3029?key={KEY}"
GET /tiles/satellite/{z}/{x}/{y}.jpg key :tiles

Aerial imagery tile (proxied Esri World Imagery).

curl "https://api.mapwright.io/tiles/satellite/8/75/96.jpg?key={KEY}"
GET /tiles/terrain/{z}/{x}/{y}.png key :tiles

Terrarium-encoded DEM tile for hillshade.

curl "https://api.mapwright.io/tiles/terrain/8/75/96.png?key={KEY}"

Styles

MapLibre GL style documents. Require the "styles" scope.

GET /styles/{id}/style.json key :styles

MapLibre style with absolute, keyed URLs resolved.

curl "https://api.mapwright.io/styles/dark/style.json?key={KEY}"
GET /maps/{id}/style.json key :styles

drop-in compatible alias of /styles/{id}/style.json.

curl "https://api.mapwright.io/maps/streets/style.json?key={KEY}"

Fonts & sprites

Glyphs and sprite sheets. Require the "fonts" scope.

GET /fonts/{fontstack}/{range}.pbf key :fonts

Glyph range PBF for a font stack.

curl "https://api.mapwright.io/fonts/Noto%20Sans%20Regular/0-255.pbf?key={KEY}"
GET /sprites/v4/{flavor}{@2x}.{json,png} key :fonts

Sprite sheet metadata (.json) and image (.png).

curl "https://api.mapwright.io/sprites/v4/dark.json?key={KEY}"

Geocoding

Forward + reverse geocoding in a drop-in compatible (Carmen) shape.

GET /geocoding/{lng},{lat}.json key :tiles

Reverse geocode a coordinate (Nominatim-backed).

curl "https://api.mapwright.io/geocoding/-71.06,42.36.json?key={KEY}"
GET /geocoding/poi/{lng},{lat}.json key :tiles

POI details near a coordinate — name, kind, address, and extratags (opening_hours, website, phone) where available.

curl "https://api.mapwright.io/geocoding/poi/-71.06,42.36.json?key={KEY}"
GET /geocoding/{query}.json key :tiles

Forward search / autocomplete (text query); types= filters result categories.

  • limit Max results, 1–10 (default 5)
  • proximity {lng},{lat} to bias results
  • bbox {w},{s},{e},{n} to restrict results
  • country ISO country code(s) to restrict
  • language Preferred result language
curl "https://api.mapwright.io/geocoding/Boston%20City%20Hall.json?limit=3&key={KEY}"
GET /geocoding/{q1};{q2};….json key :tiles

Batch forward geocoding (up to 50; URL-encode the “;”). Returns an array of FeatureCollections.

curl "https://api.mapwright.io/geocoding/Boston%3BCambridge.json?key={KEY}"
GET /geocoding/{id}.json key :tiles

Look up a feature by its id (kind.id) from a prior result.

curl "https://api.mapwright.io/geocoding/amenity.12345.json?key={KEY}"

Routing

Directions, distance matrix, and isochrones in a drop-in compatible (Mapbox v5) shape. Proxies a configurable Valhalla engine; require the "routing" scope. 503 until valhalla_url is set.

GET /directions/v5/{profile}/{coordinates} key :routing

Turn-by-turn route. profile = driving | walking | cycling. coordinates = lng,lat;lng,lat;… (max 25).

  • geometries polyline (default) · polyline6 · geojson
  • steps true to include per-maneuver steps
  • alternatives true to request alternate routes
  • language Instruction language
curl "https://api.mapwright.io/directions/v5/driving/-122.42,37.78;-122.40,37.79?geometries=geojson&key={KEY}"
GET /directions-matrix/v1/{profile}/{coordinates} key :routing

N×M duration (and distance) matrix between waypoints. coordinates = lng,lat;… (max 25).

  • sources all (default) or ;-separated coord indices
  • destinations all (default) or ;-separated coord indices
  • annotations duration (default), distance, or both
curl "https://api.mapwright.io/directions-matrix/v1/driving/-122.42,37.78;-122.40,37.79;-122.41,37.80?annotations=duration,distance&key={KEY}"
GET /matching/v5/{profile}/{coordinates} key :routing

Map matching — snap a GPS trace to the road network (Mapbox shape). coordinates = lng,lat;… (max 100). Native: /v1/route/match/{profile}/{coords}.json.

  • geometries polyline (default) · polyline6 · geojson
  • steps true to include per-maneuver steps
curl "https://api.mapwright.io/matching/v5/driving/-122.42,37.78;-122.41,37.785;-122.40,37.79?geometries=geojson&key={KEY}"
GET /optimized-trips/v1/{profile}/{coordinates} key :routing

Optimization / TSP — order intermediate stops for the shortest trip (Mapbox shape). coordinates = lng,lat;… (max 12). Native: /v1/route/optimize/{profile}/{coords}.json.

  • geometries polyline (default) · polyline6 · geojson
curl "https://api.mapwright.io/optimized-trips/v1/driving/-122.42,37.78;-122.41,37.785;-122.40,37.79?key={KEY}"
GET /isochrone/v1/{profile}/{coordinates} key :routing

Reachability polygons from a point. coordinates = lng,lat.

  • contours_minutes Comma-separated time budgets, e.g. 10,20
  • contours_meters Comma-separated distance budgets (alt. to minutes)
  • contours_colors Comma-separated hex colors per contour
  • polygons true (default) for polygons, false for lines
curl "https://api.mapwright.io/isochrone/v1/walking/-122.42,37.78?contours_minutes=10,20&key={KEY}"

Static maps

Server-rendered map images from a style. Require the "styles" scope. Needs the rendering engine (single image).

GET /maps/{id}/static/{position}/{w}x{h}{@2x}.{png,jpg,webp} key :styles

Render a static image. Also at /styles/{id}/static/…. @2x doubles the pixel size. markers / path / geojson overlays supported.

  • position Point {lon},{lat},{zoom} · bbox {w},{s},{e},{n} · or auto (fit overlay)
  • markers lon,lat[,color] — repeatable or ;-separated
  • path lon,lat|lon,lat|… polyline (repeatable)
  • path-color / path-width Polyline stroke colour and width
  • padding Edge padding (px) for bbox / auto framing
curl "https://api.mapwright.io/maps/streets/static/-71.06,42.36,13/600x400.png?key={KEY}"

Raster tiles

Server-rendered 512px raster tiles from a style — drop-in for Leaflet / OpenLayers. Require the "styles" scope.

GET /styles/{id}/{z}/{x}/{y}{@2x}.{png,jpg} key :styles

512px rendered tile (1024px at @2x). Also /maps/{id}/… and /{id}/256/… for 256px tiles.

curl "https://api.mapwright.io/styles/streets/13/2479/3029.png?key={KEY}"
GET /styles/{id}/tiles.json key :styles

Raster TileJSON (tileSize 512) for the rendered tiles.

curl "https://api.mapwright.io/styles/streets/tiles.json?key={KEY}"

WMTS

OGC WMTS 1.0.0 — GoogleMapsCompatible (EPSG:3857, 256px). Paste the capabilities URL into QGIS / ArcGIS / OpenLayers. Require the "tiles" scope.

GET /wmts/{id}/1.0.0/WMTSCapabilities.xml key :tiles

RESTful capabilities document for a style.

curl "https://api.mapwright.io/wmts/streets/1.0.0/WMTSCapabilities.xml?key={KEY}"
GET /wmts/{id}/1.0.0/{TileMatrix}/{TileRow}/{TileCol}.{png,jpg} key :tiles

RESTful tile (TileMatrix = z, TileRow = y, TileCol = x).

curl "https://api.mapwright.io/wmts/streets/1.0.0/13/3029/2479.png?key={KEY}"
GET /wmts key :tiles

KVP endpoint: REQUEST=GetTile or GetCapabilities (LAYER, TILEMATRIX, TILEROW, TILECOL, FORMAT).

curl "https://api.mapwright.io/wmts?REQUEST=GetTile&LAYER=streets&TILEMATRIX=13&TILEROW=3029&TILECOL=2479&FORMAT=image/png&key={KEY}"

WMS

OGC WMS 1.3.0 — free-form BBOX rendering (EPSG:3857, EPSG:4326, CRS:84). Paste the GetCapabilities URL into QGIS / ArcGIS. Require the "tiles" scope.

GET /wms?REQUEST=GetCapabilities key :tiles

Capabilities document listing every style as a layer.

curl "https://api.mapwright.io/wms?SERVICE=WMS&REQUEST=GetCapabilities&key={KEY}"
GET /wms?REQUEST=GetMap key :tiles

Render an arbitrary bounding box to an image.

  • LAYERS Style id
  • CRS / SRS EPSG:3857 · EPSG:4326 (1.3.0 lat,lon) · CRS:84
  • BBOX minx,miny,maxx,maxy in the CRS axis order
  • WIDTH / HEIGHT Image size in pixels
  • FORMAT image/png or image/jpeg
curl "https://api.mapwright.io/wms?VERSION=1.3.0&REQUEST=GetMap&LAYERS=streets&CRS=EPSG:3857&BBOX=-7912589,5213553,-7909250,5216566&WIDTH=500&HEIGHT=400&FORMAT=image/png&key={KEY}"

GIS utilities

Elevation, coordinate transforms, and an OGC API Tiles wrapper. Require the "tiles" scope.

GET /elevation/{lng},{lat}.json key :tiles

Elevation in metres at a point (decoded from the Terrarium DEM).

curl "https://api.mapwright.io/elevation/-104.99,39.74.json?key={KEY}"
GET /coordinates/transform key :tiles

Transform coordinates between CRSes (EPSG:4326, EPSG:3857). Also at /coordinates/transform/{coords}.json?s_srs&t_srs (standard tile-API shape).

  • from / to CRS, e.g. EPSG:4326 or 3857
  • coords x,y or ;-separated x,y;x,y
curl "https://api.mapwright.io/coordinates/transform?from=4326&to=3857&coords=-71.06,42.36&key={KEY}"
GET /coordinates/search/{query}.json key :tiles

Search common coordinate reference systems by name or EPSG code.

curl "https://api.mapwright.io/coordinates/search/mercator.json?key={KEY}"
GET /geolocation/ip.json key :tiles

IP → location (country, city, lat/lng, timezone). Needs a GeoIP DB (GEOIP_DB); 503 if unset.

curl "https://api.mapwright.io/geolocation/ip.json?key={KEY}"
GET /data/{id}/features.json key :tiles

Hosted GeoJSON dataset (RFC 7946). Upload via POST /admin/data (admin).

curl "https://api.mapwright.io/data/pois/features.json?key={KEY}"
GET /data/{id}/{z}/{x}/{y}.pbf key :tiles

The dataset served as MVT vector tiles (+ /data/{id}/tiles.json).

curl "https://api.mapwright.io/data/pois/14/4957/6059.pbf?key={KEY}"
GET /collections key :tiles

OGC API Tiles — list collections (one per tileset).

curl "https://api.mapwright.io/collections?key={KEY}"
GET /collections/{id}/tiles/WebMercatorQuad/{z}/{y}/{x} key :tiles

OGC API Tiles — a tile (TileMatrix/TileRow/TileCol = z/y/x).

curl "https://api.mapwright.io/collections/streets/tiles/WebMercatorQuad/14/6059/4957?key={KEY}"

Tilesets API

Manage tilesets. Admin session or a key with the "admin" scope.

GET /admin/tilesets admin

List tilesets.

POST /admin/tilesets admin

Upload .pmtiles (→ 201) or .mbtiles (→ 201 inline, or 202 + a background convert job when large). A GeoTIFF .tif → 202 + a background ingest job that retiles it to raster. Multipart: file, id, name.

POST /admin/tilesets/postgis admin

Register a live PostGIS vector source ({ id, name, config:{ url, table, geomColumn, srid, layer, attributes[] } }) — tiles come from ST_AsMVT.

POST /admin/tilesets/virtual admin

Register a virtual tileset ({ id, name, sources:[…] }) — combines the MVT layers of several vector tilesets per tile.

GET /admin/tilesets/{id}/download admin

Download the original .pmtiles archive.

DELETE /admin/tilesets/{id} admin

Delete a tileset and its file.

GET /admin/data admin

List hosted GeoJSON datasets.

POST /admin/data admin

Create a dataset ({ id?, name, data: GeoJSON FeatureCollection }).

DELETE /admin/data/{id} admin

Delete a dataset.

Styles API

Create and edit styles. Admin only.

GET /admin/styles admin

List styles (metadata only).

GET /admin/styles/{id} admin

Get a style including its document.

POST /admin/styles admin

Create a style ({ id?, name, style, tilesetId? }).

PUT /admin/styles/{id} admin

Replace a style.

DELETE /admin/styles/{id} admin

Delete a style.

Keys API

Manage API keys, scopes, and origin allowlists. Admin only.

GET /admin/keys admin

List keys with trailing-24h usage.

POST /admin/keys admin

Create a key ({ name, scopes[], origins[] }).

DELETE /admin/keys/{id} admin

Revoke a key.

Jobs API

Region-fetch jobs from Protomaps daily builds. Admin only.

GET /admin/jobs admin

List recent jobs.

GET /admin/jobs/{id} admin

Get a job with its full log.

POST /admin/jobs admin

Queue a fetch ({ type, tilesetId, name, bbox?, maxzoom? }).

Server

Settings, cache, logs, health, and metrics.

GET /admin/settings admin

Read server settings.

PUT /admin/settings admin

Update settings (public URL, CORS, cache TTL, …).

POST /admin/cache/purge admin

Clear the in-memory tile cache.

GET /admin/logs admin

Recent request log (filter=all|errors|misses, limit≤500).

GET /health public

Liveness + database status + version. No auth.

curl "https://api.mapwright.io/health"
GET /metrics public

Prometheus metrics (no auth) — per-route latency + request counts, plus mapwright_disk_bytes (data/Valhalla volumes), mapwright_responses_total{class} (2xx/4xx/5xx), mapwright_jobs{status}, and tile-cache hit/miss gauges. Scope to your monitoring host at the proxy.

curl "https://api.mapwright.io/metrics"