/findAddressCandidates

GETGETPOST
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates

The findAddressCandidates operation geocodes one location per request; the input address can be combined into a single input field or divided among multiple parameters.

Parameters

NameRequiredTypeDefaultDescription
string

The request response format, either json or pjson

string

An access token with the required privileges.

string

The place to be geocoded.

string

The first line of a street address.

string

The second line of a street address.

string

The third line of a street address.

string

A neighborhood; a subdivision of a city.

string

A city or municipality.

string

A county.

string

Typically a state or a province.

string

The standard postal code for an address.

string

The postal code extension.

string

The value that represents a country.

string

The magicKey value returned from a suggest request.

string | envelope

The set of bounding box coordinates that limits the search area.

string | point

The origin point used to favor geocoding candidates based on their proximity to the location.

string

The place or address type that can be used to filter results.

number

4326

The spatial reference of the x and y coordinates returned in a response.

string | *

The list of fields to be returned within the attributes object of a response.

number

50

The maximum number of locations to be returned in a response.

boolean

false

Specifies whether the results of a request are stored.

boolean

true

Returns a match when the input house number is outside the street's house number range.

string

rooftop

Specifies whether output geometry of PointAddress and Subaddress matches should be the rooftop point or street entrance.

string

The language in which results are returned.

string

Limits the returned candidates to the specified country or countries.

string

Returns the specified street or city name in output fields.

string

Returns a collection of places that are related to a geocoded location.

number

1

Defines the index number of the first entry in a searchWithin collection to be returned in the response. Used for paging through large result sets.

number

50

Defines the number of searchWithin collection results to be returned in each page. Used for paging through large result sets.

string

Input parameter which allows searching for an ID value representing an address or place.

boolean

false

Returns detailed information about how each part of an input string was processed by the ArcGIS Geocoding service.

Required parameters

f

The response format.

Use dark colors for code blocksCopy
1
f=json

token

An access token with the required privileges.

  • ArcGIS Location Platform: premium:user:geocode:temporary or premium:user:geocode:stored
  • ArcGIS Online: premium:user:geocode or premium:user:geocode:stored
Use dark colors for code blocksCopy
1
token=<ACCESS_TOKEN>

Learn more about access tokens and privileges in the Security and authentication developer guide.

Optional parameters

SingleLine

The SingleLine parameter specifies the location to be geocoded. This can be a street address, place-name, postal code, or POI. The input address components need to be formatted as a single string.

Example

Use dark colors for code blocksCopy
1
SingleLine=380 New York St, Redlands, California 92373

address

A string that represents the first line of a street address. In most cases, this field will be used for street name and house number input, but it can also be used to input building name or place-name.

Example of address field input in the United States

Use dark colors for code blocksCopy
1
address=380 New York Street

Example of address field input in Mexico

Use dark colors for code blocksCopy
1
address=Avenida Revolucion 8208

address2

A string that represents the second line of a street address. This can include street name/house number, building name, place-name, or subunit.

Example address2 field input

Use dark colors for code blocksCopy
1
address2=Beetham Tower

address3

A string that represents the third line of a street address. This can include street name/house number, building name, place-name, or subunit.

Example address3 field input

Use dark colors for code blocksCopy
1
address3=Suite 4208

neighborhood

The smallest administrative division associated with an address, typically, a neighborhood or a section of a larger populated place. A neighborhood is a subdivision of a city.

Example of a neighborhood in Mexico (colonia)

Use dark colors for code blocksCopy
1
neighborhood=Herrera

city

The next largest administrative division associated with an address, typically, a city or municipality. A city is a subdivision of a subregion or a region.

Example of a city in the U.S.

Use dark colors for code blocksCopy
1
city=Los Angeles

Example of a city in Mexico

Use dark colors for code blocksCopy
1
city=Tijuana

subregion

The next largest administrative division associated with an address. Depending on the country, a subregion can represent a county, state, or province.

Example of a subregion (department) in France

Use dark colors for code blocksCopy
1
subregion=Vienne

region

The largest administrative division associated with an address, typically, a state or province.

Example of a region in the U.S. (state)

Use dark colors for code blocksCopy
1
region=Florida

Example of a region in Mexico (estado)

Use dark colors for code blocksCopy
1
region=Baja California

postal

The standard postal code for an address, typically, a three– to six-digit alphanumeric code.

Example

Use dark colors for code blocksCopy
1
postal=92373

postalExt

A postal code extension, such as the United States Postal Service ZIP+4 code, provides finer resolution or higher accuracy when also passing postal .

Example

Use dark colors for code blocksCopy
1
postalExt=1112

countryCode

A value representing the country. Providing this value increases geocoding speed. Acceptable values include the full country name in English or the official language of the country, the two-character country code, or the three-character country code. A list of supported countries and codes is available in the Service data topic.

Example

Use dark colors for code blocksCopy
1
countryCode=USA

magicKey

The findAddressCandidates operation retrieves results quicker when you pass in valid SingleLine and magicKey values than when you don't pass in magicKey . However, to get these advantages, you need to make a prior request to suggest , which provides a magicKey . This may or may not be relevant to your workflow.

The suggest operation is often called on to improve the user experience of search boxes by analyzing partial text and providing complete names of places, addresses, points of interest, and so on. For instance, typing Mbu into a search box produces Mbuji-Mayi, Democratic Republic of the Congo as a suggestion, so the user doesn't need to type the complete name.

Looking at the suggestion process from another perspective, as the user types, the suggest operation performs a text search, which is a redundant part of the overall search that the findAddressCandidates operation can also perform. The user chooses a place-name or type—narrowing the results to a specific record. The results from suggest include text and magicKey values that contain the information the user chose; passing these values from suggest into findAddressCandidates results in faster and more accurate operations.

In summary, using the magicKey parameter in findAddressCandidates is a two-step process:

  • Make a request to suggest . The response includes text and magicKey properties.
  • Make a request to findAddressCandidates and pass in the text and magicKey values returned from suggest as the SingleLine and magicKey input parameters, respectively. The magicKey parameter will not function correctly if passed alone. Both magicKey and SingleLine must be included in a findAddressCandidates request so the output matches the selected suggestion.

Example

Use dark colors for code blocksCopy
1
magicKey=JS91CYhQDS5vDPhvSMyGZby0YFbaUDoaM5bHMoFF

searchExtent

A set of bounding box coordinates that limit the search area to a specific region. This is especially useful for applications in which a user will search for places and addresses within the current map extent.

You can specify the spatial reference of the searchExtent coordinates, which is necessary if the map spatial reference is different than that of the ArcGIS Geocoding service; otherwise, the spatial reference of the coordinates is assumed to be the same as that of the ArcGIS Geocoding service.

The input can either be a comma-separated list of coordinates defining the bounding box or a JSON envelope object. The spatial reference of the bounding box coordinates can be included if an envelope object is used.

Refer to the Search within an extent section below for more details about using searchExtent .

Example without a spatial reference

Use dark colors for code blocksCopy
1
searchExtent=-104,35.6,-94.32,41

Example with a spatial reference

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
searchExtent=
{
    "xmin": -13052769,
    "ymin": 3951172,
    "xmax": -13019630,
    "ymax": 3978490,
    "spatialReference": {
        "wkid": 3395
    }
}

location

