Libraries and APIs

The set of tools you will use to develop custom applications with CARTO

Libraries

deck.gl

deck.gl is an open source JavaScript (and TypeScript) based visualization library designed for large-scale geospatial datasets. It's powered by WebGL2 and WebGPU, achieving incredible visual results with high performance. It's part of the vis.gl framework, integrated into the OpenJS Foundation. CARTO is a lead contributor as well as a member of the technical steering committee of deck.gl.

To visualize geospatial data from CARTO in a custom web application, you need to use deck.gl.

npm install deck.gl

@deck.gl/carto

Inside deck.gl, we maintain our CARTO module, which provides all the necessary layers and styling functions to create and style deck.gl layers from your CARTO connections.

npm install @deck.gl/carto

@carto/api-client

@carto/api-client is a JavaScript (and TypeScript) client library for CARTO APIs and framework-agnostic CARTO + deck.gl web applications.

npm install @carto/api-client


APIS

SQL API

CARTO SQL API v3 lets you run arbitrary queries in external data warehouses using an existing connection in your CARTO organization.

Link to API Reference

Tokens API

The CARTO Tokens API allows the creation API Access Tokens that grant access to specific tables, tilesets and arbitrary queries using a specific connection in your CARTO organization.

An API Access Token allows to create map layers and fetch data from tables, tilesets or arbitrary SQL queries in public applications.

Link to API Reference

Connections API

CARTO Connections API allows for programmatically managing (create, list, delete, or update) your connections to an external Data Warehouse

Link to API Reference

Imports API

CARTO Imports API allows the creation of geospatial tables in an organization's CARTO Data Warehouse by importing files via URL. Once a file is imported, the resulting table can be previewed in Data Explorer and used in Builder and external applications to create maps.

When using the carto_dw connection in your CARTO organization it will create tables in your organization's data shared folder. Learn more about CARTO Data Warehouse here.

Currently, supported file formats are CSV, GeoJSON, GeoParquet and Shapefile; This last one needs to be packaged in a .zip file.

Other supported Data Warehouses are BigQuery, Snowflake, Amazon Redshift and PostgreSQL

There is a size limit to the files that can be imported. It's currently set at 1GB. Let us know if you need a higher limit.

Link to API Reference

Location Data Services (LDS API)

CARTO Location Data Services API provides access to the following services:

  • Geocoding: Get coordinates from a street address

  • Batch geocoding: Get coordinates from a list of street addresses

  • Reverse geocoding: Get a street address from a pair of coordinates

  • Isolines: Get isoline geometries for different methods of transportation.

  • Routing: Get routing geometries for different methods of transportation

Link to API Reference

Maps API

The Maps API is an API designed to be used by the CARTO module in deck.gl (@deck.gl/CARTO). It is used to retrieve map tiles using CARTO in your deck.gl applications.

As a developer you don't need to integrate this API manually in your application.

API rate limits

Our SaaS platform is protected with a web application firewall (WAF) that will automatically and temporarily block any IP that exceeds our API rate limits. Said API rate limits are:

  • Maps API: 3500 requests/minute

  • SQL API: 2500 requests/minute

  • LDS API: 3000 requests/minute

  • Import API: 500 requests/minute

  • Tokens API: 300 requests/minute

  • Connections API: 100 requests/minute

Cached requests (answered by our CDN) do not count towards this rate limit.

CARTO APIs will send a 429 HTTP response if the API request is over this limit.

Last updated

Was this helpful?

OSZAR »