FRAMES | NO FRAMES Description | Parameters | Examples | Response
Geocode Service
URL http://<catalog-url>/<serviceName>/GeocodeServer
Supported Operations Find Address Candidates  Reverse Geocode  
Parent Resource Catalog

Description

Geocoding is the process of assigning a location, usually in the form of coordinate values (points), to an address by comparing the descriptive location elements in the address to those present in the reference material. Addresses come in many forms, ranging from the common address format of a house number followed by the street name and succeeding information to other location descriptions such as postal zone or census tract. An address includes any type of information that distinguishes a place.

The REST API geocode service resource represents a geocode (locator) service. The resource provides basic information associated with the geocode service such as the service description, the address fields, spatial reference and locator properties.

The geocode service resource supports two operations:

Resource Hierarchy

Geocode Service

Parameters

Parameter Details
f Description: The response format. The default response format is html.

Values: html | json

Example Usage

Example 1: URL for the "ESRI_Geocode_USA" geocode service on sampleserver1.

http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Locators/ESRI_Geocode_USA/GeocodeServer

JSON Response Syntax

{
"currentVersion": <currentVersion>, //Added at 10.0 SP1
"serviceDescription" : "<serviceDescription>",
"addressFields": [
  {"name" : "<fieldName1>", "alias" : "<fieldAlias1>", "required" : <true | false>, "type" : "<fieldType1>"},
  {"name" : "<fieldName2>", "alias" : "<fieldAlias2>", "required" : <true | false>, "type" : "<fieldType2>"}
], 
//from 10.0 onward - if the locator supports geocoding using single line address
"singleLineAddressField" : 
{"name" : "<fieldName1>", "alias" : "<fieldAlias1>", "required" : <true | false>, "type" : "<fieldType1>"},
"candidateFields": [
  {"name" : "<fieldName1>", "alias" : "<fieldAlias1>", "type" : "<fieldType1>"},
  {"name" : "<fieldName2>", "alias" : "<fieldAlias2>", "type" : "<fieldType2>"}
],
"intersectionCandidateFields": [
  {"name" : "<fieldName1>", "alias" : "<fieldAlias1>", "type" : "<fieldType1>"},
  {"name" : "<fieldName2>", "alias" : "<fieldAlias2>", "type" : "<fieldType2>"}
],
"spatialReference" : <spatialReference>,
"locatorProperties": {
  "<key1>" : "<value1>",
  "<key2>" : "<value2>"
}
}

JSON Response Example

{
"currentVersion": 10.01,
"serviceDescription" : "Test Geocode Service Description",
"addressFields": [
{"name" : "Street", "alias" : "Street or Intersection", "required" : true, "type" : "esriFieldTypeString"},
{"name" : "Zone", "alias" : "Zip Code", "required" : false, "type" : "esriFieldTypeString"}
],
"singleLineAddressField" : {"name" : "Single Line Input","type" : "esriFieldTypeString","alias" : "Full Address","required" : false}
,
"candidateFields": [
{"name" : "Score", "alias" : "", "type" : "esriFieldTypeSmallInteger"},
{"name" : "StreetName", "alias" : "", "type" : "esriFieldTypeString"}
],
"intersectionCandidateFields": [
{"name" : "Score", "alias" : "", "type" : "esriFieldTypeSmallInteger"},
{"name" : "StreetName1", "alias" : "", "type" : "esriFieldTypeString"}
],
"spatialReference" : {"wkid" : 4326},
"locatorProperties": {
"MinimumCandidateScore" : "10",
"SideOffsetUnits" : "ReferenceDataUnits",
"SpellingSensitivity" : "80",
"MinimumMatchScore" : "60",
"IntersectionConnectors" : "& | @"
}
}