The location parameter defines an origin point that is used to prefer or boost geocoding candidates based on their proximity to the location. Candidates near the location are prioritized relative to those farther away. This is useful in mobile applications in which a user wants to search for places in the vicinity of their current GPS location, or in mapping applications in which users want to search for places near the center of the map.

The location can be represented with a simple comma-separated syntax (x,y), or as a JSON point object. If the comma-separated syntax is used, the spatial reference of the coordinates must be WGS84; otherwise, the spatial reference of the point coordinates can be defined in the JSON object.

Example using simple syntax (WGS84)

Use dark colors for code blocksCopy
1
location=-117.196,34.056

JSON example with a spatial reference

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
location=
{
    "x": -13046165.572,
    "y": 4036389.847,
    "spatialReference": {
        "wkid": 102100
    }
}

category

A place or address type that can be used to filter findAddressCandidates results. The parameter supports input of single category values or multiple comma-separated values. The category parameter can be passed in a request with the SingleLine or address parameters. It can also be passed in a request on its own without the singleline or address parameters. See Category filtering for details about the category parameter.

Example of category filtering with a single category

Use dark colors for code blocksCopy
1
category=Address

Example of category filtering with multiple categories

Use dark colors for code blocksCopy
1
category=Address,Postal

outSR

The spatial reference of the x,y coordinates returned by a geocode request. This is useful for applications using a map with a spatial reference different than that of the geocode service.

The spatial reference can be specified as either a well-known ID (WKID) or as a JSON spatial reference object. If outSR is not specified, the spatial reference of the output locations is the same as that of the service. The ArcGIS Geocoding service spatial reference is WGS84 (WKID = 4326).

For a list of valid WKID values, see Projected coordinate systems and Geographic coordinate systems.

Example (102100 is the WKID for the Web Mercator projection)

Use dark colors for code blocksCopy
1
outSR=102100

outFields

The list of fields to be returned within the attributes object of the response. Descriptions for each of these fields are available in the Output fields section of this document.

The address , location (x,y coordinates of the match location), score , extent , and spatialReference objects are returned in the response by default. If the outFields parameter is excluded from the request, or if it is included but no fields are specified, the attributes object in the corresponding response is blank.

Example that returns all output fields

Use dark colors for code blocksCopy
1
outFields=*

Example that returns the specified fields only

Use dark colors for code blocksCopy
1
outFields=AddNum,StName,City

maxLocations

The maximum number of locations to be returned by a search, up to the maximum number allowed by the service. If not specified, all matching candidates up to the service maximum are returned.

The ArcGIS Geocoding service allows up to 50 candidates to be returned for a single request.

Example

Use dark colors for code blocksCopy
1
maxLocations=10

forStorage

The forStorage parameter specifies whether the results of the operation will be persisted. The default value is false , which indicates the results of the operation can't be stored, but they can be temporarily displayed on a map, for instance. If you store the results, in a database, for example, you need to set this parameter to true .

Applications are contractually prohibited from storing the results of geocoding transactions unless they make the request by passing the forStorage parameter with a value of true and the token parameter with a valid token. Instructions for composing a request with a valid token are provided in Security and authentication.

To learn more about free and paid geocoding operations, see details about stored versus not stored geocoding.

Example

Use dark colors for code blocksCopy
1
forStorage=true

matchOutOfRange

A Boolean that specifies whether StreetAddress matches should be returned even when the input house number is outside of the house number range defined for the input street. Out-of-range matches have =StreetAddressExt . The geometry of such matches is a point corresponding to the end of the street segment where the range value is closest to the input house number. If matchOutOfRange is not specified in a request, its value is set to true by default.

With matchOutOfRange , better spatial accuracy is provided for inexact street address searches. Most street segments are assigned house number ranges. For example, Main Street may include house numbers from 2–100 on one side of the street and 1–99 on the other. A user may search for a house number that is not within this range, such as 109 Main Street. If matchOutOfRange=false is passed in this request, the geocode service will return a StreetName-level match to Main Street, with geometry corresponding to the centroid of a street segment that most closely matches the input values. StreetName matches can be ambiguous because there may be multiple street segments with the same name that equally match the input. However, if matchOutOfRange=true , in this case, a more precise geometry is returned to the specific side of the segment of Main Street with house number range 1–99.

Example

Use dark colors for code blocksCopy
1
matchOutOfRange=false

locationType

The locationType parameter specifies whether the output geometry of PointAddress and Subaddress matches should be the rooftop point or street entrance location. Valid values are rooftop and street . The default value is rooftop .

Geocode results include one geometry object (the location object) that defines the location of the address, as well as two sets of x,y coordinate values within the attributes object: X /Y , and DisplayX /DisplayY . In most cases, for geocode results with =PointAddress or Subaddress , the X /Y attribute values describe the coordinates of the address along the street, while the DisplayX /DisplayY values describe the rooftop, or building centroid, coordinates. By default, the geometry returned for geocode results represents the rooftop location of the address (if the rooftop location is available in the source data). This is useful for most spatial analysis and map display purposes. However, for routing scenarios, it may be desirable to use the street location because the rooftop location of some addresses may be offset from a street by a large distance. For these cases, the locationType parameter can be used to specify that the street entrance geometry should be returned.

It is important to note that locationType is limited by the address data sources used by the ArcGIS Geocoding service. Not all PointAddress and Subaddress features include rooftop and street location coordinates. For some addresses, only a rooftop location is available; for others, only a street location is provided by the data source. For cases such as this, the locationType parameter may not function as expected. For example, if only rooftop location coordinates are available for an address, the rooftop geometry will be returned for the geocoded address even when locationType=street is requested.

Example

Use dark colors for code blocksCopy
1
locationType=street

langCode

The langCode parameter sets the language in which geocode results are returned. Addresses and places in many countries are available in more than one language; in these cases, the langCode parameter can be used to specify which language should be used for results returned by the findAddressCandidates operation. This is useful for ensuring that results are returned in the expected language. For example, a web application could be designed to get the browser language and pass it as the langCode parameter value in a findAddressCandidates request.

See the table of supported countries for valid language code values in each country. The Supported Language Codes column provides the valid input values for the langCode parameter. Full language names cannot be used with the langCode parameter. Only one language code value can be included for the langCode parameter in a findAddressCandidates request.

If the langCode parameter isn't included in a request, or if it is included but there are no matching features with the input language code, the resultant match is returned in the language code of the primary matched component from the input search string. Typically, this is either place-name or street name, depending on the search string.

Similarly, when there are multiple supported languages for a country, it doesn't mean that every address in the country is available in each of the languages. It may be the case that addresses are available in multiple languages for only one region of the country, or that each language is exclusive to a different region and there is no overlap. The following are some examples:

  • French, German, and Italian are listed as supported languages for Switzerland. However, there is no overlap between the languages for addresses in most regions of the country. For instance, in the city of Geneva, only French addresses are available, while German is the only language used for addresses in the city of Bern.
  • In Belgium, where three languages are supported (Dutch, French, and German), addresses are available in the city of Brussels in both Dutch and French. However, in the majority of the country, only a single language is used for addresses.
  • In Greece, there is complete address coverage in both Greek and transliterated Greek languages (Greek words represented with Latin characters).

Due to variability of language coverage, the following logic is used to handle the different scenarios that may be encountered.

ScenarioResultExample

Only one language is supported for an address, and no langCode value is specified in the findAddressCandidates request.

Candidate is returned in the supported language.

Input (address in Geneva, Switzerland):

  • Avenue Appia 20 1202 Geneva
  • langCode=

