I'm using a public ArcGis server with some data I would like to export to shape or some other format. I know I can make a program (I'm a developer) that could query the server for all the features on that layer, but I would like something cleaner.

Is there a easy way to export data from a feature layer in ArcGis Server to Shapefile using ArcMap or via web?

  • You could get it directly in KML format from the REST End Point; Once you have the KML, there are many ways of getting it into shapefile or other formats. Commented Dec 24, 2012 at 3:10
  • That could be a way to do it manually. I didn't like it because the tabular data is transformed in HTML tables. It didn't work for my particular workflow, but could work for someone else.
    – mikehc
    Commented Dec 24, 2012 at 3:22

3 Answers 3


I couldn't find an easy way to do it. I had to do it the hard way. If you have to, here are some clues to do it.

  1. You will have to use the ArcGis Api to retrieve the results. You can use the REST Api directly or can use one of the various APIs by ESRI using your language of choice.
  2. You have to know the IDs of the maps you want to retrieve data from. You can query the server to get all de maps IDs too.
  3. Query the server for results. In the 'Where' clause use '1=1' to get all the results. Remember to mark 'Retrieve Geometry' to true if that's the case and use a valid Spatial Reference if you want the result transformed.
  4. ArcGis Server has a default limit of 1000 results per query (it may be different depending of custom configuration). There's no way to paginate the results, so if the data has more than 1000 rows you have to do the following.
  5. Get the IDs of the objects (rows), there's no limit for the results of this query.
  6. Get the first 1000 IDs and query the server for them, repeat until you finish.
  7. Parse/Transform the data for your use.
  8. ???
  9. Profit

You can also do this using the web interface of ArcGis Server, if you don't know much about programming.

  • If the data is publicly available you could try asking for an official export of it. I've worked for several clients who hated seeing their server bandwith chewed up by export processes like this and were more than happy to make copies available through ftp or GDB replication.
    – Dowlers
    Commented Nov 20, 2014 at 0:40

I came across this looking for answers about KML extraction from AGS.

However, what you're looking to do is quite easy, presuming I understand it correctly.

What you need to do is use the data extraction tool. The only downfall of this that the user input shape 'clips' the data. However, in model builder you can modify it if you like to us another selection method.


Vector output supports both Shape and GDB UPDATE: I found a very crude way to modify this so that it essentially functions as a select and not a 'clip' AOI for the input...did this a while back and funny, found this while looking for something totally different! 'Input' is a layer contained in the published map service, 'Stand Selection' is a Feature set, and 'outputfc' is your AOI. Crude as it is...it works. Oh well, back to looking for what I was really after enter image description here

  • It could work. In my specific scenario I didn't have any control over the server and the data extraction tool didn't work correctly. It seemed like it required extra configuration on the server's side, I really don't know.
    – mikehc
    Commented Jun 13, 2013 at 18:30

I just added this to another similar question, but thought I would post here as well:

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.


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.

Hope this helps others who need this functionality.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.