---
title: "Raster XYZ tiles"
method: GET
path: "/maps/{mapId}/{tileSize/}/{z}/{x}/{y}{scale}.{format}"
tags: ["Maps"]
---

# Raster XYZ tiles

`GET /maps/{mapId}/{tileSize/}/{z}/{x}/{y}{scale}.{format}`

## Request

- Base URL: `https://api.maptiler.com`
- URL: `https://api.maptiler.com/maps/{mapId}/{tileSize/}/{z}/{x}/{y}{scale}.{format}`
- Auth: API key in query parameter `key`
- TypeScript: <https://skmtc.dev/maptiler/apis/maptiler-api-reference/docs/maps/:mapId/:tileSize/:z/:x/:y:scale.:format/get.ts> (a function with typed inputs; its response is checked against the schema)

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.

## Response `200`

Rasterized map tile. The content type matches the requested `format`: `image/png` for `png`, `image/jpeg` for `jpg`, `image/webp` for `webp`, and `image/ktx2` for `basis`.

## Other responses

- `400`: Out of bounds / Invalid format

---

[API](https://skmtc.dev/maptiler/apis/maptiler-api-reference.md) - [All operations](https://skmtc.dev/maptiler/apis/maptiler-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/maptiler/apis/maptiler-api-reference/revisions/68ce3046fc1a?raw)
