Maps API
Create map layers from queries, tables and tilesets.
Choosing an endpoint
Caching
Spatial columns
Endpoints
Returns metadata and URLs to fetch a map layer built from a SQL query.
Omit format to get the full response with a URL per available format.
Pass format to get that single format directly.
An API Access Token or an OAuth Access Token, sent as
Authorization: Bearer <token>.
Name of the connection to use.
carto_dwThe SQL query, or the name of a named source.
SELECT * FROM carto-demo-data.demo_tables.airportsValues for the parameters in the query, as a JSON string. Named object on BigQuery, positional array on Snowflake, Redshift and PostgreSQL.
{"minRevenue": 100000, "type": "Supermarket"}Column holding the geometry or spatial index. Defaults to geom.
Required from v=3.3 onwards.
Type of the spatial column. Defaults to geo. Required from v=3.3
onwards.
Legacy way to select the geometry column, in the form
[spatialIndexType:]columnName. Use spatialDataColumn and
spatialDataType instead — from v=3.3 this parameter returns 400.
Comma-separated list of columns to return.
name,geomReturn a single format instead of the full response. Omit to get URLs for every available format.
Resolution of the generated tiles.
Aggregation expression applied when building spatial index tiles, for
example SUM(population) as population.
Resolution level for spatial index aggregation. Requires
aggregationExp. Defaults to 6 for quadbin and 4 for H3.
API version. From 3.3, spatialDataColumn and spatialDataType replace
geo_column.
3.0Possible values: Map layer metadata and download URLs.
Metadata and download URLs for a map layer. Which format keys are present
depends on the size of the source — large sources only offer tilejson.
Size of the source in bytes.
Number of rows in the source.
The request is malformed or a parameter failed validation.
The token is missing, malformed or expired.
The token doesn't grant access to this resource.
The resource doesn't exist.
The query can't be served for this connection — for example a Databricks
connection with spatialDataType=geo.
You went over the rate limit for this API.
Returns metadata and URLs to fetch a map layer built from a table.
A tilejson URL is always included. Other formats are included depending on
the size of the table — large tables only offer tiles.
An API Access Token or an OAuth Access Token, sent as
Authorization: Bearer <token>.
Name of the connection to use.
carto_dwFully qualified table name.
carto-demo-data.demo_tables.airportsColumn holding the geometry or spatial index. Defaults to geom.
Required from v=3.3 onwards.
Type of the spatial column. Defaults to geo. Required from v=3.3
onwards.
Legacy way to select the geometry column, in the form
[spatialIndexType:]columnName. Use spatialDataColumn and
spatialDataType instead — from v=3.3 this parameter returns 400.
Comma-separated list of columns to return.
name,geomReturn a single format instead of the full response.
Resolution of the generated tiles.
API version. From 3.3, spatialDataColumn and spatialDataType replace
geo_column.
3.0Possible values: Map layer metadata and download URLs.
Metadata and download URLs for a map layer. Which format keys are present
depends on the size of the source — large sources only offer tilejson.
Size of the source in bytes.
Number of rows in the source.
The request is malformed or a parameter failed validation.
The token is missing, malformed or expired.
The token doesn't grant access to this resource.
The resource doesn't exist.
No column matches the expected spatial data type. The response body
includes the table schema so you can pick the right column.
You went over the rate limit for this API.
Returns the TileJSON for a tileset in your data warehouse. Learn more about tileset generation.
An API Access Token or an OAuth Access Token, sent as
Authorization: Bearer <token>.
Name of the connection to use.
carto_dwFully qualified tileset name.
carto-demo-data.demo_tilesets.nasadem_glo_quadgrid15The only supported value is tilejson. Omit it to get the full response
with tileset metadata.
API version. From 3.3, spatialDataColumn and spatialDataType replace
geo_column.
3.0Possible values: Tileset metadata, or the TileJSON when format=tilejson.
Metadata and download URLs for a map layer. Which format keys are present
depends on the size of the source — large sources only offer tilejson.
Size of the source in bytes.
Number of rows in the source.
The tileset returned no result.
The request is malformed or a parameter failed validation.
The token is missing, malformed or expired.
The token doesn't grant access to this resource.
The resource doesn't exist.
You went over the rate limit for this API.
Last updated
Was this helpful?
