> For the complete documentation index, see [llms.txt](https://docs.carto.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.carto.com/carto-for-developers/key-concepts/carto-for-deck.gl/basemaps/carto-basemap.md).

# CARTO Basemap

The CARTO Basemap is the default Basemap and it is included in all CARTO accounts. Outside a CARTO account, the same basemaps are available with a free [API key](https://carto.com/basemaps/apikey/). It uses the Open Source project [Maplibre GL JS](https://maplibre.org/projects/maplibre-gl-js/) and CARTO base maps API.

{% hint style="info" %}
**API keys.** Basemaps used inside the CARTO platform — Builder and Workflows — need no extra setup. Calling the basemap endpoints at `basemaps.cartocdn.com` **directly** requires an API key, available at [carto.com/basemaps/apikey](https://carto.com/basemaps/apikey/): free for non-commercial use up to 5 million tile requests a month and for commercial use up to 1 million; above that, a Basemaps Commercial plan (see [pricing](https://carto.com/basemaps/apikey/#pricing)). CARTO customers need to buy nothing: basemaps are included in every CARTO plan. See the [basemaps FAQ](/faqs/carto-basemaps.md).
{% endhint %}

At the [Basemaps section](/carto-for-developers/key-concepts/carto-for-deck.gl/basemaps.md) of CARTO for deck.gl you can find further information about how to use it. CARTO also provides a set of [Basemaps Styles](https://carto.com/basemaps/#styles) to easily adapt to multiple visualization contexts (dark, light, and voyager).

A code example is available in the guide [Build a public application](/carto-for-developers/guides/build-a-public-application.md#adding-a-basemap).

### Further style customization

If you don't need to change a style, use its URL directly with your key, for example `https://basemaps.cartocdn.com/gl/positron-gl-style/style.json?key=YOUR_KEY`. You can also host a copy of it as is, but its tile, `glyphs` and `sprite` URLs (under `/v/<release>/`) are dynamic and change, so a hosted copy can break at any time; to stay current, use our style URL with `?key=`.

If the Basemaps Styles provided by CARTO are not enough and you need to go further to customize those styles you can do the following:

1. Download the style json as a reference, to compare and see how we build it. `https://basemaps.cartocdn.com/gl/positron-gl-style/style.json`
2. Modify the styles to match your requirements. Your style uses your own glyphs (fonts) and sprite (icons); only its vector source points to our TileJSON, which always serves the current tiles: `"url": "https://tiles.basemaps.cartocdn.com/vector/carto.streets/v2/tiles.json?key=YOUR_KEY"`. Don't keep the tile, `glyphs` and `sprite` URLs of the downloaded file: they are dynamic and change.
3. Put it in a public url.
4. Pass to deck.gl the mapStyle you want to use:

```javascript
 const deckgl = new deck.DeckGL({
  ...
  map: maplibregl,
  mapStyle: '<your styles json url>',
 });
```

If you need a UI to modify the styles, take a look at [Maputnik](https://maputnik.github.io/editor/) (A free and open visual editor tool for editing Basemaps styles).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.carto.com/carto-for-developers/key-concepts/carto-for-deck.gl/basemaps/carto-basemap.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
