Batch geocoding

Three text strings geocoded in one transaction with the geocoding service

Three text strings geocoded in one transaction with the geocoding service.

What is batch geocoding?

Batch geocoding, also known as bulk geocoding, is the process of converting a list of addresses or place names to a set of complete addresses with locations.

Batch geocoding is commonly used to:

  • Convert a number of addresses to complete addresses.
  • Find the locations for a list of addresses.
  • Perform large batches of geocoding.
  • Geocode addresses that can be saved for future use.

How batch geocoding works

You can geocode many addresses at once by making an HTTPS request to the geocoding service geocodeAddresses operation or by using client APIs. Specify the addresses, and optionally, additional parameters to refine the output.

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

To keep track of each input and output address, the input values should contain an objectid field to connect the input data record to the output address candidate returned (see ResultID).

To refine the geocoded address output, provide additional parameters such as the search extent, location type, category, and source country.

The geocoding service parses each address and uses all of the parameters to return a set of geocoded address locations. Each location contains a full address, location, attributes, and a score of how well it matched.

URL request

Use dark colors for code blocksCopy
1
https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/geocodeAddresses?<parameters>

Learn more about standard and enhanced endpoints in Service endpoints.

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
addressesA JSON object with an address or place name. Different address formats are supported.See example

Additional parameters: Refine the search results by using parameters such as searchExtent, locationType, category, countryCode. Use langCode to return results in a specific language.

Code examples

Geocode a set of addresses

Use the geocoding service to find the location of many addresses.

Steps

  1. Reference the geocoding service.

  2. Set the addresses to be geocoded. All input addresses should include an objectid.

  3. Set the token parameter to your API key.

The response contains a set of geocoded addresses. The input objectid matches the output ResultID for each record. Addr_type represents whether the input address resolved to a standard address or POI. score represents how well it matched.

Three text strings geocoded in one transaction with the geocoding service

Use the geocoding service to find the location of many addresses.

APIs

ArcGIS Maps SDK for JavaScriptArcGIS Maps SDK for JavaScriptArcGIS API for PythonArcGIS REST JSEsri LeafletMapLibre 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
131
132
133
134
          const geocodingServiceUrl =
            "http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer"

          const params = {
            addresses: [
              {
                objectid: 1,
                address: "Buckingham Palace",
              },
              {
                objectid: 2,
                address: "Abeno Restaurant London",
              },
              {
                objectid: 3,
                address: "58 Brewer Street, London, England",
              },
            ],
          }

          locator.addressesToLocations(geocodingServiceUrl, params).then(
            results => {
              if (results.length) {
                results.forEach(result => {
                  addGraphic(result)
                })
              }
            },
            function(error) {
              console.log(error)
            }
          )
Expand

REST API

cURLcURLHTTP
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
curl https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/geocodeAddresses \
-d 'f=pjson' \
-d 'addresses=
    {
        "records": [
           {
            "attributes": {
                "objectid": 1,
                "address": "Buckingham Palace"
            }
            },
            {
                "attributes": {
                    "objectid": 2,
                    "address": "Bernardis Restaurant London"
                }
            },
            {
                "attributes": {
                    "objectid": 3,
                    "address": "58 Brewer Street, London, England"
                }
            }
        ]
    }' \
-d 'token=<ACCESS_TOKEN>'

Tutorials

Services

Geocoding service

Search for an address, reverse geocode, and batch geocode.

API support

GeocodingReverse GeocodingBatch GeocodingPlace/POI SearchAutosuggestUI Component
ArcGIS Maps SDK for JavaScript
ArcGIS Maps SDK for .NET1
ArcGIS Maps SDK for Kotlin1
ArcGIS Maps SDK for Swift1
ArcGIS Maps SDK for Java1
ArcGIS Maps SDK for Qt1
ArcGIS API for Python
ArcGIS REST JS
Esri Leaflet2
MapLibre GL JS22222
OpenLayers22222
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.