Geocode

Overview

The zoho.map.geoCode task returns the GPS coordinates (latitude and longitude) of the specified address.

Note:

  • The response format for this task has been updated to provide a more structured and enhanced response. Please refactor your scripts to suit the new response type before 15th Dec, 2025. An identifier (v1) will be added in your existing scripts to indicate where this task is currently used. For example: zoho.map.v1.geoCode;
  • Zoho Maps use open-source address data. Hence, accuracy might not be on par with commercial vendors.
  • This task is available only in US, EU, IN domains due to the availability of Zoho Maps.

Syntax

<response> = zoho.map.geoCode(<address>);

where:

ParamsData typeDescription
<response>KEY-VALUEThe latitude and longitude of the specified location, and the status of the executed task.
<address>TEXTThe address of the location whose latitude and longitude need to be obtained.

Example

The following script returns the latitude and longitude of the specified location:

response = zoho.map.geoCode("4141 Hacienda Dr, Pleasanton, CA 94588, United States");

where:

response
The KEY-VALUE variable that holds the latitude and longitude of the specified location, and the status of the executed task.
"4141 Hacienda Dr, Pleasanton, CA 94588, United States"
The TEXT that represents the address of the location whose latitude and longitude need to be obtained.

Response Format

Success Response

  • The success response will be returned in the following format:

     {
     "latitude": "37.68612315",
     "longitude": "-121.893741811263",
     "status": "success"
     }

Failure Response

  • The failure response for an undetectable address value will be returned in the following format:

     {
     "error": "unable to geocode",
     "status": "failure"
     }

Related Links