Output: Avenue Appia 20, 1202, Pregny-Chambésy, Genève

Only one language is supported for an address, and an unsupported language is specified for the langCode parameter in the findAddressCandidates request.

Candidate is returned in the supported language.

Input (address in Geneva, Switzerland):

  • Avenue Appia 20 1202 Geneva
  • langCode=zh (Chinese)

Output: Avenue Appia 20, 1202, Pregny-Chambésy, Genève

Multiple languages are supported for an address, and no langCode value is specified in the findAddressCandidates request.

Candidate is returned in the language of the primary matched component from the input string (street name or place-name).

Input (address in Brussels, Belgium):

  • Wetstraat 175 Brussel
  • langCode=

Output: Wetstraat 175, 1040, Brussel

Multiple languages are supported for an address, and an unsupported language is specified for the langCode parameter in the findAddressCandidates request.

Candidate is returned in the language of the primary matched component from the input string (street name or place-name).

Input (address in Athens, Greece):

  • Dionysiou Areopagitou 15, 11742, Athens
  • langCode=ru (Russian)

Output: Dionysiou Areopagitou 15, 117 42, Athens

Multiple languages are supported for an address, and a supported language is specified for the langCode parameter in the findAddressCandidates request.

Candidate is returned in the requested language.

Input (address in Athens, Greece):

  • Dionysiou Areopagitou 15, 11742, Athens
  • langCode=el (Greek)

Output: Διονυσίου Αρεοπαγίτου 15, 117 42, Αθήνα

Example

Use dark colors for code blocksCopy
1
langCode=fr

sourceCountry

The sourceCountry parameter limits the candidates returned by the findAddressCandidates operation to the specified country or countries. For example, if sourceCountry=USA is included in the request, it is assumed that the address is in the United States, so only matching addresses in the U.S. are returned. Using this parameter prevents potential unexpected results in other countries for ambiguous searches.

Acceptable values include the three-character country code. You can specify multiple country codes to limit results to more than one country.

A list of supported countries and codes is available in Service data.

Example: Single country

Use dark colors for code blocksCopy
1
sourceCountry=USA

Example: Multiple countries

Use dark colors for code blocksCopy
1
sourceCountry=FRA,DEU,ESP

preferredLabelValues

The preferredLabelValues parameter allows simple configuration of output fields returned in a response from the ArcGIS Geocoding service by specifying which address component values should be included in output fields. The parameter supports a single value or a comma-delimited collection of values as input. If the parameter is blank or excluded from a request, default address label formats will be used.

A particular address may have multiple city names associated with it. In the United States, for example, all addresses have a ZIP Code (postal code) assigned to them. Each ZIP Code has one or more associated locality names, which are known as postal cities. There is always one primary postal city value for each ZIP Code. ZIP Codes typically have no set boundaries, and the primary postal city name for the ZIP Code that is assigned to an address may be different than the name of the local city that the address is within.

For addresses in the United States, the ArcGIS Geocoding service includes the primary postal city in response output fields by default. As an example, postal code 45420 in Ohio has the primary postal city value Dayton. Addresses in the city of Kettering are assigned this postal code. It means that the default output fields for all geocoded addresses with postal code 45420, even those within the city of Kettering, will include Dayton as the city. To illustrate, if a user searches for 2109 E Dorothy Ln, OH, 45420 , the default match label returned in the response is 2109 E Dorothy Ln, Dayton, Ohio, 45420, even though the address is within the Kettering city limits.

Some organizations may prefer to include the local city name in the response instead of the postal city. The preferredLabelValues parameter can be used for this purpose. For the previous example, if preferredLabelValues=localCity is included in the request, the output match label in the response will be 2109 E Dorothy Ln, Kettering, Ohio, 45420.

Similarly, streets may be known by multiple names. This is especially true with highways. For example, Pearblossom Hwy in California, which is the primary name, is also known as CA-138. The ArcGIS Geocoding service allows matching to addresses using either name as input, and by default will return the name that was matched to in the response.

Some organizations may prefer that the primary street name be returned in the response even if a user searches for an alternate street name, and they can use the preferredLabelValues parameter to accomplish this. In other words, if a user searches for CA-138, Pearblossom, CA , and preferredLabelValues=primaryStreet is included in the request, the match label returned in the response is Pearblossom Hwy, Pearblossom, California, 93553.

See the following table for supported parameter values.

Parameter valueDescription

postalCity

Include the primary postal city value in geocoding response output fields, even if it is different than the city name in the geocoding request. This is the primary name assigned to the postal code of the address.

localCity

Include the primary local city name in geocoding response output fields, even if it is different than the city name in the geocoding request. This is the name of the city that the address is within, and may be different than the postal city.

matchedCity

If the input city name in a geocoding request matches any of the local city or postal city names associated with an address, include the matched value in geocoding response output fields. If a city name is not included in the input, or is included but doesn't match to anything, default address formats will be used.

primaryStreet

Include the primary street name in geocoding response output fields, even if it is different than the street name in the geocoding request.

matchedStreet

If the input street name in a geocoding request matches any of the supported street names assigned to an address, include the matched value in geocoding response output fields.

Here are additional details about the preferredLabelValues parameter:

  • The preferredLabelValues parameter takes a comma-delimited collection of values as input.
  • The parameter values correspond to two groups—a City group and a Street group, indicated by the suffix of the value name. The postalCity , localCity , and matchedCity values are part of the City group. The primaryStreet and matchedStreet values are part of the Street group.
  • A geocode request can include one City value and one Street value—for instance: preferredLabelValues=primaryStreet,postalCity .
  • A request can only include one value per group. In other words, a request with preferredLabelValues=matchedCity,postalCity is invalid.

Example: Single label value

Use dark colors for code blocksCopy
1
preferredLabelValues=matchedCity

Example: Multiple label values

Use dark colors for code blocksCopy
1
preferredLabelValues=matchedCity,primaryStreet

searchWithin

The searchWithin parameter is used to specify the feature types for a collection of places that should be returned for a geocoded object. For example, searchWithin may be used to return all addresses that exist within a postal code, or all businesses located at a particular address.

Collections can be returned for geocoded PointAddress and PostalExt records only.

  • For geocoded PointAddress records, collections of Subaddresses or POIs (or both) are supported.
  • For geocoded PostalExt records, collections of PointAddresses, Subaddresses, or POIs (or any combination of these) are supported.

The searchWithin parameter also supports pagination. Because there may be hundreds or thousands of places that exist at or within a geocoded location, the searchWithin parameter is used along with the start and num parameters to break up large collections into manageable result sets, or pages, of 50 or fewer candidates. This is accomplished by passing consecutive requests to the ArcGIS Geocoding service with different start values.

To support pagination, the JSON response includes the following properties at the end of the response when a collection is returned for a searchWithin request:

PropertyDescription

total

The total count of candidates in the collection, including the geocoded object.

start

The value that was passed in the request for the start parameter.

num

The number of candidates in the page.

nextStart

The value that should be used for the start parameter in the subsequent findAddressCandidates request.

If searchWithin is included in a findAddressCandidates request, the request must also include a valid token; otherwise the request fails with an error.

See the following table for supported parameter values.

Parameter valueDescription

PointAddress

Return all records of type PointAddress which are associated with a geocoded object of type PostalExt.

Subaddress

Return all records of type Subaddress which are associated with a geocoded object of type PostalExt or type PointAddress.

