Reverse Geocoder

Using the Reverse Geocoder API

9min
api endpoint the reversegeocode endpoint allows you to retrieve the following country retrieves the name of a specific country based on the coordinates address retrieves the best matching address details, including country, pincode, state, city, and locality based on the coordinates address suggestions retrieves the top 5 matching address suggestions with address details based on the provided coordinates the following query parameters are required for all requests parameter data type description example type string the reverse geocode type acceptable values country address address suggestions lat float latitude value 17 35386833 lng float longitude value 82 547853333 error radius integer error radius in meters 50 reverse geocode country the following example retrieves the name of a specific country based on the coordinates the following example request returns "india" reverse geocode country get /reverse geocode?type=country\&lat=74 46097160087743\&lng=74 46097160087743\&error radius=123111 { "status" 200, "request id" "rvg | dbb935c1 183c 4538 9b9f c7744d4cb93d", "message" "success", "data" \[ { "country" "india" } ], "error" null } reverse geocode address the reversegeocodeaddress endpoint retrieves the best matching address details, including country, pincode, state, city, and locality based on the coordinates reverse geocode address get /reverse geocode?type=address\&lat=34 28519821803453\&lng=74 46097160087743\&error radius=123111 { "status" 200, "request id" "rvg | d34a5acb 5a01 4cf4 a86d 8b81b6ba25c4", "message" "success", "data" \[ { "level 3" "sopore", "country" "india", "pincode" 193201, "level 4" null, "level 5" null, "formatted address" "sopore, baramulla, jammu and kashmir, 193201", "address attributes" null, "landmark with distance" { "sopore sopore town hall" { "distance" 19 93, "landmark type" "openground" }, "habibullah eye hospital" { "distance" 20 84, "landmark type" "medical" }, "boys higher secondary school" { "distance" 36 24, "landmark type" "prefix match" }, "bsnl exchange" { "distance" 81 81, "landmark type" "prefix match" }, "ssp office" { "distance" 93 02, "landmark type" "corporate" } }, "level 1" "jammu and kashmir", "level 2" "baramulla" } ], "error" null } response details the response includes the following details in the data array field data type description example level 1 string the location state name jammu and kashmir level 2 string the location city name baramulla level 3 string the locality or suburb of the city sopore level 4 string the sub locality of the address when applicable level 5 string provides more detailed road and street level information this will be populated in later versions of the api country string country india pincode integer the pincode of the given address 193201 formatted address string the formatted address sopore, baramulla, jammu and kashmir, 193201 address attributes string the specific area associated with the address such as a business, commercial complex, or urban area this will be populated in later versions of the api landmark with distance dictionary of dictionaries landmarks, landmark types, and their distances see sample response reverse geocode address suggestions note note the reversegeocodeaddresssuggestions response includes the same parameters as the reversegeocodeaddress response the reversegeocodeaddresssuggestions endpoint retrieves the top 5 matching address suggestions with address details based on the provided coordinates reverse geocode address suggestions get /reverse geocode?type=address suggestions\&lat=34 28519821803453\&lng=74 46097160087743\&error radius=123111 { "status" 200, "request id" "rvg | f77e1a20 880e 45e4 bead 7176c1071b19", "message" "success", "data" \[ { "level 3" "sopore", "country" "india", "pincode" 193201, "level 4" null, "level 5" null, "formatted address" "sopore, baramulla, jammu and kashmir, 193201", "address attributes" null, "landmark with distance" { "sopore sopore town hall" { "distance" 19 93, "landmark type" "openground" }, "habibullah eye hospital" { "distance" 20 84, "landmark type" "medical" }, "boys higher secondary school" { "distance" 36 24, "landmark type" "prefix match" }, "bsnl exchange" { "distance" 81 81, "landmark type" "prefix match" }, "ssp office" { "distance" 93 02, "landmark type" "corporate" } }, "level 1" "jammu and kashmir", "level 2" "baramulla" }, { "level 3" "town hall,sopore", "country" "india", "pincode" 193201, "level 4" null, "level 5" null, "formatted address" "town hall,sopore, baramulla, jammu and kashmir, 193201", "address attributes" null, "landmark with distance" { "sopore sopore town hall" { "distance" 19 93, "landmark type" "openground" }, "habibullah eye hospital" { "distance" 20 84, "landmark type" "medical" }, "boys higher secondary school" { "distance" 36 24, "landmark type" "prefix match" }, "bsnl exchange" { "distance" 81 81, "landmark type" "prefix match" }, "ssp office" { "distance" 93 02, "landmark type" "corporate" } }, "level 1" "jammu and kashmir", "level 2" "baramulla" }, { "level 3" "crpf,sopore", "country" "india", "pincode" 193201, "level 4" null, "level 5" null, "formatted address" "crpf,sopore, baramulla, jammu and kashmir, 193201", "address attributes" null, "landmark with distance" { "sopore sopore town hall" { "distance" 19 93, "landmark type" "openground" }, "habibullah eye hospital" { "distance" 20 84, "landmark type" "medical" }, "boys higher secondary school" { "distance" 36 24, "landmark type" "prefix match" }, "bsnl exchange" { "distance" 81 81, "landmark type" "prefix match" }, "ssp office" { "distance" 93 02, "landmark type" "corporate" } }, "level 1" "jammu and kashmir", "level 2" "baramulla" }, { "level 3" "iqbal nagar sopore", "country" "india", "pincode" 193201, "level 4" null, "level 5" null, "formatted address" "iqbal nagar sopore, baramulla, jammu and kashmir, 193201", "address attributes" null, "landmark with distance" { "sopore sopore town hall" { "distance" 19 93, "landmark type" "openground" }, "habibullah eye hospital" { "distance" 20 84, "landmark type" "medical" }, "boys higher secondary school" { "distance" 36 24, "landmark type" "prefix match" }, "bsnl exchange" { "distance" 81 81, "landmark type" "prefix match" }, "ssp office" { "distance" 93 02, "landmark type" "corporate" } }, "level 1" "jammu and kashmir", "level 2" "baramulla" }, { "level 3" "iqbal market,sopore", "country" "india", "pincode" 193201, "level 4" null, "level 5" null, "formatted address" "iqbal market,sopore, baramulla, jammu and kashmir, 193201", "address attributes" null, "landmark with distance" { "sopore sopore town hall" { "distance" 19 93, "landmark type" "openground" }, "habibullah eye hospital" { "distance" 20 84, "landmark type" "medical" }, "boys higher secondary school" { "distance" 36 24, "landmark type" "prefix match" }, "bsnl exchange" { "distance" 81 81, "landmark type" "prefix match" }, "ssp office" { "distance" 93 02, "landmark type" "corporate" } }, "level 1" "jammu and kashmir", "level 2" "baramulla" } ], "error" null }