latestOpenAPI 3.1.0Proprietary2026-08-175035117.5 KB

019f79ecdd6c

Exports

Create an export job

Exports a table or a query to a file.

The job runs asynchronously — poll it until status is success, then download the file from result.downloadUrl.

By default the file lands in CARTO's storage and the job returns a signed download URL valid for 24 hours. Pass destUrl to write to your own bucket instead, in which case no download URL is returned.

post/v3/exports

Request body

connectionstring required

Name of the connection to export through.

sourcestring required

A fully qualified table name, or a SQL query when type is query. A named source is also accepted for queries.

format'geoparquet' | 'geojson' | 'shapefile' | 'geopackage' | 'csv' | 'tab' | 'kml' | 'kmz' required
type'table' | 'query'

Whether source is a table name or a query.

namestring

Filename for the exported file, without extension. Defaults to the table name. Unsupported characters are replaced with _.

destUrlstring

Write the export to your own bucket instead of CARTO's storage. Accepts gs://, s3:// and https://. When set, the job returns no download URL.

columnsstring[]

Columns to export. Can't be combined with config.select.

filtersobject

Attribute filters to apply.

spatialFilterobject

Viewport geometry to clip to, keyed by the spatial index column.

spatialDataColumnstring

The geometry or spatial index column.

spatialDataTypestring

geo, h3, h3int or quadbin.

featureIdsstring[]

Export only these features. Requires geometryType and spatialDataColumn — without both, the filter is ignored.

geometryTypestring

Required alongside featureIds.

Response

The export job was created.

jobIdstring uuid
status'pending' | 'running' | 'success' | 'failure' | 'cancelled'

success, failure and cancelled are final states.