POI

Return all records of type POI which are associated with a geocoded object of type PostalExt or type PointAddress.

Example: Single feature type

Use dark colors for code blocksCopy
1
searchWithin=POI

Example: Multiple feature types

Use dark colors for code blocksCopy
1
searchWithin=PointAddress,Subaddress,POI

start

The start parameter is used along with the searchWithin and num parameters to page through large result sets of more than 50 candidates. It defines the result number to be returned as the first candidate in a page. The default value of start is 1.

The start parameter only functions when included in a request along with the searchWithin parameter.

Example

Use dark colors for code blocksCopy
1
start=51

num

The num parameter is used along with the searchWithin and Start parameters to page through large result sets of more than 50 candidates. It defines the number of candidates to be included in each page. The default value of num is 50. Valid values include any integer between 1 and 50. If a value larger than 50 is specified, no more than 50 candidates are returned in the response.

The num parameter only functions when included in a request along with the searchWithin parameter.

Example

Use dark colors for code blocksCopy
1
num=20

matchID

The matchID parameter allows you to search for an ID string value that represents an address or place. MatchID is also an output field which is available in a findAddressCandidates response. The MatchID value can be obtained from a findAddressCandidates response and then passed in a request at a later time. In most cases the MatchID value for a particular address will be constant across releases of the ArcGIS Geocoding service.

Example

Use dark colors for code blocksCopy
1
matchID=AQFV9QAAmeQBAJUBBAAAAAAMD05FVyBZT1JLIFNUUkVFVBUDMzgwZgNFTkc

returnMatchNarrative

The returnMatchNarrative parameter is used to return detailed information about how a geocoding result was obtained by describing the way that each portion of an input string in a findAddressCandidates request was processed, or classified, by the ArcGIS Geocoding service. This information is included in the findAddressCandidates response as an additional JSON object called match-narrative.

To illustrate the type of information that is provided by returnMatchNarrative, if "380 New York Street, Redlands" is searched for, the match-narrative object describes which part of the input was matched as house number ("380"), which part was matched as street name ("New York"), and so on.

Within the match-narrative object each part of the input search string is represented with a sub-object, the order of which corresponds to that of the input parts. Each sub-object includes the following properties:

PropertyDescription

field

The address component that the input part was matched to. For example, in "380 New York Street, Redlands", "380" is matched as house number; the field value for this part is HouseNUmber:

"field": "HouseNumber"

input

The part of the input string that is being described. In the "380 New York Street, Redlands" example, this would be the input value for "380":

"input": "380"

datum

The value in the ArcGIS Geocoding service reference data that the input part matched to. In the "380 New York Street, Redlands" example, this would be the datum value for "380":

"datum": "380"

narrative-code

A code that describes how the input part was matched. In the "380 New York Street, Redlands" example, this would be the narrative-code value for "380":

"narrative-code": "cm"

narrative-desc

A more detailed description of how the input part was matched. In the "380 New York Street, Redlands" example, this would be the narrative-desc value for "380":

"narrative-desc": "classified+matched"

This is how the complete match-narrative sub-object for "380" in "380 New York Street, Redlands" would appear:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
{
  "field": "HouseNumber",
  "input": "380",
  "datum": "380",
  "narrative-code": "cm",
  "narrative-desc": "classified+matched"
}

The following table provides descriptions of the possible values for the narrative-code and narrative-desc properties.

narrative-codenarrative-descDescriptionExample

c

classified

Input word or part was recognized as an address value from the reference data, an alias, or an indicator of some kind.

m

matched

Input word or part was matched to an address value in the reference data.

i

inexact

Input word or part is spelled differently than what it matched to.

Input word "Avanue" matches to reference data street type value "Avenue".

p

partial

The input part matched to a portion of a value in the reference data.

Input part "110356" partially matches to reference data postal code value "110350"

s

splitting

Indicates that a match was made to a value in the reference data by splitting one word from the input into multiple words, or by concatenating multiple words from the input into a single word.

Input word "Mountainview" matches to street name value "Mountain View" in the reference data.

a

aliased

The input part matched to an alias of a reference data value.

Input word "Boulevard" matches as an alias of reference data street type value "Blvd".

r

repositioned

Indicates that the input word was matched to a value in the reference data but in the wrong part of the overall address.

"North" is positioned as a prefix directional in input string "North Main Street" but matches to reference data value "Main Street North", which is a suffix directional.

d

different

Indicates that the input part was recognized as a particular address component but matched to a different reference data value for that component.

Input word "Street" matched to reference data street type value "Road".

n

nearby

Indicates that the input part matched to a postal code or administrative zone which is adjacent to the postal or zone that the geocoded address is actually within.

Input value "92026" matched to adjacent postal code "92027".

e

extrapolated

Indicates that the input part matched outside of the house number range for a StreetAddress record in the reference data.

Input value "280" matches to house number range "200-240" in the reference data.

Example

Use dark colors for code blocksCopy
1
returnMatchNarrative=true

Response status

StatusMeaningDescriptionSchema
200
OK

A successful response for a /findAddressCandidates request.

Inline

400
Bad request

Invalid query parameters. Learn more in Service output.

Error

403
Forbidden

The required paramter token is valid but does not have permission to access the service. Learn more in Service output.

Error

5XX
Unknown

An error occured on the server. Learn more in Service output.

Error

Go to Service output for extended codes.

Response details

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

{
  "spatialReference": {
      "wkid": "<spatialReference>",
      "latestWkid": "<spatialReference>"
  },
  "candidates": [
      {
          "address":" <address>",
          "location": {
              "x": "<longitude>",
              "y":" <latitude>"
          },
          "score": "<score>",
          "attributes": {},
          "extent": {
              "xmin": "<minX>",
              "ymin": "<minY>",
              "xmax": "<maxX>",
              "ymax": "<maxY>"
          }
      }
  ]
}

Examples

Input address examples

Search for a street address

You can pass the address components in a single parameter or separated into multiple parameters. Examples of each are shown. Note that in each case, the JSON response is the same for both the single- and multiple-parameter requests. See Match accuracy for more information about obtaining optimal results for address searches.

Single-field

Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?SingleLine=380 New York Street, Redlands, CA 92373&category=&outFields=*&forStorage=false&f=pjson&token=<ACCESS_TOKEN>

Multifield

Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?Address=380 new york st&City=redlands&Region=CA&Postal=92373&outFields=*&forStorage=false&f=pjson&token=<ACCESS_TOKEN>

Search for standard intersections

An intersection is where two streets cross each other. An intersection search consists of the intersecting street names plus the containing administrative division or postal code. For example, redlands blvd and new york st 92373 is a valid intersection search, as is redlands blvd & new york st redlands ca . For street intersection matches, Addr_type=StreetInt .

The valid intersection connectors can be found by looking up the IntersectionConnectors property from the service info URL: https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer?f=pjson.

Single-field

Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?f=pjson&outFields=Addr_type&forStorage=false&SingleLine=W Park Ave and Tennessee St, Redlands, CA&token=<ACCESS_TOKEN>

Multifield

Use dark colors for code blocksCopy
1
 GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?f=pjson&outFields=Addr_type&forStorage=false&Address=W Park Ave and Tennessee St&City=Redlands&Region=CA&token=<ACCESS_TOKEN>

Search for overpass intersections

