The attached Python script demonstrates how you can download your Survey123 data into a local shapefile, file geodatabase, or CSV file. To run this script, do the following:

  1. Download the sample script onto a machine with ArcGIS Desktop 10.5.1.
  2. Edit with IDLE or a Python editor to configure your file parameters. The parameters that need to be set are as follows:
    • featureService_ID—In ArcGIS Online or your own Portal for ArcGIS, browse to the details page of the feature service you want to download. Get the ID from the URL. It will look something like this: f4a06f02b1dd4b1f8904ed0d4e8713bd.
    • output_format—Choose shapefile, file geodatabase, or CSV.
    • download_folder—The output folder where you want the data to be saved.
    • credentials—Typically the owner of the survey. In the script, replace the XXXXX and YYYYYY with your user name and password.
    • portal_url—Optionally, you can define your own portal URL (if you're not using ArcGIS Online to host your surveys).

        

This solution was found in this esri document.