---
title: "Get a map layer from a table"
method: GET
path: "/v3/maps/{connectionName}/table"
tags: ["Maps"]
---

# Get a map layer from a table

`GET /v3/maps/{connectionName}/table`

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.

## Path parameters

- `connectionName` string, required

## Query parameters

- `name` string, required
- `spatialDataColumn` string
- `spatialDataType` 'geo' | 'h3' | 'h3int' | 'quadbin'
- `geo_column` string
- `columns` string
- `format` 'ndjson' | 'geojson' | 'json' | 'binary' | 'tilejson'
- `tileResolution` 0.25 | 0.5 | 1 | 2 | 4
- `v` '3.0' | '3.1' | '3.2' | '3.3' | '3.4'

## Response `200`

Map layer metadata and download URLs.

- MapResponse — 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` integer — Size of the source in bytes.
  - `nrows` integer — Number of rows in the source.
  - `ndjson` MapResponseItem
    - `url` string[]
    - `error` string
  - `geojson` MapResponseItem
    - `url` string[]
    - `error` string
  - `json` MapResponseItem
    - `url` string[]
    - `error` string
  - `binary` MapResponseItem
    - `url` string[]
    - `error` string
  - `tilejson` MapResponseItem
    - `url` string[]
    - `error` string
  - `schema` SchemaField[]
    - `name` string, required
    - `type` 'number' | 'bigint' | 'string' | 'geometry' | 'timestamp' | 'object' | 'boolean' | 'variant' | 'unknown' | 'array', required

## Other responses

- `400` — The request is malformed or a parameter failed validation.
- `401` — The token is missing, malformed or expired.
- `403` — The token doesn't grant access to this resource.
- `404` — The resource doesn't exist.
- `406` — No column matches the expected spatial data type. The response body includes the table `schema` so you can pick the right column.
- `429` — You went over the [rate limit](#rate-limits) for this API.

---

[API](https://skmtc.net/gitbookio/apis/carto-api.md) · [All operations](https://skmtc.net/gitbookio/apis/carto-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gitbookio/carto-api/revisions/019f79ecdd6c/schema)