You can also find intersections between streets that aren't physically connected. This includes cases where streets are separated by elevation, such as a highway overpass crossing over another street. An example of this is Pacific Hwy and W Washington St, San Diego, CA 92140 .

Single-field

Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?f=pjson&outFields=Addr_type&forStorage=false&SingleLine=Pacific Hwy and W Washington St, San Diego, CA 92140&token=<ACCESS_TOKEN>

Multifield

Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?f=pjson&outFields=Addr_type&forStorage=false&Address=Pacific Hwy and W Washington St&City=San Diego&Region=CA&Postal=92140&token=<ACCESS_TOKEN>

Search for disconnected intersections

An intersection can also be formed by two disconnected streets when one street ends close to another, such as a cul-de-sac or a dead end. In cases such as this, if the streets are within a certain distance of each other, the ArcGIS Geocoding service returns a StreetInt match when they are searched for. This near-intersection tolerance is currently 60 meters. An example of this type of near-intersection is Knowlton St and Turner Ct, Somerville, Massachusetts, USA .

Single-field

Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?f=pjson&outFields=Addr_type&forStorage=false&SingleLine=Knowlton St and Turner Ct, Somerville, Massachusetts, USA&token=<ACCESS_TOKEN>

Multifield

Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?f=pjson&outFields=Addr_type&forStorage=false&Address=Knowlton St and Turner Ct&City=Somerville&Region=Massachusetts&CountryCode=USA&token=<ACCESS_TOKEN>

Search for roundabout intersections

Another type of disconnected intersection supported by the ArcGIS Geocoding service occurs at roundabouts. A roundabout is formed when two or more streets connect to a circular roadway, which is often unnamed. The participating streets typically don't connect directly to each other, but when they are searched for and are within the near-intersection tolerance, the service returns a StreetInt match. An example of a roundabout intersection is Rue Jean Laurent & Avenue Jean Mermoz, Le Vésinet, FRA .

Single-field

Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?f=pjson&outFields=Addr_type&forStorage=false&SingleLine=Rue Jean Laurent and Avenue Jean Mermoz, Le Vésinet, FRA&token=<ACCESS_TOKEN>

Multifield

Use dark colors for code blocksCopy
1
GET https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?f=pjson&outFields=Addr_type&forStorage=false&Address=Rue Jean Laurent & Avenue Jean Mermoz&City=Le Vésinet&CountryCode=FRA&token=<ACCESS_TOKEN>

Find an ambiguous intersection

Sometimes there may be multiple possible matches for an intersection search. This typically occurs when divided roads cross each other. A divided road consists of two street segments separated by a median. In a scenario such as this, there could be up to four equivalent intersection matches consisting of the same street names at different locations. The ArcGIS Geocoding service uses an ambiguous intersection tolerance with such searches to remove redundant intersection candidates from the response. The ambiguous intersection tolerance is currently 30 meters. Specifically, if there are multiple intersection candidates with the same street names that are located in the same locality (meaning same neighborhood, city, postal code), and if they are within 30 meters of each other, the service returns only one of the candidates.

Single-field

Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?f=pjson&outFields=Addr_type,Nbrhd&forStorage=false&SingleLine=Cambie St and W King Edward Ave, Vancouver, British Columbia&token=<ACCESS_TOKEN>

Multifield

Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?f=pjson&outFields=Addr_type,Nbrhd&forStorage=false&Address=Cambie St and W King Edward Ave&City=Vancouver&Region=British Columbia&token=<ACCESS_TOKEN>

Search for POIs

A POI is a point location that can represent a cultural or geographic landmark, business, or administrative division. For example, you can find amusement parks, museums, schools, restaurants, hotels, gas stations, or other types of businesses or landmarks; geographic features, such as mountains, lakes, rivers, or deserts; or administrative places, such as neighborhoods, cities, states, counties, or countries. The findAddressCandidates operation supports geocoding POIs by name or by type. The supported types are listed in this table.

Find a business name

Single-field
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?SingleLine=starbucks sydney AUS&outFields=type,city,region&maxLocations=1&forStorage=false&f=pjson&token=<ACCESS_TOKEN>
Multifield
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?Address=starbucks&Neighborhood=&City=sydney&Subregion=&Region=&CountryCode=AUS&outFields=type,city,region&maxLocations=1&forStorage=false&f=pjson&token=<ACCESS_TOKEN>

Find a business type

Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?SingleLine=hotels orlando FL&outFields=type,city,region&forStorage=false&f=pjson&token=<ACCESS_TOKEN>

Find a business on a specific street

Single-field
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?singleLine=starbucks 5th ave san diego&langCode=&outFields=Place_Name,Place_addr,Phone,Type,Addr_type&forStorage=false&f=pjson&token=<ACCESS_TOKEN>
Multifield
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?address=starbucks&address2=5th ave&city=san diego&outFields=Place_Name,Place_addr,Phone,Type,Addr_type&forStorage=false&f=pjson&token=<ACCESS_TOKEN>

Search for administrative place names

The findAddressCandidates operation supports single-field and multifield searches for administrative place-names. This includes searches for neighborhoods, cities, counties, states, provinces, or countries. If a search for a city name results in multiple matches with the same name, the ArcGIS Geocoding service will sort the candidates in order of their relative importance to each other (as indicated by the value of the Rank output field), with priority generally based on population and capital status.

Find a city name

Single-field
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?SingleLine=San Francisco&forStorage=false&f=pjson&token=<ACCESS_TOKEN>
Multifield
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?address=San Francisco&f=pjson&token=<ACCESS_TOKEN>

Search for a city in a state

Single-field
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?SingleLine=oxford OH&forStorage=false&f=pjson&token=<ACCESS_TOKEN>
Multifield
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?address=Oxford&region=OH&f=pjson&token=<ACCESS_TOKEN>

Search for postal codes

The findAddressCandidates operation supports searches for postal codes and postal code extensions. When searching for postal codes, it is important to note that the same code can be valid in more than one country; for best results, it may be necessary to include additional information with the postal code, such as city or country.

Find a postal code

Single-field
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?SingleLine=20002 USA&forStorage=false&outFields=addr_type&f=pjson&token=<ACCESS_TOKEN>
Multifield
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?postal=20002&countryCode=USA&outFields=addr_type&f=pjson&token=<ACCESS_TOKEN>

Search for coordinates

The ArcGIS Geocoding service supports searches for coordinates. The output is a geometry point with a match address that is the same as the input coordinates. This is different than reverse geocoding, in which input x,y coordinates are resolved to a matching street address; see reverseGeocode for more information. The following types of coordinate search are supported:

  • x,y coordinates; x refers to longitude (east-west coordinates), and y refers to latitude (north-south coordinates)
  • Military Grid Reference System (MGRS) coordinates
  • United States National Grid (USNG) coordinates

Coordinates must be passed as the value for the SingleLine or Address field in the request. If the coordinates are included in the Address field, all other input fields, such as Address2 , City , Region , and Postal , must be empty.

Find MGRS / USNG coordinates

Single-field
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?f=pjson&outFields=Addr_type&maxLocations=1&forStorage=false&SingleLine=18SUH6789043210&token=<ACCESS_TOKEN>
Multifield
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?f=pjson&outFields=Addr_type&maxLocations=1&forStorage=false&Address=18SUH6789043210&token=<ACCESS_TOKEN>

Search for street blocks

