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

# Location Data Services API

Geocoding, isolines and routing.

Location Data Services turn addresses into coordinates, coordinates into addresses, and points into reachable areas or routes. CARTO proxies a third-party provider and normalizes the response, so you call one endpoint regardless of who serves it.

Usage consumes your organization's LDS quota. Check what is left with `GET /v3/lds/stats`.

| Endpoint                        | What it does                |
| ------------------------------- | --------------------------- |
| `GET /v3/lds/geocoding/geocode` | Geocode an address          |
| `GET /v3/lds/geocoding/reverse` | Reverse geocode coordinates |
| `POST /v3/lds/geocoding/batch`  | Geocode a list of addresses |
| `GET /v3/lds/isolines`          | Get an isoline              |
| `GET /v3/lds/isolines/h3`       | Get an isoline as H3 cells  |
| `GET /v3/lds/routing`           | Get a route                 |
| `GET /v3/lds/stats`             | Get LDS quota usage         |

{% hint style="warning" %}
**The provider is configured per organization**, and not every provider supports every operation. Calling one your provider doesn't support returns `400 Unsupported provider`.

Response fields also vary by provider — treat anything beyond `latitude`, `longitude` and `formattedAddress` as provider-specific.
{% endhint %}

| Operation            | Providers                                |
| -------------------- | ---------------------------------------- |
| Geocoding            | HERE, Google, Mapbox, TomTom, TravelTime |
| Isolines             | HERE, Mapbox, TomTom, TravelTime         |
| Isolines as H3 cells | TravelTime                               |
| Routing              | HERE, TomTom, TravelTime                 |

## Geocoding one address or many

Use `/geocoding/geocode` for a single address, and `/geocoding/batch` for up to **10,000** in one request. Batch results come back in the same order as the input, and a failed address returns an `error` on its entry rather than failing the whole request — always check per-entry errors.

To geocode a whole table, use the [Analytics Toolbox](/data-and-analysis/analytics-toolbox-for-bigquery/sql-reference/lds.md) instead. It handles chunking and writes results back to your warehouse.

## Coordinate order

`origin` and `destination` take `longitude,latitude`. `waypoints` take `latitude,longitude`, separated by colons — a common source of routes that come back inverted.

Isoline `range` is in **seconds** when `range_type=time` and **meters** when `range_type=distance`. HERE and Mapbox accept several comma-separated ranges; TomTom and TravelTime accept one.

## Polygons or H3 cells

`/isolines` returns a GeoJSON polygon — the right shape for drawing a catchment area on a map or clipping other geometry against it.

`/isolines/h3` computes the reachable area directly as H3 cells, each carrying the travel time to reach it — a separate method, not the polygon re-tiled, so the two won't cover exactly the same area. Use it when the isoline is an input to analysis rather than a picture: joining travel time to H3-indexed demographics, comparing catchments across sites, or rendering as a spatial index layer. It needs a `resolution` between 6 and 12, and higher resolutions cap the travel time you can request.

Both are subject to your provider — H3 cells are only available on TravelTime, and each request costs 5 units of LDS quota rather than 1.

## Endpoints

{% openapi src="<https://openapi.gitbook.com/o/zP3LT2Qhlb5jPWQCfWV3/spec/carto-api>" path="/v3/lds/geocoding/geocode" method="get" %}
<https://openapi.gitbook.com/o/zP3LT2Qhlb5jPWQCfWV3/spec/carto-api>
{% endopenapi %}

{% openapi src="<https://openapi.gitbook.com/o/zP3LT2Qhlb5jPWQCfWV3/spec/carto-api>" path="/v3/lds/geocoding/reverse" method="get" %}
<https://openapi.gitbook.com/o/zP3LT2Qhlb5jPWQCfWV3/spec/carto-api>
{% endopenapi %}

{% openapi src="<https://openapi.gitbook.com/o/zP3LT2Qhlb5jPWQCfWV3/spec/carto-api>" path="/v3/lds/geocoding/batch" method="post" %}
<https://openapi.gitbook.com/o/zP3LT2Qhlb5jPWQCfWV3/spec/carto-api>
{% endopenapi %}

{% openapi src="<https://openapi.gitbook.com/o/zP3LT2Qhlb5jPWQCfWV3/spec/carto-api>" path="/v3/lds/isolines" method="get" %}
<https://openapi.gitbook.com/o/zP3LT2Qhlb5jPWQCfWV3/spec/carto-api>
{% endopenapi %}

{% openapi src="<https://openapi.gitbook.com/o/zP3LT2Qhlb5jPWQCfWV3/spec/carto-api>" path="/v3/lds/isolines/h3" method="get" %}
<https://openapi.gitbook.com/o/zP3LT2Qhlb5jPWQCfWV3/spec/carto-api>
{% endopenapi %}

{% openapi src="<https://openapi.gitbook.com/o/zP3LT2Qhlb5jPWQCfWV3/spec/carto-api>" path="/v3/lds/routing" method="get" %}
<https://openapi.gitbook.com/o/zP3LT2Qhlb5jPWQCfWV3/spec/carto-api>
{% endopenapi %}

{% openapi src="<https://openapi.gitbook.com/o/zP3LT2Qhlb5jPWQCfWV3/spec/carto-api>" path="/v3/lds/stats" method="get" %}
<https://openapi.gitbook.com/o/zP3LT2Qhlb5jPWQCfWV3/spec/carto-api>
{% endopenapi %}


---

# 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/reference/carto-api/lds-api.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.
