Exports API
Export tables and query results to a file.
Exports take a table or a query in your data warehouse and write it out as a file — GeoParquet, GeoJSON, CSV, a Shapefile and more. Use it to hand data to a system that doesn't speak SQL, to snapshot a filtered view, or to move results out of CARTO entirely.
The work happens asynchronously: create a job, poll it until status is success, then download the file.
POST /v3/exports
Create an export job
GET /v3/exports
List export jobs
GET /v3/exports/{jobId}
Get an export job
POST /v3/exports/{jobId}/cancel
Cancel an export job
Where the file goes
By default the export lands in CARTO's storage and the finished job carries a signed result.downloadUrl, valid for 24 hours. That is the simplest path: create, poll, download.
Pass destUrl to write directly to your own bucket instead — gs://, s3:// or https://. The job then reports outputUrl and no downloadUrl, since you already control where the file lives. Use this when the export feeds a pipeline rather than a person.
Choosing what to export
source is a table name by default. Pass type: query to export the result of a SQL query instead, or the name of a named source.
To narrow what comes out, use either raw SQL fragments or the structured fields — not both:
config.select,config.whereandconfig.limittake SQL directly. Straightforward when you are writing the query yourself.columns,filters,spatialFilter,featureIdsand their companions describe the same thing structurally, and are what Builder sends.
Mixing the two returns 400. config.limit is the exception — it works alongside either.
featureIds needs both geometryType and spatialDataColumn. Without them the filter is silently dropped and you get the whole table, so the API rejects the request rather than exporting more than you asked for.
Formats
geoparquet, geojson, shapefile, geopackage, csv, tab, kml and kmz.
GeoParquet is the best default for large exports — it is compact, typed and reads back into any warehouse. Shapefiles are capped at 2 GB by the format itself, so large datasets fail rather than truncate.
Cancelling
A 200 from the cancel endpoint doesn't guarantee the job stopped. If it finished while your request was in flight, the response carries its real final status instead. Read status rather than trusting the status code.
Endpoints
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.
An API Access Token or an OAuth Access Token, sent as
Authorization: Bearer <token>.
Name of the connection to export through.
A fully qualified table name, or a SQL query when type is query.
A named source is also accepted for queries.
Whether source is a table name or a query.
tablePossible values: Filename for the exported file, without extension. Defaults to the
table name. Unsupported characters are replaced with _.
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.
Columns to export. Can't be combined with config.select.
The geometry or spatial index column.
geo, h3, h3int or quadbin.
Export only these features. Requires geometryType and
spatialDataColumn — without both, the filter is ignored.
Required alongside featureIds.
Values for the parameters in the query. A named object on BigQuery, a positional array on Snowflake, Redshift and PostgreSQL.
The export job was created.
success, failure and cancelled are final states.
The request is malformed or a parameter failed validation.
The token is missing, malformed or expired.
The token doesn't grant access to this resource.
The connection doesn't exist.
You went over the rate limit for this API.
POST /v3/exports HTTP/1.1
Host: gcp-us-east1.api.carto.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 95
{
"connection": "carto_dw",
"source": "carto-demo-data.demo_tables.airports",
"format": "geoparquet"
}{
"jobId": "5a32a0ea-555a-48dd-aeb1-8768aae8ef1c",
"status": "pending"
}Lists your organization's export jobs, newest first.
An API Access Token or an OAuth Access Token, sent as
Authorization: Bearer <token>.
How many jobs to return.
50How many jobs to skip.
0The export jobs.
Name of the connection. Falls back to its identifier if the connection has since been deleted.
success, failure and cancelled are final states.
Empty string when the job hasn't failed.
The token is missing, malformed or expired.
The token doesn't grant access to this resource.
You went over the rate limit for this API.
GET /v3/exports HTTP/1.1
Host: gcp-us-east1.api.carto.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
{
"jobId": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2026-01-01T00:00:00.000Z",
"connection": "text",
"source": "text",
"format": "geoparquet",
"status": "pending",
"error": "text",
"result": {
"rowCount": 1,
"format": "text",
"outputUrl": "text",
"downloadUrl": "text",
"fileSize": 1,
"expirationDate": "2026-01-01T00:00:00.000Z"
}
}
]Returns the current state of an export job. Poll this until status is
success, failure or cancelled.
An API Access Token or an OAuth Access Token, sent as
Authorization: Bearer <token>.
The export job identifier.
5a32a0ea-555a-48dd-aeb1-8768aae8ef1cThe export job.
Name of the connection. Falls back to its identifier if the connection has since been deleted.
success, failure and cancelled are final states.
Empty string when the job hasn't failed.
The token is missing, malformed or expired.
The job doesn't exist, or belongs to another organization.
You went over the rate limit for this API.
GET /v3/exports/{jobId} HTTP/1.1
Host: gcp-us-east1.api.carto.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"jobId": "5a32a0ea-555a-48dd-aeb1-8768aae8ef1c",
"createdAt": "2026-07-31T16:10:35.732Z",
"connection": "carto_dw",
"source": "carto-demo-data.demo_tables.airports",
"format": "geoparquet",
"status": "success",
"error": "",
"result": {
"rowCount": 1000,
"format": "geoparquet",
"outputUrl": "gs://carto-exports/exports/5a32a0ea-555a-48dd-aeb1-8768aae8ef1c/airports.parquet",
"downloadUrl": "https://storage.googleapis.com/carto-exports/exports/5a32a0ea-555a-48dd-aeb1-8768aae8ef1c/airports.parquet?X-Goog-Signature=...",
"fileSize": 70307,
"expirationDate": "2026-08-01T16:10:35.732Z"
}
}Cancels an export job that is still pending or running.
A 200 doesn't guarantee the job was cancelled — if it finished while the
request was in flight, the response carries its actual final status. Always
read status rather than relying on the status code.
An API Access Token or an OAuth Access Token, sent as
Authorization: Bearer <token>.
The export job identifier.
5a32a0ea-555a-48dd-aeb1-8768aae8ef1cThe job's status after the attempt — cancelled, or the state it
reached first.
success, failure and cancelled are final states.
The job already finished and can't be cancelled.
The token is missing, malformed or expired.
The token doesn't grant access to this resource.
The resource doesn't exist.
You went over the rate limit for this API.
POST /v3/exports/{jobId}/cancel HTTP/1.1
Host: gcp-us-east1.api.carto.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"jobId": "5a32a0ea-555a-48dd-aeb1-8768aae8ef1c",
"status": "cancelled"
}Last updated
Was this helpful?