The findAddressCandidates operation supports searches for a group of house numbers representing one or more city blocks. The Addr_type value returned for this type of search is StreetMidBlock. The location of such a feature is the approximated midpoint of the street segments that include the house numbers represented by the block number or block range. A StreetMidBlock match is more precise than a StreetName match, and less precise than a StreetAddress match.

Find a single block number

Single-field
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?SingleLine=100 block of New York St, Redlands, CA&outFields=Addr_type&f=pjson&token=<ACCESS_TOKEN>
Multifield
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?address=100 block of New York St&city=San Francisco&outFields=addr_type&f=pjson&token=<ACCESS_TOKEN>

Find a range of blocks

Single-field
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?SingleLine=200-500 block Taylor St, San Francisco&outFields=Addr_type&f=pjson&token=<ACCESS_TOKEN>
Multifield
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?address=200-500 block Taylor St&city=San Francisco&outFields=addr_type&f=pjson&token=<ACCESS_TOKEN>

Search for a street between two cross streets

The findAddressCandidates operation supports searching for a street between two intersecting cross streets. The Addr_type value returned for this type of search is StreetBetween. The location of such a feature is along the matched street at the midpoint between the cross streets. The precision of a StreetBetween match is greater than a StreetName match, less than a StreetAddress match, and equal to a StreetMidBlock match.

Find a street between two cross streets

Single-field
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?singleline=Conway Dr between Sheridan Ave and E El Norte Pkwy, Escondido, CA&outFields=Addr_type&f=pjson&token=<ACCESS_TOKEN>

Multifield

Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?address=Conway Dr between Sheridan Ave and E El Norte Pkwy&city=Escondido&region=CA&outFields=Addr_type&f=pjson&token=<ACCESS_TOKEN>

The findAddressCandidates operation allows you to specify individual output fields or return all output fields. The outFields parameter is used for this. If you want to return all supported output fields, set outFields=* ; if you only want to return the default output fields, outFields does not need to be passed in the request. If you want to return specific fields, pass the desired field names as comma-separated values, such as outFields=PlaceName,Type,City,Country , which returns the name, feature type, city, and country for a POI search.

Single-field

Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?singleLine=coffee shops austin&outFields=PlaceName,Type,City,Country&f=pjson&token=<ACCESS_TOKEN>

Specify the output spatial reference

By default, the ArcGIS Geocoding service returns candidate geometry in WGS84 coordinates (decimal degrees). You can specify a different spatial reference for output coordinates by using the outSR parameter. This is necessary if you have a mapping application in which you display geocoding candidates and the map spatial reference is not WGS84. For example, the ArcGIS.com basemaps use a Web Mercator spatial reference, with coordinates in meters. To display geocoding candidates correctly in such a map, you would need to set outSR=102100 , which is the well-known ID (WKID) of the Web Mercator spatial reference.

For a list of valid WKID values, see Projected coordinate systems and Geographic coordinate systems.

Single-field

Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?SingleLine=380 new york st redlands ca&outSR=102100&f=pjson&token=<ACCESS_TOKEN>

Multifield

Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?address=380 new york st&city=redlands&region=ca&outSR=102100&f=pjson&token=<ACCESS_TOKEN>

Specify the maximum number of candidates

The maxLocations parameter allows you to specify the maximum number of candidates to be returned by a search, up to the maximum number of candidates allowed by the ArcGIS Geocoding service. By default, the service allows up to 50 candidates to be returned for searches. As an example, if you set maxLocations=10 , findAddressCandidates will return the top 10 candidates for the search. If no value is specified for maxLocations , findAddressCandidates returns all matching candidates.

Single-field

Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?singleLine=starbucks in redlands&outFields=PlaceName,City,Country&maxLocations=2&f=pjson&token=<ACCESS_TOKEN>

Multifield

Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?address=starbucks&city=redlands&outFields=PlaceName,City,Country&maxLocations=2&f=pjson&token=<ACCESS_TOKEN>

Search within an extent

The findAddressCandidates operation allows spatial filtering of search results by using the searchExtent parameter. If you want to confine a search to a localized area, something that is especially useful in a mobile application, you can define a bounding rectangle to search within. No candidates outside of the rectangle are returned. Bounding rectangle coordinates can be entered as a simple comma-separated string in the format <lower left corner>,<upper right corner>. If the simple format is used, the coordinates must be in the default spatial reference of the geocode service, which is WGS84. The searchExtent parameter can be used with all supported search types (street address, POI, admin place, postal code).

Find POIs using searchExtent with default spatial reference

Single-field
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?singleLine=mcdonalds&outFields=city,type&searchExtent=-117.172026,32.706517,-117.152498,32.725514&f=pjson&token=<ACCESS_TOKEN>
Multifield
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?address=mcdonalds&outFields=city,type&searchExtent=-117.172026,32.706517,-117.152498,32.725514&f=pjson&token=<ACCESS_TOKEN>

Find POIs using searchExtent with Web Mercator spatial reference

Single-field
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?singleLine=mcdonalds&outFields=City%2CType&searchExtent=%7B%22xmin%22%3A-13043558%2C%22ymin%22%3A3856395%2C%22xmax%22%3A-13041325%2C%22ymax%22%3A3858918%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%7D%7D&outSR=102100&f=pjson&token=<ACCESS_TOKEN>
Multifield
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?address=mcdonalds&outFields=City%2CType&searchExtent=%7B%22xmin%22%3A-13043558%2C%22ymin%22%3A3856395%2C%22xmax%22%3A-13041325%2C%22ymax%22%3A3858918%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%7D%7D&outSR=102100&f=pjson&token=<ACCESS_TOKEN>

Find POIs using searchExtent and zone

Single-field
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?singleLine=starbucks garland&outFields=type,city,region&searchExtent=-97.407282,32.416436,-96.537829,33.141819&f=pjson&token=<ACCESS_TOKEN>
Multifield
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?address=starbucks&city=garland&outFields=type,city,region&searchExtent=-97.407282,32.416436,-96.537829,33.141819&f=pjson&token=<ACCESS_TOKEN>

Find a street address using searchExtent

Single-field
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?singleLine=380 new york st&searchExtent=-117.225635,34.015757,-117.119866,34.087402&f=pjson&token=<ACCESS_TOKEN>
Multifield
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?address=380 new york st&searchExtent=-117.225635,34.015757,-117.119866,34.087402&f=pjson&token=<ACCESS_TOKEN>

Proximity searches

Geocoding results are typically sorted according to their relevance to the search and their relative importance. However, with some applications, especially mobile apps, users are more concerned with finding features closest to their current location. For this reason, the findAddressCandidates operation supports prioritization of candidates based on their distance from a specified point. By passing in the location parameter, you can define an area of influence for your searches. The location value represents the center point of the area, which spans a radius of 50,000 meters. Features closest to the input location show up higher in the list of candidates. Results that are within the area of influence area receive a greater boost than those outside the area.

Find a place name

Single-field
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?singleLine=mgm grand&outFields=City,Region,Country&maxLocations=10&location=-115.1705916,36.1021944&f=pjson&token=<ACCESS_TOKEN>
Multifield
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?address=mgm grand&outFields=City,Region,Country&maxLocations=10&location=-115.1705916,36.1021944&f=pjson&token=<ACCESS_TOKEN>

Find a place-name using both proximity and searchExtent

