Multi Geocode API
The purpose of this last endpoint is to return geographical coordinates from multiple addresses, either complete or partial.
- List of parameters
- Example 1 – Searching for coordinates of two or more addresses in the same request
To make the request to Multi Geocode you need to send the request using the POST method to the following endpoint:
List of parameters
Mandatory parameters
id
– Text with the identifier of the searched address.
It is compulsory to enter at least one of the parameters below. It is not necessary to inform everyone. However, the more information you provide, the more accurate the result will be.
road
– Name of the street or part of it;number
– Street number. DO NOT enter the complement data.city
– Name of city;state
– State;country
– Country;district
– Name of the neighborhood;zipcode
– Zip code;
Note: Currently returning only to directions located in Brazil.
Note: There is a limit of 200 points for submission in a single request.
Example 1 – Searching for coordinates of two or more addresses in the same request
In this example, we’re going to look for two different addresses in the same request. To do this, we need to identify each address with the parameter id
.
The first will be "Address1"
and the second "Address2"
. The full request can be seen below:
[ { "id": "Address1", "road": "Leopoldo Hess", "number": 75, "district": "São João", "zipcode": "88304-260", "city": "Itajai", "state": "SC" }, { "id": "Address2", "road": "Alameda Campinas", "number": 579, "zipcode": "01419-001", "city": "São Paulo", "state": "SP" } ]
In the response, the following information is returned:
found
– Number of records returned.results
– Array of objects with all the results found:id
– Identifier of the address entered in the request;address
– Object with address information:road
– Name of the road;district
– District;zipCode
– Zipcode;city
– City;state
– State;mainLocation
– Object with the geographic coordinates of the point:lat
– Latitude;lon
– Longitude;
type
– Indicates the best element found in the map base for returning the geographic coordinate;score
– Reference score for the result of the geocoding process;label
– Complete address found used in the geocoding process.
Note: The higher the score, the more relevant the result will be to the requested address.
The full response can be found below:
{ "found": 2, "results": [ { "id": "Address1", "address": { "road": "Rua Leopoldo Hess", "number": "75", "district": "São João", "zipCode": "88304260", "city": "Itajaí", "state": { "code": "SC", "name": "Santa Catarina" }, "mainLocation": { "lat": -26.90314282963394, "lon": -48.68023153051618 } }, "type": "ROAD", "score": 154.34358, "label": "Rua Leopoldo Hess, 75, São João,Itajaí, Santa Catarina, SC" }, { "id": "Address2", "address": { "road": "Alameda Santos", "district": "Cerqueira César", "zipCode": "01419001", "city": "São Paulo", "state": { "code": "SP", "name": "São Paulo" }, "mainLocation": { "lat": -23.568495, "lon": -46.650085 } }, "type": "ZIPCODE", "score": 48.98619, "label": "Alameda Santos, Cerqueira César,São Paulo, São Paulo, SP" } ] }