Skip to content
Documentation menu
docs / api / get-tiles-territory-style-json
Tiles, styles and map assets

GET/tiles/{territory}/style.json

Access and price

AuthAn API key, as Authorization: Bearer snk_… or ?api_key=snk_…. Metered. A browser (maps) key may call it.
PriceDiscounted: 1 call per 50 tile, TileJSON or style requests per key on the hosted gateway (SN_TILE_METER_DIVISOR); at the quota ceiling every request bills in full. Class: standard. Published as unit_rules.tiles in /pricing.json.

What it does

A MapLibre style for the archive. A basemap territory gets the MapMap style territory packages bake (footpaths, tracks and pedestrian streets as a thin dashed line, kept out of the road layers); a custom archive built with mapmap-tile gets a minimal style that draws its points, lines and polygons, with the archive's own attribution.

Call it

bash
curl -fsS -X GET "https://api.mapmap.ai/tiles/{territory}/style.json" \
  -H "Authorization: Bearer $MAPMAP_KEY"

Parameters

NameInTypeRequiredDescription
territorypathstringyesTerritory id, e.g. uk

Responses

200MapLibre GL style JSON
FieldTypeRequiredDescription
glyphsstringnoGlyph URL template.
layersobject[]noLayers in draw order.
metadataobjectnoStyle metadata, e.g. mapmap:customer_sources_skipped on render=static.
namestringnoStyle name.
sourcesobjectnoData sources by id; the basemap is territory.
spritestringnoSprite sheet URL.
versionintegernoStyle spec version, always 8.

Example: Recorded from the hosted gateway on 2026-11-05 with a test key: GET /tiles/planet/style.json; lists trimmed to their first items

json
{
  "glyphs": "https://fonts.mapmap.ai/{fontstack}/{range}.pbf",
  "layers": [
    {
      "id": "background",
      "paint": {
        "background-color": [
          "interpolate",
          [
            "linear"
          ],
          [
            "zoom"
          ],
          4,
          "#e3e8dd",
          7,
          "#f4f2ee"
        ]
      },
      "type": "background"
    },
    {
      "filter": [
        "!in",
        "class",
        "wood",
        "forest",
        "grass",
        "wetland",
        "farmland",
        "sand",
        "rock",
        "ice"
      ],
      "id": "landcover",
      "paint": {
        "fill-color": "#e3e8dd",
        "fill-opacity": 0.6
      },
      "source": "territory",
      "source-layer": "landcover",
      "type": "fill"
    }
  ],
  "name": "MapMap planet light",
  "sources": {
    "territory": {
      "attribution": "© OpenStreetMap contributors © OpenMapTiles",
      "type": "vector",
      "url": "https://api.mapmap.ai/tiles/planet/tiles.json"
    }
  },
  "sprite": "https://api.mapmap.ai/sprite/sprite",
  "version": 8
}
401No key, or a missing, malformed, unknown, revoked or expired one (unauthorized); the body carries signup, docs and a one-call hint for a free key

application/problem+json · Problem

402Beyond the included volume with no way to pay this call: an x402 body naming how to pay (provisional key past its allowance, prepaid balance below the price, or a rejected X-PAYMENT). Not problem+json

application/json · X402PaymentRequired

403The key may not call this: a browser key outside its scope (scope-insufficient), a request from an origin the key does not allow (origin-not-allowed), or an account restriction (forbidden)

application/problem+json · Problem

404Tiles not configured or unknown territory

application/problem+json · Problem

429Per-key rate limit (rate-limited, with Retry-After), or monthly quota exhausted with no payment path (quota-exceeded)

application/problem+json · Problem

504The request did not finish within the gateway's request deadline (request-timeout)

application/problem+json · Problem

Error bodies follow the shared problem model documented on API conventions.

Also under Tiles, styles and map assets

Generated from https://api.mapmap.ai/openapi.json on 2026-11-12 · operationId get_style