Single-field
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?singleLine=mgm grand&outFields=City,Region,Country&searchExtent=-115.26,36.05,-115.07,36.21&location=-115.1705916,36.1021944&forStorage=false&f=pjson&token=<ACCESS_TOKEN>
Multifield
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?address=mgm grand&outFields=City,Region,Country&searchExtent=-115.26,36.05,-115.07,36.21&location=-115.1705916,36.1021944&forStorage=false&f=pjson&token=<ACCESS_TOKEN>

Filter categories

The findAddressCandidates operation supports filtering searches by category values, which represent address and place types. By including the category parameter in a findAddressCandidates request, you can avoid false positive matches to unexpected place and address types due to ambiguous searches.

For example, a user may search for June, expecting the service to match to June Mountain ski resort. However, there are many places in the world named June, so the search returns several cities named June.

Search for "June" without a category

Single-field
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?singleLine=June&category=&outFields=PlaceName,Type,Place_Addr,City,Region&maxLocations=5&forStorage=false&f=pjson&token=<ACCESS_TOKEN>

The solution for this case is to pass the category parameter in the request. By including category=Ski Resort in the request, all places that are not ski resorts are bypassed by the search, and only ski resorts whose names begin with June are returned.

Search for "June" with category=Ski Resort

Single-field
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?singleLine=June&category=Ski Resort&outFields=PlaceName,Type,Place_Addr,City,Region&maxLocations=5&forStorage=false&f=pjson&token=<ACCESS_TOKEN>

See Category filtering for details.

Set the geocode result language

In some countries, multiple languages are spoken, and an address may be available in different languages. You may want to search for an address in one language but return it in another. The langCode parameter is useful in this case. For instance, you may have an address in Israel that is in the Hebrew language and you want to geocode it and return the address in English.

Search for Hebrew address "הרימון 4, רמת גן" and return it in English

Single-field
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?singleLine=הרימון 4, רמת גן&langCode=EN&outFields=LangCode,Addr_type&maxLocations=1&forStorage=false&f=pjson&token=<ACCESS_TOKEN>
Multifield
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?address=הרימון 4&city=רמת גן&langCode=EN&outFields=LangCode,Addr_type&maxLocations=1&forStorage=false&f=pjson&token=<ACCESS_TOKEN>

Customize output values

The preferredLabelValues parameter allows limited customization of output values in findAddressCandidates responses. Refer to the parameter overview for details about its functionality; this section includes examples showing how it can be used.

Search for address "2420 Meridian Ave E, Edgewood, WA 98371" without preferredLabelValues

Single-field
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?singleLine=2420 Meridian Ave E, Edgewood, WA 98371&preferredLabelValues=&outFields=Match_addr,City&maxLocations=1&forStorage=false&f=pjson&token=<ACCESS_TOKEN>
Multifield
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?address=2420 Meridian Ave E&city=Edgewood&region=WA&postal=98371&preferredLabelValues=&outFields=Match_addr,City&maxLocations=1&forStorage=false&f=pjson&token=<ACCESS_TOKEN>

The preferredLabelValues parameter can be used to return a more suitable city name for this address in geocoding results. Pass preferredLabelValues=localCity in the findAddressCandidates request to return Edgewood as the city name in the output.

Search for an address with preferredLabelValues=localCity

Single-field
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?singleLine=2420 Meridian Ave E, Edgewood, WA 98371&preferredLabelValues=localCity&outFields=Match_addr,City&maxLocations=1&forStorage=false&f=pjson&token=<ACCESS_TOKEN>
Multifield
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?address=2420 Meridian Ave E&city=Edgewood&region=WA&postal=98371&preferredLabelValues=localCity&outFields=Match_addr,City&maxLocations=1&forStorage=false&f=pjson&token=<ACCESS_TOKEN>

Search for an address without preferredLabelValues

In some cases, there are multiple postal or local city names associated with an address, and you may want to use the city name that was searched for in geocoding results instead of the primary postal or local city name. The matchedCity option of the preferredLabelValues parameter supports this. The city of Merriam, Kansas, is part of the Mission postal area, for which there are several alternate postal city names; one of these is Shawnee Mission. If you search for an address in this area without using the preferredLabelValues parameter, Mission is returned as the city name by default, as illustrated in the following example.

Single-field
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?singleLine=9001 W 62nd St, Shawnee Mission, KS 66202&preferredLabelValues=&outFields=Match_addr,City&maxLocations=1&forStorage=false&f=pjson&token=<ACCESS_TOKEN>
Multifield
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?address=9001 W 62nd St&city=Shawnee Mission&region=KS&postal=66202&preferredLabelValues=&outFields=Match_addr,City&maxLocations=1&forStorage=false&f=pjson&token=<ACCESS_TOKEN>

Search for an address with preferredLabelValues=matchedCity

If preferredLabelValues=matchedCity is passed in the findAddressCandidates request for the same address, Shawnee Mission is returned as the city name instead.

Single-field
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?singleLine=9001 W 62nd St, Shawnee Mission, KS 66202&preferredLabelValues=matchedCity&outFields=Match_addr,City&maxLocations=1&forStorage=false&f=pjson&token=<ACCESS_TOKEN>
Multifield
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?address=9001 W 62nd St&city=Shawnee Mission&region=KS&postal=66202&preferredLabelValues=matchedCity&outFields=Match_addr,City&maxLocations=1&forStorage=false&f=pjson&token=<ACCESS_TOKEN>

Search for an address without preferredLabelValues

Streets may be known by multiple names as well. For streets that have more than one name, the ArcGIS Geocoding service returns the name that was matched to from the request in the geocoding results. The street in the following example has two names—IN-62 is designated as the primary name, and Highway 62 W is an alternate name. If you search for an address on this street by its alternate name Highway 62 W , without using the preferredLabelValues parameter, Highway 62 W is included in the output fields of the geocoding response.

Single-field
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?singleLine=71 Highway 62 W, Mount Vernon, Indiana, 47620&preferredLabelValues=&outFields=Match_addr,StAddr&maxLocations=1&forStorage=false&f=pjson&token=<ACCESS_TOKEN>
Multifield
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?address=71 Highway 62 W&city=Mount Vernon&region=Indiana&postal=47620&preferredLabelValues=&outFields=Match_addr,StAddr&maxLocations=1&forStorage=false&f=pjson&token=<ACCESS_TOKEN>

Search for an address with preferredLabelValues=primaryStreet

However, your use case may require that the standardized street names recognized as primary by the postal authority be returned by the geocoding application. If so, you can pass preferredLabelValues=primaryStreet in the findAddressCandidates request. For the previous example, 70 Highway 62 W, Mount Vernon, Indiana, 47620 , doing so causes W 4th St to be returned as the street name.

Single-field
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?singleLine=71 Highway 62 W, Mount Vernon, Indiana, 47620&preferredLabelValues=primaryStreet&outFields=Match_addr,StAddr&maxLocations=1&forStorage=false&f=pjson&token=<ACCESS_TOKEN>
Multifield
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?address=71 Highway 62 W&city=Mount Vernon&region=Indiana&postal=47620&preferredLabelValues=primaryStreet&outFields=Match_addr,StAddr&maxLocations=1&forStorage=false&f=pjson&token=<ACCESS_TOKEN>

Return a collection of features using searchWithin

The searchWithin parameter allows you to return a collection of features that are associated with a geocoded location via a findAddressCandidates request. For example, a customer may want to view all addresses within a postal code, or all businesses located at a particular address. The parameter also supports pagination—the ability to page through large result sets consisting of hundreds or even thousands of candidates.

