FRAMES | NO FRAMES Description | Parameters | Examples | Response
Find Address Candidates (Operation)
URL http://<geocodeservice-url>/findAddressCandidates
Parent Resource Geocode Service

Description

The findAddressCandidates operation is performed on a geocode service resource. The result of this operation is a resource representing the list of address candidates. This resource provides information about candidates including the address, location, and score.

Locators published using ArcGIS Server 10 or above support the single line address field for the findAddressCandidates operation.

New in 10.1: searchExtent parameter is supported.

You can provide arguments to the findAddressCandidates operation as query parameters defined in the parameters table below.

Parameters

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

Values: html | json | kmz
<addressField1>, <addressField2>, ... Description: The various address fields accepted by the corresponding geocode service. These fields are listed in the addressFields property of the JSON representation associated geocode service resource.

Example: Suppose that addressFields of a geocode service resource includes fields with the following names: Street, City, State, and Zone. If you want to perform the findAddressCandidates operation by providing values for the Street and Zone, you do so by setting the query parameters as such: Street=380+New+York+St&Zone=92373
outFields Description: The list of fields to be included in the returned resultset. This list is a comma delimited list of field names. If you specify the shape field in the list of return fields, it is ignored. For non-intersection addresses you can specify the candidate fields from the geocode service resource. For intersection addresses you can specify the intersection candidate fields from the geocode service resource.

Example: outFields=StreetName,StreetType

//New at 10.0
outFields = *, returns all fields.
outSR Description: The well-known ID of the spatial reference or a spatial reference json object for the returned address candidates. For a list of valid WKID values, see Projected coordinate Systems and Geographic coordinate Systems.
This parameter was added at 10.
searchExtent optional
//This parameter was added at 10.1

Description: The spatial extent (bounding box) to be used in geocoding. The response will return only the candidates that are within this spatial extent. Unless the spatialReference is included in the searchExtent, the coordinates are assumed to be in the spatial reference of the locator.

This is supported only for services that use locators created using ArcGIS 10.0 or later.

Syntax: {<envelope>}

Simple Syntax: <xmin>, <ymin>, <xmax>, <ymax>

Example 1: searchExtent=
{
"xmin" : -109.55, "ymin" : 25.76, "xmax" : -86.39, "ymax" : 49.94,
"spatialReference" : {"wkid" : 4326}
}

Example 2: searchExtent=-104,35.6,-94.32,41


The searchExtent coordinates should always use a period as the decimal separator even in countries where traditionally a comma is used.

Example Usage

Example 1: Geocode an address (380 New York Street, Redlands, CA 92373):

http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Locators/ESRI_Geocode_USA/GeocodeServer/findAddressCandidates?Address=380+New+York+Street&City=Redlands&State=CA&Zip=92373

JSON Response Syntax

{
"spatialReference" :
<spatialReference>, //Added in 10
"candidates" : [
{
"address" : "<address1>",
"location" : { <point1> },
"score" : <score1>,
"attributes" : {<fieldName1> : <value11>, <fieldName2> : <value12>}
},
{
"address" : "<address2>",
"location" : { <point2> },
"score" : <score2>,
"attributes" : {<fieldName1> : <value21>, <fieldName2> : <value22>}
}
]
}

JSON Response Example

{
"spatialReference": {"wkid" : 4326},
"candidates" : [
  {
  "address" : "1 MASON ST",
  "location" : { "x" : -122.408951, "y" : 37.783206 },
  "score" : 75,
  "attributes" : {"StreetName" : "MASON", "StreetType" : "ST"}
  },
  {
  "address" : "49 MASON ST",
  "location" : { "x" : -122.408986, "y" : 37.783460 },
  "score" : 27,
  "attributes" : {"StreetName" : "MASON", "StreetType" : "ST"}
  } 	
]
}