Chevron DownAPI Reference is the preferred and official solution for creating modern Webapps using the CARTO Location Intelligence platform

It integrates with the CARTO Maps API to:

  • Provide a geospatial backend storage for your geospatial data.
  • Visualize large datasets which do not fit within browser memory.
  • Provide an SQL spatial interface to work with your data.

Install package

npm install
# or
npm install


import DeckGL from '';
import {CartoSQLLayer, setDefaultCredentials} from '';

  username: 'public',
  apiKey: 'default_public'

function App({viewState}) {
  const layer = new CartoSQLLayer({
    data: 'SELECT * FROM world_population_2015',
    pointRadiusMinPixels: 2,
    getLineColor: [0, 0, 0, 0.75],
    getFillColor: [238, 77, 90],
    lineWidthMinPixels: 1

  return <DeckGL viewState={viewState} layers={[layer]} />;


You can see real examples for the following:

  • Scripting: Quick scripting examples to play with the module without NPM or Webpack. If you're not a web developer, this is probably what you're looking for.

  • React: integrate in a React application.

  • Pure JS: integrate in a pure js application, using webpack.