Search for PostalExt 1033 SC, Amsterdam and return all PointAddress records within it (first page)

If you want to see all of the PointAddress records that exist within PostalExt "1033 SC, Amsterdam", with 5 addresses per page, use the following parameters in a findAddressCandidates request. Notice in the response that the geocoded PostalExt record is the top candidate. The geocoded object is always the first candidate in the list, followed by the collection objects.

Use dark colors for code blocksCopy
1
2
3
4
singleline=1033 SC, Amsterdam
searchWithin=PointAddress
start=1
num=5
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?singleLine=1033 SC, Amsterdam&searchWithin=PointAddress&start=1&num=5&outFields=Addr_type&forStorage=false&f=pjson&token=<ACCESS_TOKEN>

Search for PostalExt 1033 SC, Amsterdam and return all PointAddress records within it (second page)

To show the next page of results, send another findAddressCandidates request and change the start value to 6. This tells the service to return PointAddress results beginning at candidate 6 in the response. Use the following parameters for this request:

Use dark colors for code blocksCopy
1
2
3
4
singleline=1033 SC, Amsterdam
searchWithin=PointAddress
start=6
num=5
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?singleLine=1033 SC, Amsterdam&searchWithin=PointAddress&start=6&num=5&outFields=Addr_type&forStorage=false&f=pjson&token=<ACCESS_TOKEN>

JSON response for searchWithin requests

You can use the properties in the JSON response to determine the value to use for the start parameter in each request, and to know when the total number of features in a particular collection has been reached.

Refer to the first example above. These are the collection properties in the response for that example:

Use dark colors for code blocksCopy
1
2
3
4
 "total": 175,
 "start": 1,
 "num": 5,
 "nextStart": 6

The value of 175 for the total property means that there are 175 total candidates, including the parent PostalExt record and 174 associated PointAddress records. The start property reflects what was passed in the request for the parameters of the same name. The num property shows the number of candidates in the response. The nextStart property is the key for determining what value to pass in the following request in order to see the next page of results. In this case, "nextStart": 6 means that the value for the start parameter in the subsequent request should be 6.

As we see in example 2 above, start=6 was used in the request. Here's what the collection properties look like in the response:

Use dark colors for code blocksCopy
1
2
3
4
 "total": 175,
 "start": 6,
 "num": 5,
 "nextStart": 11

The nextStart value automatically increments to the value that should be used for the start parameter in the subsequent request.

Search for PostalExt `1033 SC, Amsterdam' (last page)

When all candidates have been paged through and the last page is reached, the nextStart value is -1. This indicates that there are no more candidates in the result set and no more requests need to be sent to the service. We can see this if we set start=176 in a request using the previous example.

Use the following parameters:

Use dark colors for code blocksCopy
1
2
3
4
singleline=1033 SC, Amsterdam
searchWithin=PointAddress
start=176
num=5
Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?singleLine=1033 SC, Amsterdam&searchWithin=PointAddress&start=176&num=5&outFields=Addr_type&forStorage=false&f=pjson&token=<ACCESS_TOKEN>

In this case we see "nextStart": -1 in the collection properties in the response, meaning there are no more candidates to page through:

Use dark colors for code blocksCopy
1
2
3
4
 "total": 175,
 "start": 176,
 "num": 0,
 "nextStart": -1

Additionally, notice that the response for this example only includes a single PostalExt candidate; no PointAddresses are returned. This is because the start value passed in the request exceeded the total collection count. If the start value in the request exceeds the total number of candidates in the collection, then the response will only include the geocoded candidate.

Use MatchID

Every address and place that can be geocoded by the ArcGIS Geocoding service has an ID value associated with it, which is known as the MatchID. By including outFields=MatchID (or outFields=*) in a findAddressCandidates request, you can obtain the MatchID value for any search that you perform with the service. A MatchID value for a particular address will typically remain the same across releases of the ArcGIS Geocoding service, unless the address or its location changes significantly.

A typical use case for the MatchID output field is to determine if different input strings refer to the same address. For example, you may want to know if the following user input searches represent the same place:

404 S Figueroa St, Los Angeles
404 Figueroa Ave, 90071

You can search for each of them using the ArcGIS Geocoding service and then compare their MatchID values.

Get MatchID for "404 S Figueroa St, Los Angeles"

Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?singleLine=404 S Figueroa St, Los Angeles&outFields=MatchID&maxLocations=1&forStorage=false&f=pjson&token=<ACCESS_TOKEN>

Get MatchID for "404 Figueroa Ave, 90071"

Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?singleLine=404 Figueroa Ave, 90071&outFields=MatchID&maxLocations=1&forStorage=false&f=pjson&token=<ACCESS_TOKEN>

If you compare the MatchID values you can see that the same MatchID is produced for both addresses, indicating that these searches refer to the same address.

Example 1 MatchID = AQEv8QAAlOQBAJUBBAAAAAAMFVNPVVRIIEZJR1VFUk9BIFNUUkVFVBUDNDA0ZgNFTkc
Example 2 MatchID = AQEv8QAAlOQBAJUBBAAAAAAMFVNPVVRIIEZJR1VFUk9BIFNUUkVFVBUDNDA0ZgNFTkc

Search by MatchID

You can also search for a MatchID value by including it in the matchID parameter in a findAddressCandidates request. This is useful for detecting changes to an address. For example, with a previous release of the ArcGIS Geocoding service, a search for "355 S Grand Ave, Los Angeles, CA, 90071" resulted in a StreetAddress match, meaning that the Geocoding service did not include a rooftop address record (PointAddress) for this location. You can search for the MatchID value associated with this address using the current version of the ArcGIS Geocoding service to see if a rooftop address record is now present.

Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?matchID=AQEz8QAAlOQBAJUBBAAAAAAMElNPVVRIIEdSQU5EIEFWRU5VRRUDMzU1ZgNFTkc&outFields=Addr_type,MatchID&maxLocations=1&forStorage=false&f=pjson&token=<ACCESS_TOKEN>

Return details about geocoding results with match-narrative

The detail provided by the match-narrative object allows you to have a better understanding about how the ArcGIS Geocoding service derives geocode matches. Additionally, it can potentially be used to look for patterns and improve address input, or to trigger actions in custom applications.

Here are is an example of a match-narrative scenario, with and explanation about what the information means.

Return match narrative for address "380 New York Street level 2 office 37b, Redlends, CA, 92567"

In this case, the input matches to address "380 New York St, Redlands, California, 92373". This is what the match-narrative object looks like:

Use dark colors for code blocksCopy
1
GET https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?singleLine=380 New York Street level 2 office 37b, Redlends, CA, 92567&returnMatchNarrative=true&outFields=Addr_type,ExInfo&maxLocations=1&forStorage=false&f=pjson&token=<ACCESS_TOKEN>
Input valueMatch narrative explanation

380

Classified as House Number address component and matched to reference data house number value "380".

New York

Classified as Street Name address component and matched to reference data street name value "New York"

Street

Classified as Street Type address component and matched to reference data street type value "St" as an alias.

level 2

Classified as Level address component but not matched to any value in the reference data.

office 37b

Classified as Unit address component but not matched to any value in the reference data.

Redlends

Classified as City address component and matched to city value "Redlands" in the reference data with a spelling error.

CA

Classified as Region address component and matched to region value "CA" in the reference data.

92567

Unrecognized as any address component associated with the geocoded address and unmatched. Unidentified input values are included in the ExInfo output field.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.