Geocoding

Address text geocoded to a location with the geocoding service

What is geocoding?

Geocoding, also known as address search, is the process of converting text for an address or place to a complete address with a location. For example, you can convert "1600 Pennsylvania Ave NW, DC" to -77.03654 longitude and 38.89767 latitude.

You can use geocoding to:

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

How 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?<parameters>

Required parameters

NameDescriptionExamples
fThe format of the data returned.f=json f=pjson
tokenAn API key or OAuth 2.0 access token. Learn how to get an access token in Security and authentication.token=<YOUR_API_KEY>
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.

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.

APIs

ArcGIS API for JavaScriptArcGIS API for JavaScriptEsri LeafletMapLibre GL JSOpenLayersArcGIS REST JSArcGIS Runtime API for .NETArcGIS Runtime API for AndroidArcGIS Runtime API for iOSArcGIS Runtime API for JavaArcGIS Runtime API for Qt (C++)ArcGIS Runtime API for Qt (QML)ArcGIS API for Python
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
      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 'address=1600 Pennsylvania Ave NW, DC' \
-d 'token=<ACCESS_TOKEN>'

Tutorials

Services

Geocoding service

Search for addresses, businesses, and places around the world.

API support

Full supportPartial supportNo support
  • 1. No runtime API. Access via HTTP request.
  • 2. Access via ArcGIS REST JS.

Tools

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