Skip to content
Address text geocoded to a location with the geocoding service.

What is address geocoding?

Address geocoding, also known as forward geocoding, is the process of converting text for an address to a complete address with a location. For example, you can convert 1 Bridge St, Sydney, Australia to 1 Bridge St, Sydney, New South Wales, 2000.

You can use address search to:

  • Geocode address text to a complete address.
  • Find the location of an address.
  • Provide a list of address candidates for an incomplete address.

How address geocoding works

You can geocode an address by making an HTTPS request to the geocoding service findAddressCandidates operation or by using client APIs. Specify the address, output data fields, and optionally, additional parameters to refine the search.

The more complete you can make the input address, the more likely the geocoding service will find an exact match. For example, "1600 Pennsylvania Ave NW, Washington, District of Columbia, 20500".

To refine the search, you can provide additional parameters such as the location, search extent, country code, city, and neighborhood.

The geocoding service parses the address and uses all of the parameters to return a set of address candidates. Each candidate contains a full address, location, attributes, and a score of how well it matched. By default the address, score, and location are returned, but to return all of the data fields available, you can set the outFields parameter to *****.

URL request

Use dark colors for code blocksCopy
1
https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?address={searchText}&outFields={fieldList}&f=json&token=<ACCESS_TOKEN>

Required parameters

NameDescriptionExamples
fThe format of the data returned.f=json f=pjson
tokenAn API key or OAuth 2.0 access token.token=<ACCESS_TOKEN>

Key parameters

NameDescriptionExamples
addressThe address or place name. Different formats are supported.address=1600 Pennsylvania Ave NW,DC address=Washington,DC address=81301 address=-117.155579,32.703761
outFieldsThe list of data fields to return.outFields=PlaceName,Addr_type, outFields=* (return all fields)

Additional parameters: Refine the search by using parameters such as location, searchExtent, neighborhood, city, and countryCode. Use langCode to return results in a specific language.

Storage parameter

If you need to store or persist the geocoding service results in any way, you are required to use the forStorage parameter.

NameDescriptionExample
forStorageSpecifies whether the results of the operation will be persisted.forStorage=true

Code examples

Geocode an address

This example illustrates how to geocode address text. Most APIs provide a LocatorTask to access the service.

Steps

  1. Reference the geocoding service.

  2. Set the address.

  3. Set the token to your API key.

The response is a set of address candidates with a full address, location, and score.

Address text geocoded to a location with the geocoding service.

APIs

ArcGIS Maps SDK for JavaScriptArcGIS Maps SDK for JavaScriptArcGIS Maps SDK for .NETArcGIS Maps SDK for KotlinArcGIS Maps SDK for SwiftArcGIS Maps SDK for JavaArcGIS Maps SDK for QtArcGIS API for PythonArcGIS REST JSLeafletMapLibre GL JSOpenLayersCesiumJS
Expand
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
        const geocodingServiceUrl =
          "https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer"

        const params = {
          address: {
            address: "1600 Pennsylvania Ave NW, DC",
          },
        }

        locator
          .addressToLocations(geocodingServiceUrl, params)
          .then((results) => {
            showResult(results)
          })

REST API

cURLcURLHTTP
Use dark colors for code blocksCopy
1
2
3
4
curl https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates \
-d 'f=pjson' \
-d 'singleLine=1600 Pennsylvania Ave NW, DC' \
-d 'token=<ACCESS_TOKEN>'

Geocode an address within an extent

This example shows how to geocode an address and filter the results using an extent.

Steps

  1. Reference the geocoding service.

  2. Set the address string and a set of bounding box coordinates that limit the search area to a specific region.

  3. Set your access token.

The response is a set of address candidates within the extent with a full address, location, and score.

Address text geocoded to a location with the geocoding service.

APIs

ArcGIS Maps SDK for JavaScriptArcGIS Maps SDK for JavaScriptArcGIS Maps SDK for .NETArcGIS Maps SDK for KotlinArcGIS Maps SDK for SwiftArcGIS Maps SDK for QtArcGIS API for PythonArcGIS REST JSLeafletMapLibre GL JSOpenLayersCesiumJS
Expand
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
      const searchExtent = new Extent({
        xmin: -116.62,
        ymin: 33.804,
        xmax: -116.409,
        ymax: 33.948,
        spatialReference: { wkid: 4326 }, // WGS84
      })

      view.when(() => {
        const geocodingServiceUrl =
          "https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer"

        const params = {
          address: {
            address: "277 N Avenida Caballeros",
            searchExtent: searchExtent,
          },
        }

        locator
          .addressToLocations(geocodingServiceUrl, params)
          .then((results) => {
            showResult(results)
          })

REST API

cURLcURLHTTP
Use dark colors for code blocksCopy
1
2
3
4
5
curl https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates \
-d 'f=pjson' \
-d 'singleLine=277 N Avenida Caballeros' \
-d 'searchExtent=-116.620,33.804,-116.409,33.948' \
-d 'token=<ACCESS_TOKEN>'

Find places of interest (POI) associated with an address

This example shows how to find places of interest that are related to an address using the searchWithin parameter.

Steps

  1. Reference the geocoding service.
  2. Set the address string and a feature type (POI) to search for points associated with the address.
  3. Set your access token.

The response is a set of address candidates. The first candidate is always the geocoded address, and the remaining candidates are points of interest associated with the address.

Find points of interest associated with an address with the geocoding service.

APIs

ArcGIS Maps SDK for JavaScriptArcGIS Maps SDK for JavaScriptArcGIS REST JS
Expand
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
            const res = await locator.addressToLocations(
              geocodeURL,{
                address: {
                  address: text,
                  outFields: "*",
                  searchWithin: "POI",
                }
              }
            );

REST API

cURLcURLHTTP
Use dark colors for code blocksCopy
1
2
3
4
5
6
curl -L "https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates \
?f="json" \
&token="YOUR_ACCESS_TOKEN" \
&singleLine="3325 springbank lane, charlotte, nc" \
&outFields=Addr_type \
&searchWithin=POI"

Tutorials

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