Summary
When querying a feature service in ArcGIS REST API, a response is returned based on the request parameters. It is possible to extract the response using a third-party application, such as Microsoft Excel or Google Drive. Converting JSON query results to an Excel file or a CSV format allows users to save, view, and share data conveniently.
Procedure
Follow the steps below to convert a JSON query result of a feature service from an ArcGIS REST endpoint to an Excel file or a CSV format.
- Log in to www.arcgis.com.
- Click My Content, and navigate to the feature service to open its item details page.
- On the item details page, scroll to the URL section, and click View to access the ArcGIS REST Services Directory page.
- Select a layer to query under the Layers list.
- Scroll to the bottom of the page, and click Query in the Supported Operations section.
- On the Query page, fill in the request parameters. Execute the query, and copy the URL of the JSON resulting web page. In this example, the parameters are set as follows:
- For the Where clause, 1=1 is used to display all the data within the feature service.
- For Format, select JSON from the drop-down list.
- Click Query (GET) or Query (POST) to render a result.
- Copy the URL of the JSON resulting web page.
- In Microsoft Excel, click the Data tab, and click Get Data > From Other Sources > From Web. Paste the URL copied in Step 5d in the URL text box. Click OK.
- A window with the JSON results displays. Click Load.
- The JSON results are loaded in the Excel file. Save the file in the desired format.