---
title: "Read a compiled MapLibre style"
method: GET
path: "/styles/{id}/style.json"
tags: ["cartography"]
---

# Read a compiled MapLibre style

`GET /styles/{id}/style.json`

## Request

- Base URL: `https://api.mapsource.io`
- URL: `https://api.mapsource.io/styles/{id}/style.json`
- Auth: none declared

The compiled style document for a preset or one of your saved profiles. metadata['mapsource:ui'] contains the resolved colors and font stacks for browser attribution and result labels; install the public Map UI helper to apply them to HTML controls.

When to use: Load a preset or saved profile into a MapLibre-compatible client.

## Path parameters

- `id` string, required

## Response `200`

Read a compiled MapLibre style

- object
  - `version` integer
  - `sources` object
  - `layers` unknown[]
    - unknown
  - `metadata` object: Basemap contract, preset reference, and mapsource:ui theme metadata (version 1).

## Other responses

- `400`: Error with a stable machine code.
- `401`: Error with a stable machine code.
- `429`: Error with a stable machine code.
- `500`: Error with a stable machine code.

---

[API](https://skmtc.dev/mapsource/apis/mapsource-overpass-api.md) · [All operations](https://skmtc.dev/mapsource/apis/mapsource-overpass-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mapsource/apis/mapsource-overpass-api/revisions/8af8c2769e7b?raw)
