Tiles API

Learn how to access vector and raster tiles from your uploaded tilesets using TileJSON or XYZ endpoints.

Overview

You can Upload data through a simple drag-and-drop flow in the console, then use the resulting tileset through the Tiles API. The Tiles API serves map tiles from uploaded tilesets such as MBTiles or PMTiles.

TileJSON is the JSON metadata format and the preferred way to add a tileset source in many map clients. Map clients such as Mapbox GL JS, MapLibre GL JS, OpenLayers, and Leaflet can read the source metadata through TileJSON or direct tile URLs as XYZ URLs.

Both vector and raster tiles use the same standard /{z}/{x}/{y} addressing scheme under the hood. Vector tiles are retrieved in PBF format, while raster tiles are retrieved as rendered image formats such as PNG, JPG, WEBP, or AVIF depending on the format of the uploaded tileset.

TileJSON

Mappinest recommends using TileJSON instead of direct XYZ URL templates when the client supports source metadata by URL. It exposes tileset metadata and tile endpoints through a single URL.

GET
https://api.mappinest.com/tiles/{tilesetId}.json?key=YOUR_KEY
MapLibre / Mapbox GL JS source using TileJSON
map.addSource('counties', {
  type: 'vector',
  url: 'https://api.mappinest.com/tiles/{tilesetId}.json?key=YOUR_KEY'
});

This is the cleanest path in Mapbox GL JS and MapLibre GL JS. The same TileJSON document can also drive OpenLayers or Leaflet integrations when you resolve the metadata first and wire the returned tile template into the map client.

Tile endpoint pattern

All tile requests follow the standard XYZ URL pattern.

GET
https://api.mappinest.com/tiles/{tilesetId}/{z}/{x}/{y}.{format}?key=YOUR_KEY
ParameterDescription
tilesetId
Unique identifier for the uploaded tileset, typically in the form username.tileset unless the tileset is global.
z
Tile zoom level.
x
Tile column.
y
Tile row.
format
Tile output format such as pbf, png, jpg, webp, or avif.

This shared XYZ pattern underpins integrations in Mapbox GL JS, MapLibre GL JS, OpenLayers, and Leaflet when you define the source manually.

Vector tile format

Vector tiles are retrieved as Mapbox Vector Tile payloads in PBF format. For the full endpoint details, accepted parameters, and pricing notes, see the Vector tiles page.

GET
https://api.mappinest.com/tiles/{tilesetId}/{z}/{x}/{y}.pbf?key=YOUR_KEY

This vector endpoint works directly in Mapbox GL JS, MapLibre GL JS, and OpenLayers. It also works in Leaflet when you use a vector-tile integration such as Leaflet.VectorGrid.

Raster tile formats

Raster tiles are rendered image tiles generated from the same tileset. To retrieve the data, they use XYZ pattern, but request an image format instead. Supported formats are documented on the Raster tiles page. Raster tiles are generally the most broadly compatible option and can be also consumed in Mapbox GL JS, MapLibre GL JS, OpenLayers, and Leaflet.

GET
https://api.mappinest.com/tiles/{tilesetId}/{z}/{x}/{y}.{format}?key=YOUR_KEY
  • Common raster format: png.
  • Additional formats such as jpg, webp, or avif may be available depending on the tileset and delivery setup.

Last updated: April 14, 2026