The CARTO Maps API allows you to generate maps based on data hosted in your CARTO account.
The CARTO Maps API allows you to generate maps based on data hosted in your CARTO account and apply custom SQL and CartoCSS to the data. The API generates a XYZ-based URL to fetch Web Mercator projected tiles using web clients such as Leaflet, Google Maps, or OpenLayers.
In order to access Maps API you must provide an API key. The CARTO Authorization guide explains how these keys are sent (TLDR: HTTP basic auth or query string param with the API key token). Depending on the permissions granted to the provided API key, the request will be authorized or not.
Bla Bla
Authorizations: |
version | string Default: "1.0.0" Spec version to use for validation. |
extent | string The default map extent for the map projection. Note: Currently, only webmercator is supported. |
srid | string Default: 3857 The spatial reference identifier for the map. |
maxzoom | string Default: "undefined (infinite)" The maximum zoom level for your map. A request beyond the defined maxzoom returns a 404 error. |
minzoom | string The minimum zoom level for your map. A request beyond the defined minzoom returns a 404 error. |
layers required | Array of object |
Ok
Unauthorized. No authentication provided.
Forbidden. The API key does not authorize this request.
Bla Bla
Authorizations: |
layergroupid required | string The layergroup ID. |
z required | integer >= 0 Zoom level. |
x required | integer >= 0 X coordinate. |
y required | integer >= 0 Y coordinate. |
Ok
Unauthorized. No authentication provided.
Forbidden. The API key does not authorize this request.
The specified resource was not found
curl -X GET \
https://username.carto.com/api/v1/map/c01a54877c62831bb51720263f91fb33:0/2/3/4.png
Bla Bla
Authorizations: |
layergroupid required | string The layergroup ID. |
layers_filter required | string or string Layers to be rendered together. Supports 2 format options:
|
z required | integer >= 0 Zoom level. |
x required | integer >= 0 X coordinate. |
y required | integer >= 0 Y coordinate. |
Ok
Unauthorized. No authentication provided.
Forbidden. The API key does not authorize this request.
The specified resource was not found
curl -X GET \
https://username.carto.com/api/v1/map/c01a54877c62831bb51720263f91fb33:0/2/3/4.png
If the MapConfig had a Torque layer it could be possible to request it
Authorizations: |
layergroupid required | string The layergroup ID. |
layer required | number (layer index) >= 0 0 based layer index |
z required | integer >= 0 Zoom level. |
x required | integer >= 0 X coordinate. |
y required | integer >= 0 Y coordinate. |
Ok
Unauthorized. No authentication provided.
Forbidden. The API key does not authorize this request.
The specified resource was not found
curl -X GET \
https://username.carto.com/api/v1/map/c01a54877c62831bb51720263f91fb33:0/2/3/4.png