Upload files to your CARTO account and manipulate them by using a set of HTTP commands.

CARTO Map Visualizations

The Export map option enables you to download a map, and the connected dataset, as a .carto file. This is useful for downloading complete CARTO visualizations that you can share or import.

Note: The Import API export visualization command only works for maps created from your dashboard.

A cURL POST request allows you to export the visualization, which you will have to poll with a GET command until the state is complete.

Export a CARTO Visualization


curl -H 'Content-Type: application/json' https://{username}.carto.com/api/v3/visualization_exports\?api_key\={api_key} -X POST --data '{"visualization_id":"{visualization_id}"}'
Param Description
api_key The target CARTO account API key.
visualization_id A unique identifier for the map created in the export process. Only applies if create_visualization is set to true when the map was created.



After making the POST request to create the export, it is expected that the request will take some time. You must poll the server by making a GET request, until state becomes complete. For example:

curl -v -H 'Content-Type: application/json' https://{username}.carto.com/api/v3/visualization_exports/{visualization_export_id}\?api_key\={api_key} -X GET

Once completed, the response status changes to complete and displays the upload url location of the .carto visualization file:


The response includes:

Attributes Description
id A unique identifier for the export process. It is the same as the export id provided in the request.
vizualization_id A unique identifier for the map created in the export process. Only applies if create_visualization is set to true when the map was created.
user_id A unique alphanumeric element that identifies the CARTO account user in the internal database.
state A string value indicating the current state of the export process. It can have any of the following values: enqueued, pending, uploading, unpacking, importing, guessing, complete, or failure.
url The public URL address where the file to be exported is located.
created_at The date time at which the visualization was created in the CARTO database.
updated_at The date time at which the visualization had its contents modified.

Example POST request:

curl -v -H 'Content-Type: application/json' https://{username}.carto.com/api/v3/visualization_exports\?api_key\={api_key} -X POST --data '{"visualization_id":"9a0f4384-afe3-412a-8b09-136b7d9a4013"}'

Example completed response:

curl -H 'Content-Type: application/json' https://{username}.carto.com/api/v3/visualization_exports/72e488a6-cf0e-404d-bc7e-de9c9840aadf\?api_key\=04039a13c1bdda65df8bd825b3b8e8117444c950 -X GET

Import a CARTO Visualization

To import a .carto visualization, you can use the standard Import API procedure for uploading a local file.

See the import errors list on Support section to troubleshoot any importing errors.