StyleJSON Endpoint
Use the Mappinest StyleJSON endpoint to load ready-to-use vector and raster map styles in MapLibre GL JS, Mapbox GL JS, or OpenLayers.
What StyleJSON is
StyleJSON is the style document used by map clients such as Mapbox GL JS, MapLibre GL JS, and OpenLayers. It defines sources, layers, colors, labels, sprites, and glyph handling through one URL.
In Mappinest, StyleJSON is exposed from a style ID such as light or streets. That gives you a stable style URL you can pass directly into supported web map clients.
Use StyleJSON for ready-to-use map styles. For uploaded tilesets, use TileJSON instead.
StyleJSON endpoint
Replace styleId with one of the supported IDs from Mappinest Styles. The same endpoint shape works for streets, light, dark, and satellite.
curl "https://api.mappinest.com/styles/light/style.json?key=YOUR_KEY"What metadata it returns
How clients use StyleJSON
Many vector map clients can load StyleJSON directly through the map style option. The client reads the document first and then resolves the referenced sources, sprites, glyphs, and layer rules automatically.
const map = new maplibregl.Map({
container: 'map',
style: 'https://api.mappinest.com/styles/light/style.json?key=YOUR_KEY',
center: [15, 45],
zoom: 5
});Sample StyleJSON
The following example shows a shortened excerpt from the light style document. It uses the same structure as the StyleJSON endpoint, but keeps only representative fields from the full document.
{
"version": 8,
"name": "Mappinest Light (OMT 3.15)",
"sources": {
"planet": {
"type": "vector",
"url": "https://api.mappinest.com/tiles/planet_20250911.json?key=72fe1214-d200-4bed-9dcf-91d314a96a4e",
"attribution": "© <a href='https://www.mappinest.com/legal/terms' target='_blank'>Mappinest</a>, © <a href='https://www.openstreetmap.org/copyright'>OpenStreetMap</a>"
}
},
"sprite": "https://api.mappinest.com/styles/light/sprite?key=72fe1214-d200-4bed-9dcf-91d314a96a4e",
"glyphs": "https://api.mappinest.com/fonts/{fontstack}/{range}.pbf",
"layers": [
{
"id": "background",
"type": "background",
"paint": {
"background-color": [
"interpolate",
["linear"],
["zoom"],
9,"hsl(220, 3%, 99%)",
11,"hsl(220, 1%, 97%)"
]
}
},
{
"id": "park",
"type": "fill",
"source": "planet",
"source-layer": "park",
"filter": [
"==",
"$type",
"Polygon"
],
"layout": {
"visibility": "visible"
},
"paint": {
"fill-color": "#ededed",
"fill-opacity": [
"interpolate",
["linear"],
["zoom"],
5, 0,
6,0.6,
12,0.2
]
}
},
...
]
}The source-layer names used inside these styles broadly follow the OpenMapTiles schema. That helps when you inspect layer names or compare Mappinest style behavior with other OpenMapTiles-based styles.
Last updated: April 14, 2026