{"id":3158,"date":"2023-12-22T18:07:02","date_gmt":"2023-12-22T18:07:02","guid":{"rendered":"https:\/\/developers.maplink.global\/?p=3158"},"modified":"2025-08-01T14:02:41","modified_gmt":"2025-08-01T14:02:41","slug":"suggestions-api","status":"publish","type":"post","link":"https:\/\/developers.maplink.global\/en\/suggestions-api\/","title":{"rendered":"Suggestions API"},"content":{"rendered":"\n<p>The complete response can be checked below: The purpose of this third endpoint, Suggestions, is to <strong>return the geographic coordinates from an address provided in the URL itself.<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#parametros\">Parameter list<\/a><\/li>\n\n\n\n<li><a href=\"#exemplo1\" data-type=\"internal\" data-id=\"#exemplo1\">Example 1 &#8211; Search for suggestions from free text<\/a><\/li>\n\n\n\n<li><a href=\"#response\">Response<\/a><\/li>\n<\/ul>\n\n\n\n<p>To make the request to Suggestions, it is necessary to send the request using the <strong>GET <\/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\/suggestions\">https:\/\/api.maplink.global\/geocode\/v2\/suggestions<\/a> &#8211; <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\">GET<\/mark><\/strong><\/li>\n<\/ul>\n\n\n\n<p>All parameters to obtain the geographic coordinates and address suggestions will be sent in the URL itself.<\/p>\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<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>The Suggestions API has been updated to V2. The endpoint <a href=\"https:\/\/api.maplink.global\/geocode\/v1\/suggestions \">https:\/\/api.maplink.global\/geocode\/v1\/suggestions <\/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=\"parametros\"><strong>Parameter list<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Mandatory parameter<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>q<\/code> &#8211; Provide the address or part of it.<\/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>center<\/code> &#8211; Reference coordinates for the search results. Format: <code>center=-23.552088765,-46.6341653162<\/code>;<\/li>\n\n\n\n<li><code>radius<\/code> &#8211; Specifies the search radius, in meters, from the central point defined in center. If not entered, the default value is 500,000 meters (500 km);<\/li>\n\n\n\n<li><code>limit<\/code> &#8211; Limits the number of results returned. <\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"exemplo1\"><strong>Example 1 &#8211; Search for suggestions from free text<\/strong><\/h2>\n\n\n\n<p>In this example, we want to get suggestions for the text <code>\"Alameda Campinas, 01404100, Jardim Paulista\"<\/code>. The request is below:<\/p>\n\n\n\n<p><a href=\"https:\/\/api.maplink.global\/geocode\/v2\/suggestions?q=Alameda%20Campinas,%2001404100,%20Jardim%20Paulista\">https:\/\/api.maplink.global\/geocode\/v2\/suggestions?q=Alameda%20Campinas,%2001404100,%20Jardim%20Paulista<\/a><\/p>\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> It is recommended to describe the address with the greatest amount of information, ordering the most important elements (Street, Number, Zip Code, District, City, State) and without abbreviations for greater assertiveness of results.<\/cite><\/blockquote>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"response\">Response<\/h2>\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\": \"6684353bf0662a1541ff6385\",\n            \"address\": {\n                \"road\": \"ALAMEDA CAMPINAS\",\n                \"district\": \"JARDIM PAULISTA\",\n                \"zipCode\": \"01404100\",\n                \"city\": \"S\u00c3O PAULO\",\n                \"state\": {\n                    \"name\": \"S\u00c3O PAULO\",\n                    \"code\": \"SP\"\n                },\n                \"mainLocation\": {\n                    \"lat\": -23.56631144908,\n                    \"lon\": -46.65360036597\n                }\n            },\n            \"type\": \"ROAD\",\n            \"label\": \"ALAMEDA CAMPINAS, 01404100, JARDIM PAULISTA, S\u00c3O PAULO, SP\",\n            \"score\": 85.4569607121604,\n            \"precision\": \"ROAD_CENTROID\"\n        },\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\": 67.52274411065238,\n            \"precision\": \"ROAD_CENTROID\"\n        },\n        {\n            \"id\": \"6684353bf0662a1541ff63a2\",\n            \"address\": {\n                \"road\": \"ALAMEDA CAMPINAS\",\n                \"district\": \"JARDIM PAULISTA\",\n                \"zipCode\": \"01404200\",\n                \"city\": \"S\u00c3O PAULO\",\n                \"state\": {\n                    \"name\": \"S\u00c3O PAULO\",\n                    \"code\": \"SP\"\n                },\n                \"mainLocation\": {\n                    \"lat\": -23.56714829171,\n                    \"lon\": -46.65440337412\n                }\n            },\n            \"type\": \"ROAD\",\n            \"label\": \"ALAMEDA CAMPINAS, 01404200, JARDIM PAULISTA, S\u00c3O PAULO, SP\",\n            \"score\": 67.52274411065238,\n            \"precision\": \"ROAD_CENTROID\"\n        },\n        {\n            \"id\": \"6684353bf0662a1541ff63a3\",\n            \"address\": {\n                \"road\": \"ALAMEDA CAMPINAS 150\",\n                \"district\": \"JARDIM PAULISTA\",\n                \"zipCode\": \"01404900\",\n                \"city\": \"S\u00c3O PAULO\",\n                \"state\": {\n                    \"name\": \"S\u00c3O PAULO\",\n                    \"code\": \"SP\"\n                },\n                \"mainLocation\": {\n                    \"lat\": -23.56343039334,\n                    \"lon\": -46.6507807755\n                }\n            },\n            \"type\": \"ROAD\",\n            \"label\": \"ALAMEDA CAMPINAS 150, 01404900, JARDIM PAULISTA, S\u00c3O PAULO, SP\",\n            \"score\": 63.99465714182172,\n            \"precision\": \"ROAD_CENTROID\"\n        },\n        {\n            \"id\": \"6684353bf0662a1541ff637b\",\n            \"address\": {\n                \"road\": \"ALAMEDA CAMPINAS\",\n                \"district\": \"JARDIM PAULISTA\",\n                \"zipCode\": \"01404001\",\n                \"city\": \"S\u00c3O PAULO\",\n                \"state\": {\n                    \"name\": \"S\u00c3O PAULO\",\n                    \"code\": \"SP\"\n                },\n                \"mainLocation\": {\n                    \"lat\": -23.56880844109,\n                    \"lon\": -46.65604091167\n                }\n            },\n            \"type\": \"ROAD\",\n            \"label\": \"ALAMEDA CAMPINAS, 01404001, JARDIM PAULISTA, S\u00c3O PAULO, SP\",\n            \"score\": 62.53203434603555,\n            \"precision\": \"ROAD_CENTROID\"\n        },\n        {\n            \"id\": \"6684353bf0662a1541ff637c\",\n            \"address\": {\n                \"road\": \"ALAMEDA CAMPINAS\",\n                \"district\": \"JARDIM PAULISTA\",\n                \"zipCode\": \"01404003\",\n                \"city\": \"S\u00c3O PAULO\",\n                \"state\": {\n                    \"name\": \"S\u00c3O PAULO\",\n                    \"code\": \"SP\"\n                },\n                \"mainLocation\": {\n                    \"lat\": -23.5727482959,\n                    \"lon\": -46.65984093151\n                }\n            },\n            \"type\": \"ROAD\",\n            \"label\": \"ALAMEDA CAMPINAS, 01404003, JARDIM PAULISTA, S\u00c3O PAULO, SP\",\n            \"score\": 62.34913451331003,\n            \"precision\": \"ROAD_CENTROID\"\n        },\n        {\n            \"id\": \"6684353bf0662a1541ff63b9\",\n            \"address\": {\n                \"road\": \"ALAMEDA CAMPINAS\",\n                \"district\": \"JARDIM PAULISTA\",\n                \"zipCode\": \"01404002\",\n                \"city\": \"S\u00c3O PAULO\",\n                \"state\": {\n                    \"name\": \"S\u00c3O PAULO\",\n                    \"code\": \"SP\"\n                },\n                \"mainLocation\": {\n                    \"lat\": -23.57150846699,\n                    \"lon\": -46.65863824537\n                }\n            },\n            \"type\": \"ROAD\",\n            \"label\": \"ALAMEDA CAMPINAS, 01404002, JARDIM PAULISTA, S\u00c3O PAULO, SP\",\n            \"score\": 62.34913451331003,\n            \"precision\": \"ROAD_CENTROID\"\n        },\n        {\n            \"id\": \"66842f7b6969121fb9f0de4e\",\n            \"address\": {\n                \"road\": \"ALAMEDA CAMPINAS\",\n                \"district\": \"JARDIM PAULISTA\",\n                \"zipCode\": \"12947480\",\n                \"city\": \"ATIBAIA\",\n                \"state\": {\n                    \"name\": \"S\u00c3O PAULO\",\n                    \"code\": \"SP\"\n                },\n                \"mainLocation\": {\n                    \"lat\": -23.141018593,\n                    \"lon\": -46.557696254\n                }\n            },\n            \"type\": \"ROAD\",\n            \"label\": \"ALAMEDA CAMPINAS, 12947480, JARDIM PAULISTA, ATIBAIA, SP\",\n            \"score\": 60.303185326712466,\n            \"precision\": \"ROAD_CENTROID\"\n        },\n        {\n            \"id\": \"6684353bf0662a1541ff635b\",\n            \"address\": {\n                \"road\": \"ALAMEDA CAMPINAS, 463\",\n                \"district\": \"JARDIM PAULISTA\",\n                \"zipCode\": \"01404902\",\n                \"city\": \"S\u00c3O PAULO\",\n                \"state\": {\n                    \"name\": \"S\u00c3O PAULO\",\n                    \"code\": \"SP\"\n                },\n                \"mainLocation\": {\n                    \"lat\": -23.56559742572,\n                    \"lon\": -46.6529043066\n                }\n            },\n            \"type\": \"ROAD\",\n            \"label\": \"ALAMEDA CAMPINAS, 463, 01404902, JARDIM PAULISTA, S\u00c3O PAULO, SP\",\n            \"score\": 58.19247901439667,\n            \"precision\": \"ROAD_CENTROID\"\n        },\n        {\n            \"id\": \"6684343ef0662a1541f5003c\",\n            \"address\": {\n                \"road\": \"ALAMEDA SARUTAI\u00c1\",\n                \"district\": \"JARDIM PAULISTA\",\n                \"zipCode\": \"01403010\",\n                \"city\": \"S\u00c3O PAULO\",\n                \"state\": {\n                    \"name\": \"S\u00c3O PAULO\",\n                    \"code\": \"SP\"\n                },\n                \"mainLocation\": {\n                    \"lat\": -23.5689407,\n                    \"lon\": -46.6549067\n                }\n            },\n            \"type\": \"ROAD\",\n            \"label\": \"ALAMEDA SARUTAI\u00c1, 01403010, JARDIM PAULISTA, S\u00c3O PAULO, SP\",\n            \"score\": 55.375542129789075,\n            \"precision\": \"ROAD_CENTROID\"\n        }\n    ],\n    \"found\": 10\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The complete response can be checked below: The purpose of this third endpoint, Suggestions, is to return the geographic coordinates from an address provided in the URL itself. To make the request to Suggestions, it is necessary to send the request using the GET method to the following endpoint: All parameters to obtain the geographic [&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-3158","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\/3158","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=3158"}],"version-history":[{"count":6,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts\/3158\/revisions"}],"predecessor-version":[{"id":3488,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts\/3158\/revisions\/3488"}],"wp:attachment":[{"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/media?parent=3158"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/categories?post=3158"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/tags?post=3158"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}