Tiles API

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

Overview

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

TileJSON is the JSON metadata format and the preferred way to add a tileset source in many map clients. Web 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 uploaded dataset.

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

GET
https://api.mappinest.com/tiles/NATIONAL_COUNTIES.json?key=YOUR_KEY
MapLibre / Mapbox GL JS source using TileJSON
map.addSource('counties', {
  type: 'vector',
  url: 'https://api.mappinest.com/tiles/NATIONAL_COUNTIES.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 client.

Tile endpoint pattern

All tile requests follow the standard XYZ URL pattern.

GET
https://api.mappinest.com/tiles/{datasetId}/{z}/{x}/{y}.{format}?key=YOUR_KEY
ParameterDescription
datasetId
Unique identifier for the uploaded dataset, typically in the form username.dataset unless the dataset 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/{datasetId}/{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 dataset. 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/{datasetId}/{z}/{x}/{y}.png?key=YOUR_KEY
  • Common raster format: png.
  • Additional formats such as jpg, webp, or avif may be available depending on the dataset and delivery setup.

Last updated: March 13, 2026