latestOpenAPI 3.1.0Proprietary2026-08-175035117.5 KB

019f79ecdd6c

SQL

Run a query (POST)

Same as the GET variant, for queries too long to fit in a URL.

This endpoint is not cached in CARTO's CDN, so every request reaches the data warehouse. Keep that in mind to avoid unnecessary compute cost.

post/v3/sql/{connectionName}/query

Path parameters

connectionNamestring required

Name of the connection to use.

Request body

qstring required

The SQL query, or the name of a named source.

Response

The query result.

rowsobject[]

The result rows. Geometry columns are returned as GeoJSON.

metaobject

Provider-specific metadata.