CARTO Map Visualizations
The Export map option enables you to download a map, and the connected dataset, as a .carto file. This .carto file includes the dataset and visualization definition, which contains any SQL queries, CartoCSS, basemaps, attributions, metadata, and styling that was applied to a map. 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 maps 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
Export a CARTO Visualization
|api_key||The target CARTO account API key.|
|visualization_id||A unique identifier for the map created in the export process. Only applies if created_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:
Once completed, the response status changes to
complete and displays the upload url location of the .carto visualization file:
The response includes:
|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 created_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:
Example completed response:
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 section to troubleshoot any importing errors.