Suggestions API
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 coordinates and address suggestions will be sent in the URL itself.
Note: Currently returning only to directions located in Brazil.
The Suggestions API has been updated to V2. The endpoint https://api.maplink.global/geocode/v1/suggestions 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.
Parameter list
Mandatory parameter
q
– Provide the address or part of it.
Optional parameters
center
– Reference coordinates for the search results. Format:center=-23.552088765,-46.6341653162
;radius
– 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);limit
– Limits the number of results returned.
Example 1 – Search for suggestions from free text
In this example, we want to get suggestions for the text "Alameda Campinas, 01404100, Jardim Paulista"
. The request is below:
Note: 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.
Response
The description of each field present in the response can be found in the following link: Response structure – Geocode API.
The full response can be found below:
{ "results": [ { "id": "6684353bf0662a1541ff6385", "address": { "road": "ALAMEDA CAMPINAS", "district": "JARDIM PAULISTA", "zipCode": "01404100", "city": "SÃO PAULO", "state": { "name": "SÃO PAULO", "code": "SP" }, "mainLocation": { "lat": -23.56631144908, "lon": -46.65360036597 } }, "type": "ROAD", "label": "ALAMEDA CAMPINAS, 01404100, JARDIM PAULISTA, SÃO PAULO, SP", "score": 85.4569607121604, "precision": "ROAD_CENTROID" }, { "id": "6684353bf0662a1541ff635d", "address": { "road": "ALAMEDA CAMPINAS", "district": "JARDIM PAULISTA", "zipCode": "01404000", "city": "SÃO PAULO", "state": { "name": "SÃO PAULO", "code": "SP" }, "mainLocation": { "lat": -23.5663551335, "lon": -46.65364273168 } }, "type": "ROAD", "label": "ALAMEDA CAMPINAS, 01404000, JARDIM PAULISTA, SÃO PAULO, SP", "score": 67.52274411065238, "precision": "ROAD_CENTROID" }, { "id": "6684353bf0662a1541ff63a2", "address": { "road": "ALAMEDA CAMPINAS", "district": "JARDIM PAULISTA", "zipCode": "01404200", "city": "SÃO PAULO", "state": { "name": "SÃO PAULO", "code": "SP" }, "mainLocation": { "lat": -23.56714829171, "lon": -46.65440337412 } }, "type": "ROAD", "label": "ALAMEDA CAMPINAS, 01404200, JARDIM PAULISTA, SÃO PAULO, SP", "score": 67.52274411065238, "precision": "ROAD_CENTROID" }, { "id": "6684353bf0662a1541ff63a3", "address": { "road": "ALAMEDA CAMPINAS 150", "district": "JARDIM PAULISTA", "zipCode": "01404900", "city": "SÃO PAULO", "state": { "name": "SÃO PAULO", "code": "SP" }, "mainLocation": { "lat": -23.56343039334, "lon": -46.6507807755 } }, "type": "ROAD", "label": "ALAMEDA CAMPINAS 150, 01404900, JARDIM PAULISTA, SÃO PAULO, SP", "score": 63.99465714182172, "precision": "ROAD_CENTROID" }, { "id": "6684353bf0662a1541ff637b", "address": { "road": "ALAMEDA CAMPINAS", "district": "JARDIM PAULISTA", "zipCode": "01404001", "city": "SÃO PAULO", "state": { "name": "SÃO PAULO", "code": "SP" }, "mainLocation": { "lat": -23.56880844109, "lon": -46.65604091167 } }, "type": "ROAD", "label": "ALAMEDA CAMPINAS, 01404001, JARDIM PAULISTA, SÃO PAULO, SP", "score": 62.53203434603555, "precision": "ROAD_CENTROID" }, { "id": "6684353bf0662a1541ff637c", "address": { "road": "ALAMEDA CAMPINAS", "district": "JARDIM PAULISTA", "zipCode": "01404003", "city": "SÃO PAULO", "state": { "name": "SÃO PAULO", "code": "SP" }, "mainLocation": { "lat": -23.5727482959, "lon": -46.65984093151 } }, "type": "ROAD", "label": "ALAMEDA CAMPINAS, 01404003, JARDIM PAULISTA, SÃO PAULO, SP", "score": 62.34913451331003, "precision": "ROAD_CENTROID" }, { "id": "6684353bf0662a1541ff63b9", "address": { "road": "ALAMEDA CAMPINAS", "district": "JARDIM PAULISTA", "zipCode": "01404002", "city": "SÃO PAULO", "state": { "name": "SÃO PAULO", "code": "SP" }, "mainLocation": { "lat": -23.57150846699, "lon": -46.65863824537 } }, "type": "ROAD", "label": "ALAMEDA CAMPINAS, 01404002, JARDIM PAULISTA, SÃO PAULO, SP", "score": 62.34913451331003, "precision": "ROAD_CENTROID" }, { "id": "66842f7b6969121fb9f0de4e", "address": { "road": "ALAMEDA CAMPINAS", "district": "JARDIM PAULISTA", "zipCode": "12947480", "city": "ATIBAIA", "state": { "name": "SÃO PAULO", "code": "SP" }, "mainLocation": { "lat": -23.141018593, "lon": -46.557696254 } }, "type": "ROAD", "label": "ALAMEDA CAMPINAS, 12947480, JARDIM PAULISTA, ATIBAIA, SP", "score": 60.303185326712466, "precision": "ROAD_CENTROID" }, { "id": "6684353bf0662a1541ff635b", "address": { "road": "ALAMEDA CAMPINAS, 463", "district": "JARDIM PAULISTA", "zipCode": "01404902", "city": "SÃO PAULO", "state": { "name": "SÃO PAULO", "code": "SP" }, "mainLocation": { "lat": -23.56559742572, "lon": -46.6529043066 } }, "type": "ROAD", "label": "ALAMEDA CAMPINAS, 463, 01404902, JARDIM PAULISTA, SÃO PAULO, SP", "score": 58.19247901439667, "precision": "ROAD_CENTROID" }, { "id": "6684343ef0662a1541f5003c", "address": { "road": "ALAMEDA SARUTAIÁ", "district": "JARDIM PAULISTA", "zipCode": "01403010", "city": "SÃO PAULO", "state": { "name": "SÃO PAULO", "code": "SP" }, "mainLocation": { "lat": -23.5689407, "lon": -46.6549067 } }, "type": "ROAD", "label": "ALAMEDA SARUTAIÁ, 01403010, JARDIM PAULISTA, SÃO PAULO, SP", "score": 55.375542129789075, "precision": "ROAD_CENTROID" } ], "found": 10 }