Download Dataset From ArcGIS REST Service

That map service is a ArcGIS Server Dynamic Map service which typically only returns images and specific query results, much like a WMS. Some ArcGIS Server image services allow for data download, but this isn't one of those.

You can get the information you're looking for through the query operation, but it will take multiple queries as the max record return limit on this service is 1000, and there are over 58000 records in the v14 layer alone.

To submit queries, go to the layer endpoint and scroll to the bottom for supported operations, then click Query. To find the total number of records, enter 1=1 in the Where field, and select True for Return Count Only, looks like 58919 records. It will only return 1000 records at a time, so you will have to issue 59 queries to get all the records. Seems easiest to filter by OBJECTID, so the first query would be WHERE OBJECTID < 1000, Out Fields = * , Return Geometry = TRUE, Return Count = False, and Format is HTML. The service returns all the features 1- 999 and their attributes. You could change the output format to KMZ and convert to desired format later, iterate through and you would have all the data.

Another method that would work is to programatically grab the individual feature information using the feature endpoint. In the HTML formatted response from above, the OBJECTID attribute is actually a hyperlink to the attributes for just that feature. The REST URL ends with the OBJECTID, so you could just increment that and grab each response in JSON to make it easier to parse.

NOTE - some of these features/links are only applicable to ArcGIS Server 10.1 REST endpoints.


I always find myself in situations where I need to export all the data from a Map Service into a shapefile. Here is a very easy utility to use that will export every feature from a service and save it as a shapefile and geojson if you need it. You will need to have or install node.js.

https://github.com/tannerjt/AGStoShapefile

Once you've put the files on your system, just navigate to the folder, add your map service to the services.txt file and run this from command line:

node AGStoSHP.txt services.txt ./output/

Make sure to put a pipe(|) in your services.txt file to add a name for your service.


Download data stored on an ArcGIS REST MapServer one layer at a time using the command line and the Python package pyesridump.

Example command:

esri2geojson http://gis.naperville.il.us/arcgis/rest/services/OpenData/OpenDataMapService/MapServer/4 naperville_parking_lots_122417.geojson