{"id":3151,"date":"2023-12-22T17:40:26","date_gmt":"2023-12-22T17:40:26","guid":{"rendered":"https:\/\/developers.maplink.global\/?p=3151"},"modified":"2025-08-01T14:45:24","modified_gmt":"2025-08-01T14:45:24","slug":"reverse-geocode-api","status":"publish","type":"post","link":"https:\/\/developers.maplink.global\/en\/reverse-geocode-api\/","title":{"rendered":"Reverse Geocode API"},"content":{"rendered":"\n<p>The purpose of this second endpoint, Reverse Geocode, is to <strong>return information about the address from its coordinates.<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#parameters\">List of parameters<\/a><\/li>\n\n\n\n<li><a href=\"#example1\">Example 1 &#8211; Search for an address based on a coordinate<\/a><\/li>\n\n\n\n<li><a href=\"#example2\">Example 2 &#8211; Search for an address based on more than one coordinate<\/a><\/li>\n<\/ul>\n\n\n\n<p>To make the request for Reverse Geocode, you must send the request using the <strong>POST <\/strong>method to the following endpoint:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/api.maplink.global\/geocode\/v1\/reverse\">https:\/\/api.maplink.global\/geocode\/v2\/reverse<\/a> &#8211; <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-amber-color\">POST&nbsp;<\/mark><\/strong><\/li>\n<\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>Note:<\/strong>&nbsp;Currently returning only to directions located in Brazil.<\/p>\n<\/blockquote>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>The Reverse API has been updated to V2. The endpoint <a href=\"https:\/\/api.maplink.global\/geocode\/v1\/reverse\">https:\/\/api.maplink.global\/geocode\/v1\/reverse<\/a> will still work, but it is recommended to use the new endpoint for more accurate results and because new features will be exclusive to the new version.<\/p>\n<\/blockquote>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"parameters\"><strong>List of parameters<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Mandatory parameters<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>lat<\/code> &#8211; Latitude;<\/li>\n\n\n\n<li><code>lon<\/code> &#8211; Longitude.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Optional parameters<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>id<\/code> &#8211; Text with the identifier of the address searched;<\/li>\n\n\n\n<li><code>distance<\/code> &#8211; Maximum distance in meters for the address search. The default value is 2,000 (2 km) and the maximum value is up to 100,000 (100 km)<\/li>\n<\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><\/p>\n<cite><strong>Note: <\/strong>There is a limit of 200 points for sending in a single request.<\/cite><\/blockquote>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"example1\"><strong>Example 1 &#8211; Search for an address based on a coordinate<\/strong><\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[\n    {\n        \"lat\": -23.566617861455924, \n        \"lon\": -46.65362331449377\n    }\n]<\/pre>\n\n\n\n<p>The description of each field present in the response can be found in the following link:&nbsp;<a href=\"https:\/\/developers.maplink.global\/en\/response-structure-geocode-api\/\">Response structure \u2013 Geocode API<\/a>.<\/p>\n\n\n\n<p>The full response can be found below:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{\n    \"results\": [\n        {\n            \"id\": \"6684353bf0662a1541ff635d\",\n            \"address\": {\n                \"road\": \"ALAMEDA CAMPINAS\",\n                \"district\": \"JARDIM PAULISTA\",\n                \"zipCode\": \"01404000\",\n                \"city\": \"S\u00c3O PAULO\",\n                \"state\": {\n                    \"name\": \"S\u00c3O PAULO\",\n                    \"code\": \"SP\"\n                },\n                \"mainLocation\": {\n                    \"lat\": -23.5663551335,\n                    \"lon\": -46.65364273168\n                }\n            },\n            \"type\": \"ROAD\",\n            \"label\": \"ALAMEDA CAMPINAS, 01404000, JARDIM PAULISTA, S\u00c3O PAULO, SP\",\n            \"score\": 95.18153327776994,\n            \"distance\": 29.313601838651707,\n            \"precision\": \"ROAD_CENTROID\"\n        }\n    ],\n    \"found\": 1\n}<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"example2\"><strong>Example 2 &#8211; Search for an address based on more than one coordinate<\/strong><\/h2>\n\n\n\n<p>In this example, we will search for results for two different coordinates. To do this, we need to identify them with the parameter <code>id<\/code>. The first point will be <code>\"L1\"<\/code> and the second <code>\"L2\"<\/code>.<\/p>\n\n\n\n<p>The point <code>\"L1\"<\/code> should return results within a radius of 500 meters. For this, we use the parameter <code>distance<\/code>.<\/p>\n\n\n\n<p>The full request can be found below:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[\n    {\n        \"id\": \"L1\",\n        \"lat\": -26.90314282963394,\n        \"lon\": -48.68018153051618,\n        \"distance\": 500\n    },\n    {\n        \"id\": \"L2\",\n        \"lat\": -26.908620508271895,\n        \"lon\": -48.67848497677373\n    }\n]<\/pre>\n\n\n\n<p>The full response can be found below:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{\n    \"results\": [\n        {\n            \"id\": \"L1\",\n            \"address\": {\n                \"road\": \"RUA LEOPOLDO HESS\",\n                \"number\": \"54\",\n                \"district\": \"S\u00c3O JO\u00c3O\",\n                \"zipCode\": \"88304260\",\n                \"city\": \"ITAJA\u00cd\",\n                \"state\": {\n                    \"name\": \"SANTA CATARINA\",\n                    \"code\": \"SC\"\n                },\n                \"mainLocation\": {\n                    \"lat\": -26.903134,\n                    \"lon\": -48.680257\n                },\n                \"numberAsInteger\": 54\n            },\n            \"type\": \"ROAD\",\n            \"label\": \"RUA LEOPOLDO HESS, 88304260, S\u00c3O JO\u00c3O, ITAJA\u00cd, SC\",\n            \"score\": 98.96608277648525,\n            \"distance\": 7.556140571987315,\n            \"precision\": \"NUMBER_EXACT\"\n        },\n        {\n            \"id\": \"L2\",\n            \"address\": {\n                \"road\": \"RUA HEITOR LIBERATO\",\n                \"number\": \"2057\",\n                \"district\": \"S\u00c3O JUDAS\",\n                \"zipCode\": \"88303101\",\n                \"city\": \"ITAJA\u00cd\",\n                \"state\": {\n                    \"name\": \"SANTA CATARINA\",\n                    \"code\": \"SC\"\n                },\n                \"mainLocation\": {\n                    \"lat\": -26.908564,\n                    \"lon\": -48.67848\n                },\n                \"numberAsInteger\": 2057\n            },\n            \"type\": \"ROAD\",\n            \"label\": \"RUA HEITOR LIBERATO, 88303101, S\u00c3O JUDAS, ITAJA\u00cd, SC\",\n            \"score\": 99.21863668889449,\n            \"distance\": 6.309805167165782,\n            \"precision\": \"NUMBER_EXACT\"\n        }\n    ],\n    \"found\": 2\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The purpose of this second endpoint, Reverse Geocode, is to return information about the address from its coordinates. To make the request for Reverse Geocode, you must send the request using the POST method to the following endpoint: Note:&nbsp;Currently returning only to directions located in Brazil. The Reverse API has been updated to V2. The [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[168],"tags":[],"class_list":["post-3151","post","type-post","status-publish","format-standard","hentry","category-geocode-en"],"acf":[],"_links":{"self":[{"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts\/3151","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/comments?post=3151"}],"version-history":[{"count":4,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts\/3151\/revisions"}],"predecessor-version":[{"id":3502,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts\/3151\/revisions\/3502"}],"wp:attachment":[{"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/media?parent=3151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/categories?post=3151"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/tags?post=3151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}