Tool to suck data from ArcGIS Server and spit it into PostgreSQL
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



ChupaESRI is a Python module/command line tool to extract features from ArcGIS Server map services.


Think "chupacabra" or "Chupa Chups".



When run from the command line, the tool will extract all features from a Map Service Query endpoint. You must also specify a PostgreSQL connection string and the name of the table where the extracted data will be stored.

When accessed as a module, the EsriJSON2Pg class is available to you to incorporate into your own projects. See the main method for examples on its use.

How to Use

Have you encountered an ArcGIS Server instance that contains data that you would like to use, but are limited by the functionality provided by the Map Service?

By browsing the REST API structure, you can locate the Query endpoint for the Layer you desire downloading. For example, the Query endpoint looks similar to the following:

For example, to download the State polygons from the ArcGIS Server above into a "public.states" table in a local PostgreSQL instance:

$ "host=localhost dbname=gisdata user=gisadmin password=P4ssW0rd" "public.states"


  • Implement ability to export LINE features
  • More intelligent querying of server-provided statistics to better plan the download requests
  • More elegant way of identifying non-standard ArcGIS REST URLs
  • Development of an ArcGIS Toolbox to perform the extraction, transforming, loading from within ArcGIS


Provided as-is. Use at your own risk. Licensed under the GPL v3. Check with the target ArcGIS Server administrator to make sure he/she allows extraction of the data using this tool.