---
title: "Maps API"
description: "Technical reference for requesting map styles from MapTiler Server."
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Maps API

## Maps API reference

  Scalar API Reference

-   [
    
    Introduction
    
    ](#description/introduction)
-   [
    
    Maps
    
    ](#tag/maps)
    
    Close Group - Maps
    
    -   [
        
        Embeddable HTML viewer
        
        HTTP Method:  GET](#tag/maps/GET/maps/{mapId})
    -   [
        
        Style JSON of the map
        
        HTTP Method:  GET](#tag/maps/GET/maps/{mapId}/style.json)
    -   [
        
        Map symbols (sprites)
        
        HTTP Method:  GET](#tag/maps/GET/maps/{mapId}/sprite{scale}.{format})
    -   [
        
        Raster XYZ tiles
        
        HTTP Method:  GET](#tag/maps/GET/maps/{mapId}/{tileSize}/{z}/{x}/{y}{scale}.{format})
    -   [
        
        TileJSON
        
        HTTP Method:  GET](#tag/maps/GET/maps/{mapId}/{tileSize}/tiles.json)
    -   [
        
        OGC API \- Tiles
        
        HTTP Method:  GET](#tag/maps/GET/maps/{mapId}/tiles)
    -   [
        
        OGC API TileMatrixSets
        
        HTTP Method:  GET](#tag/maps/GET/maps/{mapId}/tileMatrixSet)
    -   [
        
        WMTS Capabilities
        
        HTTP Method:  GET](#tag/maps/GET/maps/{mapId}/WMTSCapabilities.xml)
    -   [
        
        WMTS Capabilities for all layers
        
        HTTP Method:  GET](#tag/maps/GET/WMTSCapabilities.xml)
    -   [
        
        WMS Capabilities
        
        HTTP Method:  GET](#tag/maps/GET/maps/{mapId}/wms)
    -   [
        
        WMS Capabilities for all layers
        
        HTTP Method:  GET](#tag/maps/GET/maps/wms)

[Powered by Scalar](https://www.scalar.com)

v4.9.0

OpenAPI 3.1.0

# MapTiler Server API

[Support](mailto:support@maptiler.com)

[](https://support.maptiler.com)

[MapTiler Server License Agreement](https://www.maptiler.com/server/license/)

[Terms of Service](https://www.maptiler.com/server/license/)

Server

Server:http://{host}/api

host

MapTiler Server API

Client Libraries

Shell

Ruby

Node.js

PHP

Python

MoreSelect from all clients

Shell Curl

## Maps

​Copy link

Serve and render self-hosted vector and raster maps.

Maps Operations

-   get/maps/{mapId}
-   get/maps/{mapId}/style.json
-   get/maps/{mapId}/sprite{scale}.{format}
-   get/maps/{mapId}/{tileSize}/{z}/{x}/{y}{scale}.{format}
-   get/maps/{mapId}/{tileSize}/tiles.json
-   get/maps/{mapId}/tiles
-   get/maps/{mapId}/tileMatrixSet
-   get/maps/{mapId}/WMTSCapabilities.xml
-   get/WMTSCapabilities.xml
-   get/maps/{mapId}/wms
-   get/maps/wms

### Embeddable HTML viewer

​Copy link

Path Parameters

-   mapIdCopy link to mapId
    
    Type: string
    
    required
    
    Example
    
    streets
    
    Identifier of the map. See MapTiler Server Maps `http://localhost:3650/admin/`.
    

Responses

-   200
    
    OK
    
    text/html
    
-   404
    
    The item does not exist
    

Request Example for get/maps/_{mapId}_

Shell Curl

```curl
curl http://localhost:3650/api/maps/streets
```

Copy

Copy

Status: 200Status: 404

No Body

OK

### Style JSON of the map

​Copy link

Style JSON describing the map cartography. Can be used with various libraries to display a vector map (e.g. Mapbox GL JS, OpenLayers, ...).

Path Parameters

-   mapIdCopy link to mapId
    
    Type: string
    
    required
    
    Example
    
    streets
    
    Identifier of the map. See MapTiler Server Maps `http://localhost:3650/admin/`.
    

Responses

-   200
    
    OK
    
    application/json
    
-   404
    
    The item does not exist
    

Request Example for get/maps/_{mapId}_/style.json

Shell Curl

```curl
curl http://localhost:3650/api/maps/streets/style.json
```

Copy

Copy

Status: 200Status: 404

Show Schema 

```json
{}
```

Copy

Copy

OK

### Map symbols (sprites)

​Copy link

Map symbols (sprites) required to display the vector map.

Path Parameters

-   mapIdCopy link to mapId
    
    Type: string
    
    required
    
    Example
    
    streets
    
    Identifier of the map. See MapTiler Server Maps `http://localhost:3650/admin/`.
    
-   scaleCopy link to scale
    
    Type: string enum
    
    required
    
    Use "@2x" to get "retina"/HiDPI image.
    
    values
    
    -   @2x
        
    
-   formatCopy link to format
    
    Type: string enum
    
    required
    
    values
    
    -   png
        
    -   json
        
    

Responses

-   200
    
    OK
    
    Selected Content Type: application/json
    
-   404
    
    The item does not exist
    

Request Example for get/maps/_{mapId}_/sprite_{scale}_._{format}_

Shell Curl

```curl
curl http://localhost:3650/api/maps/streets/sprite.png
```

Copy

Copy

Status: 200Status: 404

No Body

OK

### Raster XYZ tiles

​Copy link

Rasterized tiles (XYZ) of the map. Can be used with various libraries to display a raster map (e.g. Leaflet, OpenLayers, ...). It's usually better (if possible) to use the TileJSON rather than using the tile URL directly.

Path Parameters

-   mapIdCopy link to mapId
    
    Type: string
    
    required
    
    Example
    
    streets
    
    Identifier of the map. See MapTiler Server Maps `http://localhost:3650/admin/`.
    
-   tileSizeCopy link to tileSize
    
    Type: string enum
    
    required
    
    values
    
    -   256
        
    -   512
        
    
-   zCopy link to z
    
    Type: integer
    
    required
    
    Zoom level. Specifies the tile's zoom level. See [Tiles à la Google Maps](https://docs.maptiler.com/google-maps-coordinates-tile-bounds-projection/)
    
-   xCopy link to x
    
    Type: integer
    
    required
    
    Column. Specifies the tile's column. See [Tiles à la Google Maps](https://docs.maptiler.com/google-maps-coordinates-tile-bounds-projection/)
    
-   yCopy link to y
    
    Type: integer
    
    required
    
    Row. Specifies the tile's row. See [Tiles à la Google Maps](https://docs.maptiler.com/google-maps-coordinates-tile-bounds-projection/)
    
-   scaleCopy link to scale
    
    Type: string enum
    
    required
    
    Use "@2x" to get "retina"/HiDPI image.
    
    values
    
    -   @2x
        
    
-   formatCopy link to format
    
    Type: string enum
    
    required
    
    The value depends on the Map settings.
    
    values
    
    -   png
        
    -   jpg
        
    -   webp
        
    

Responses

-   200
    
    OK
    
    image/\*
    
-   400
    
    Out of bounds / Invalid format
    
-   404
    
    The item does not exist
    

Request Example for get/maps/_{mapId}_/_{tileSize}_/_{z}_/_{x}_/_{y}__{scale}_._{format}_

Shell Curl

```curl
curl http://localhost:3650/api/maps/streets//1/1/1.png
```

Copy

Copy

Status: 200Status: 400Status: 404

Show Schema 

```json
@filename
```

Copy

Copy

OK

### TileJSON

​Copy link

TileJSON describing the metadata of the map as well as link to the XYZ tiles. Can be used with various libraries to display a raster map (e.g. Leaflet, OpenLayers, ...).

Path Parameters

-   mapIdCopy link to mapId
    
    Type: string
    
    required
    
    Example
    
    streets
    
    Identifier of the map. See MapTiler Server Maps `http://localhost:3650/admin/`.
    
-   tileSizeCopy link to tileSize
    
    Type: string enum
    
    required
    
    values
    
    -   256
        
    -   512
        
    

Responses

-   200
    
    OK
    
    application/json
    
-   404
    
    The item does not exist
    

Request Example for get/maps/_{mapId}_/_{tileSize}_/tiles.json

Shell Curl

```curl
curl http://localhost:3650/api/maps/streets//tiles.json
```

Copy

Copy

Status: 200Status: 404

Show Schema 

```json
{}
```

Copy

Copy

OK

### OGC API - Tiles

​Copy link

Tileset landing page of the rasterized tiles. Can be used in software supporting the OGC API - Tiles v1.0 specification.

Path Parameters

-   mapIdCopy link to mapId
    
    Type: string
    
    required
    
    Example
    
    streets
    
    Identifier of the map. See MapTiler Server Maps `http://localhost:3650/admin/`.
    

Responses

-   200
    
    OK
    
    application/json
    
-   404
    
    The item does not exist
    

Request Example for get/maps/_{mapId}_/tiles

Shell Curl

```curl
curl http://localhost:3650/api/maps/streets/tiles
```

Copy

Copy

Status: 200Status: 404

Show Schema 

```json
string
```

Copy

Copy

OK

### OGC API TileMatrixSets

​Copy link

Description of the tileset tile matrix sets according to the OGC Web API. This resource is linked from the OGC API - Tiles endpoint.

Path Parameters

-   mapIdCopy link to mapId
    
    Type: string
    
    required
    
    Example
    
    streets
    
    Identifier of the map. See MapTiler Server Maps `http://localhost:3650/admin/`.
    

Responses

-   200
    
    OK
    
    application/json
    
-   404
    
    The item does not exist
    

Request Example for get/maps/_{mapId}_/tileMatrixSet

Shell Curl

```curl
curl http://localhost:3650/api/maps/streets/tileMatrixSet
```

Copy

Copy

Status: 200Status: 404

Show Schema 

```json
string
```

Copy

Copy

OK

### WMTS Capabilities

​Copy link

WMTS Capabilities XML document describing the metadata of the map as well as link to the XYZ tiles. Can be used with various GIS software (e.g. QGIS) to display the map.

Path Parameters

-   mapIdCopy link to mapId
    
    Type: string
    
    required
    
    Example
    
    streets
    
    Identifier of the map. See MapTiler Server Maps `http://localhost:3650/admin/`.
    

Responses

-   200
    
    OK
    
    text/xml
    
-   404
    
    The item does not exist
    

Request Example for get/maps/_{mapId}_/WMTSCapabilities.xml

Shell Curl

```curl
curl http://localhost:3650/api/maps/streets/WMTSCapabilities.xml
```

Copy

Copy

Status: 200Status: 404

Show Schema 

```json
string
```

Copy

Copy

OK

### WMTS Capabilities for all layers

​Copy link

WMTS Capabilities XML document describing the metadata of all map layers as well as link to the XYZ tiles. Can be used with various GIS software (e.g. QGIS) to display the map.

Responses

-   200
    
    OK
    
    text/xml
    
-   404
    
    The item does not exist
    

Request Example for get/WMTSCapabilities.xml

Shell Curl

```curl
curl http://localhost:3650/api/WMTSCapabilities.xml
```

Copy

Copy

Status: 200Status: 404

Show Schema 

```json
string
```

Copy

Copy

OK

### WMS Capabilities

​Copy link

WMS Capabilities XML document describing the metadata of the map. Can be used with various GIS software (e.g. QGIS) to display the map.

Path Parameters

-   mapIdCopy link to mapId
    
    Type: string
    
    required
    
    Example
    
    streets
    
    Identifier of the map. See MapTiler Server Maps `http://localhost:3650/admin/`.
    

Query Parameters

-   serviceCopy link to service
    
    enum
    
    const:  
    
    WMS
    
    required
    
    values
    
    -   WMS
        
    
-   requestCopy link to request
    
    enum
    
    const:  
    
    GetCapabilities
    
    required
    
    values
    
    -   GetCapabilities
        
    

Responses

-   200
    
    OK
    
    text/xml
    
-   404
    
    The item does not exist
    

Request Example for get/maps/_{mapId}_/wms

Shell Curl

```curl
curl 'http://localhost:3650/api/maps/streets/wms?service=WMS&request=GetCapabilities'
```

Copy

Copy

Status: 200Status: 404

Show Schema 

```json
string
```

Copy

Copy

OK

### WMS Capabilities for all layers

​Copy link

WMS capabilities XML document describing the metadata of all map layers. Can be used with various GIS software (e.g. QGIS) to display the map.

Query Parameters

-   serviceCopy link to service
    
    enum
    
    const:  
    
    WMS
    
    required
    
    values
    
    -   WMS
        
    
-   requestCopy link to request
    
    enum
    
    const:  
    
    GetCapabilities
    
    required
    
    values
    
    -   GetCapabilities
        
    

Responses

-   200
    
    OK
    
    text/xml
    
-   404
    
    The item does not exist
    

Request Example for get/maps/wms

Shell Curl

```curl
curl 'http://localhost:3650/api/maps/wms?service=WMS&request=GetCapabilities'
```

Copy

Copy

Status: 200Status: 404

Show Schema 

```json
string
```

Copy

Copy

OK

![](https://docs.maptiler.com/assets/img/open-api.png)

Using the OpenAPI Specification?

Get the [openapi.yaml](https://docs.maptiler.com/_data/server/api/openapi.yml)
