Analyze Geocode Input

The AnalyzeGeocodeInput task takes in a geocode input (either a table or file of addresses) and returns an output JSON that includes a suggested field mapping. It supports CSV, XLS, or table input. The table can be from a big data file share or from a feature service. The task generates a suggested field mapping based on the input fields and the geocoding service candidate fields and returns it in a geocodeParameters JSON. This geocodeParameters JSON output is the first input to the Batch Geocode tool. The output geocodeParameters JSON also includes field info (name, length, and type) as well as additional information that helps the BatchGeocode tool parse the input file or table.

Request URL

http://<analysis url>/AnalyzeGeocodeInput/submitJob

Request parameters




The REST URL of the geocode service that you want to geocode your addresses against. The URL must end in geocodeServer and allow batch requests. This could be a utility service or a geocoder that is anonymously accessible. The geocoding service must be configured to allow batch geocoding. For more information, see Configure the portal to geocode addresses.


Syntax: The input table specification must include the following:

  • A URL to an input table
  • A service token to access the table

Note that if the table is a hosted table on the same portal, serviceToken is not required.

Example: {"url":"<table url>","serviceToken":"<token>"}


Syntax: The input file should be a portal item. Input the itemid of the item in the portal. The format of the item in the portal can be in one of the following formats:

  • CSV
  • Microsoft Excel spreadsheet

Example: {"itemid":"<itemid of file>"}


Instead of providing inputTable or inputFileItem, columnNames can be provided. columnNames is required if there is no header row in the inputTable or inputFileItem. columnNames should be separated by commas.

Example: address,city,state,zip


Enter a JSON that contains information about how to parse the file. If you are using inputTable instead of inputFileItem as input, this parameter can be left blank. Any of the values in the JSON can also be left blank ("") if they do not apply to the file.


  • fileType—Enter CSV or XLS for the file format of inputFileItem.
  • headerRowExists—Enter true if your file has a header row, false if it does not.
  • columnDelimiter—Enter SPACE, TAB, COMMA, PIPE, or SEMICOLON.
  • textQualifier—Enter either SINGLE_QUOTE or DOUBLE_QUOTE.

Example: {"fileType":"xlsx","headerRowExists":"true","columnDelimiter":"","textQualifier":""}


Enter the 2-letter ("en") or 4-letter ("ar-il") specific locale if geocodeInput is in a language other than English. For more information about localization and specific language codes, see localization.


Context contains additional settings that affect task execution. AnalyzeGeocodeInput has the following two settings:

  • Extent (extent)—A bounding box that defines the analysis area. Only those points in inputLayer that intersect the bounding box are analyzed.
  • Output Spatial Reference (outSR)—The output features are projected into the output spatial reference.

"extent" : {extent}
"outSR" : {spatial reference}


When you submit a request, the service assigns a unique job ID for the transaction.

"jobId": "<unique job identifier>",
"jobStatus": "<job status>"

After the initial request is submitted, you can use jobId to periodically check the status of the job and messages as described in Checking job status. Once the job has successfully completed, use jobId to retrieve the results. To track the status, you can make a request in the following form:

http://<analysis url>/AnalyzeGeocodeInput/jobs/<jobId>

Access results

When the status of the job request is esriJobSucceded, you can access the results of the analysis by making a request in the following form:

http://<analysis url>/AnalyzeGeocodeInput/jobs/<jobId>/results/<output parameter name>?token=<your token>&f=json




geocodeParameters is a JSON that contains information about the file, field info, and a suggested field mapping.

Request example:
"http://<analysis url>/AnalyzeGeocodeInput/jobs/<jobId>/results/geocodeParameters"}

The result contains the geocodeParameters JSON, which is the first input into the BatchGeocode tool.

  • {
     "paramName": "geocodeParameters",
     "dataType": "GPString",
     "value": {
      "field_info": "[('ObjectID', 'TEXT', 255), ('Address', 'TEXT', 255)]",
      "column_names": "",
      "file_type": "xlsx",
      "column_delimiter": "",
      "text_qualifier": "",
      "field_mapping": "[['ObjectID', 'OBJECTID'], ['Address', 'Address']]",
      "header_row_exists": true