Skip to content
Documentation menu
docs / api / get-styles-spec
styles

GET/styles/{spec}

Public. No key, and no quota deducted.

What it does

spec is <id>@<version>.json for an immutable version (cached forever) or <id>.json for the latest (60 s TTL).

With ?api_key=snk_…, the house basemap source is served as this gateway's keyed TileJSON instead of the keyless tiles CDN, which refuses browser pages outside mapmap.ai and localhost. The key is stamped the same way the /tiles documents stamp it, so a website that loads a hosted style with its key renders the basemap. Without a key in the query the body is exactly as before.

Call it

bash
curl -fsS -X GET "https://api.mapmap.ai/styles/{spec}"

Parameters

NameInRequiredDescription
specpathyes<id>@<version>.json (immutable) or <id>.json (latest)
api_keyquerynoOptional. When given, the basemap source points at this gateway's keyed tiles (/tiles/{territory}/tiles.json?api_key=…) so the style renders on any website. The style itself stays public.
renderquerynostatic: the variant the static-map renderer loads, with every customer source (a theme's sources) and the layers drawing from them removed, so a server-side render never requests a customer host. The removed ids are in the X-MapMap-Customer-Sources-Skipped header and metadata["mapmap:customer_sources_skipped"]. Omitted, the style is served as published.

Responses

200The compiled MapLibre style (spec v8)
404Hosted styles not configured, unknown style or version

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

Also under styles

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