reverse_geocode

The reverse_geocode tool converts a longitude/latitude coordinate to the nearest street address or place name—the inverse of the forward-geocoding workflow handled by find_address_candidates.


Tool Name

reverse_geocode


Tool Alias

Reverse Geocode


Objective

Convert a geographic location (a coordinate pair) to the nearest address or place, returning the full formatted address along with parsed components, a location-type classifier, and the snapped coordinates.


Description

reverse_geocode converts a geographic location to the nearest address—a workflow commonly known as reverse geocoding. For example, the coordinate −79.3871, 43.6426 resolves to CN Tower, 301 Front St W, Toronto, Ontario, M5V, CAN.

Output

The result includes:

  • The full formatted address as a single string.
  • Parsed componentshouseNumber, city, subRegion, region, postCode, and countryCode.
  • A locationType classifier that categorizes the place—for example, Restaurant or Hospital.
  • The snapped location coordinates, returned in the same spatial reference as the input.

Tip Prefer the parsed components over string-parsing the address field. The components are stable across regions and locales; the formatted string is not.

Spatial reference

Locations are assumed to be in the WGS84 spatial reference (wkid 4326), but you can pass a different spatial reference using the wkid parameter—for example, 3857 for Web Mercator. The returned location is in the same spatial reference as the input; there is no separate output SR parameter.

Important: coordinate order

When using the default WGS84 (wkid 4326), x is longitude (−180 to 180) and y is latitude (−90 to 90). Double-check the order—passing latitude as x is the most common reverse-geocoding error.

When to use

  • Get an address that represents a location.
  • The client provides coordinates and asks what they represent in the real world.
  • Show an address for a location selected on a map.
  • Find details for a location, including the type of place.

Schema

The full JSON Schema definitions for the input parameters accepted by reverse_geocode and the output payload it returns are provided as separate files alongside this document.

Input schema

The input schema describes the required x and y coordinates and the optional wkid parameter (default 4326, WGS84).

Download or view ReverseGeocodeToolInputSchema.json

Output schema

The output schema describes the response object: the full address string, the parsed address components (houseNumber, city, subRegion, region, postCode, countryCode), the locationType classifier, the snapped location coordinates with their spatial reference, and the raw attributes block returned by the geocoder.

Download or view ReverseGeocodeToolOutputSchema.json


Sample prompts to test the tool

Send any of the prompts below to your MCP-compatible AI client to verify that reverse_geocode is working correctly. The prompts are grouped to exercise the tool's main inputs and behaviors—from the default WGS84 case through Web Mercator input, output-field validation, a round-trip integration test with find_address_candidates, and edge cases at the limits of the coordinate domain.

Basic WGS84 coordinates (default)

  • Use my ArcGIS Enterprise reverse geocoding service to find the address at longitude -77.0366, latitude 38.8971.
  • What address is at coordinates x: -118.2437, y: 34.0522 using the USA_Locator in my ArcGIS Enterprise?
  • Reverse geocode the point at x: -87.6298, y: 41.8781 using my Enterprise geocoding service.

Well-known landmarks by coordinate

  • Use my ArcGIS Enterprise reverse geocoder to identify the location at x: -111.0937, y: 44.4280—what address or place does it return?
  • What is at coordinates x: -80.1918, y: 25.7617 according to my Enterprise locator service?

With explicit wkid (Web Mercator)

  • Reverse geocode the Web Mercator coordinates x: -13149598, y: 4036445 using my ArcGIS Enterprise geocoding service with WKID 3857.
  • Use my Enterprise USA_Locator to reverse geocode x: -9757000, y: 5138000 in Web Mercator spatial reference.

Testing output fields

These prompts validate that the response includes parsed components such as region, subRegion, city, postCode, and locationType.

  • Use my ArcGIS Enterprise reverse geocoder at x: -71.0589, y: 42.3601 and tell me the city, county, state, and ZIP code it returns.
  • Reverse geocode x: -122.4194, y: 37.7749 with my Enterprise locator and show me all the returned fields including locationType.

Chained with find_address_candidates (round-trip test)

These prompts forward-geocode an address, then reverse-geocode the returned coordinates with the same service and compare the result.

  • First use my ArcGIS Enterprise geocoding service to find '350 Fifth Avenue, New York, NY', then reverse geocode the returned coordinates back using the same service—do the results match?
  • Geocode 'Fenway Park, Boston' with my Enterprise locator, then pass those coordinates to the reverse geocoder and compare the input and output addresses.

Edge cases

  • Use my ArcGIS Enterprise reverse geocoder on coordinates x: -106.6504, y: 35.0844—is it a street address or a POI?
  • Use my ArcGIS Enterprise reverse geocoder on x: -180, y: 90.
  • Reverse geocode x: -97.7431, y: 30.2672 using my Enterprise locator and tell me if a locationType is returned.