> 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/reference/carto-api.md).

# CARTO API Reference

The CARTO API lets you work with data in your data warehouse through an existing [connection](/carto-user-manual/connections.md) in your CARTO organization.

## Authorization

Every request needs a bearer token:

```
Authorization: Bearer <YOUR_TOKEN>
```

There are two kinds of token:

* **API Access Token** — grants access to specific sources through a specific connection. Use it in public applications. Works with the Maps, SQL, Imports and LDS APIs. [Create one in the Workspace](/carto-user-manual/developers/managing-credentials/api-access-tokens.md).
* **OAuth Access Token** — represents a user. Works with every API, and is the only option for the Tokens, Named Sources, Resources and Activity Data APIs.

To get an OAuth Access Token, create an OAuth Client in the [Developers section](/carto-user-manual/developers.md) of your Workspace and exchange its credentials:

```bash
curl --request POST \
  --url 'https://auth.carto.com/oauth/token' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data 'grant_type=client_credentials' \
  --data 'client_id=<YOUR_CLIENT_ID>' \
  --data 'client_secret=<YOUR_CLIENT_SECRET>' \
  --data 'audience=carto-cloud-native-api'
```

## API Base URL

Each [CARTO Cloud region](/carto-user-manual/overview/carto-cloud-regions.md) and Self-Hosted tenant has its own base URL. Use the one for your organization — you can copy it from the [Developers section](/carto-user-manual/developers/managing-credentials/api-base-url.md) of the Workspace.

| Region              | API Base URL                                     |
| ------------------- | ------------------------------------------------ |
| United States East  | `https://gcp-us-east1.api.carto.com`             |
| Europe West         | `https://gcp-europe-west1.api.carto.com`         |
| Asia Northeast      | `https://gcp-asia-northeast1.api.carto.com`      |
| Australia Southeast | `https://gcp-australia-southeast1.api.carto.com` |

## Rate limits

CARTO Cloud is protected by a web application firewall that temporarily blocks any IP going over these per-IP limits:

| API                                        | Requests per minute |
| ------------------------------------------ | ------------------- |
| Maps                                       | 3500                |
| LDS                                        | 3000                |
| SQL                                        | 2500                |
| Imports                                    | 500                 |
| Tokens & Accounts                          | 300                 |
| Connections, Workflows & Organization Maps | 300                 |
| AI (LLM completions)                       | 300                 |
| All other endpoints                        | 1000                |

Requests answered by the CDN cache don't count towards the limit. Going over it returns a `429` response. The **All other endpoints** row covers any API not listed above, including the [Activity Data API](/carto-for-developers/reference/carto-api/activity-data-api.md).

{% hint style="info" %}
New to the CARTO API? Start with [How to make my first API call](/carto-for-developers/quickstart/how-to-make-my-first-api-call.md).
{% endhint %}

## The APIs

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Maps API</strong></td><td>Map layers from queries, tables and tilesets</td><td><a href="/pages/HVlfKpOoRRXbjVWEa3c5">/pages/HVlfKpOoRRXbjVWEa3c5</a></td></tr><tr><td><strong>SQL API</strong></td><td>Run queries, synchronously or as jobs</td><td><a href="/pages/wnP0MOFd3oTtOKb1WGrc">/pages/wnP0MOFd3oTtOKb1WGrc</a></td></tr><tr><td><strong>Tokens API</strong></td><td>Create and manage API Access Tokens</td><td><a href="/pages/TAsdvHgAX8MCjTAovMJn">/pages/TAsdvHgAX8MCjTAovMJn</a></td></tr><tr><td><strong>Imports API</strong></td><td>Import geospatial files into your data warehouse</td><td><a href="/pages/Kjl1JQ0VO4sjqHOu9WBS">/pages/Kjl1JQ0VO4sjqHOu9WBS</a></td></tr><tr><td><strong>Exports API</strong></td><td>Export tables and query results to a file</td><td><a href="/pages/9iRbzoMy44gRsntS3DNi">/pages/9iRbzoMy44gRsntS3DNi</a></td></tr><tr><td><strong>LDS API</strong></td><td>Geocoding, isolines and routing</td><td><a href="/pages/uAWsuS948iwvP099FlPm">/pages/uAWsuS948iwvP099FlPm</a></td></tr><tr><td><strong>Named Sources API</strong></td><td>Server-side aliases for SQL queries</td><td><a href="/pages/dYrODvumJRESbzzBLFey">/pages/dYrODvumJRESbzzBLFey</a></td></tr><tr><td><strong>Resources API</strong></td><td>Manage maps, workflows and connections</td><td><a href="/pages/spy7uT0mJe52hVDowdqb">/pages/spy7uT0mJe52hVDowdqb</a></td></tr><tr><td><strong>Activity Data API</strong></td><td>Export activity and API usage data</td><td><a href="/pages/0JGh0ozS0LISl3L7Gzd3">/pages/0JGh0ozS0LISl3L7Gzd3</a></td></tr></tbody></table>


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.carto.com/carto-for-developers/reference/carto-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
