Geocoding Address Requests

Detailed documentation on how to perform geocoding address requests using Cercalia’s Suggest API.

Geocoding Address Requests

To geocode an address (get the exact coordinates of the portal detail), it is necessary to collect the suggestions response parameters of the selected candidate, and launch the request with these parameters:

Request Parameters

ParameterDescriptionExample
keyFor WEB applications, use the same KEY as for the Cercalia Maps API. For all other applications (server, APP, …), request a KEY to Nexus
ctcLocality code (localidad_id field from suggest response)ESP0057088L
pcodePostal code (codigo_postal field from suggest response)17003
stcStreet code (calle_id field from suggest response)ESP17079200000578980
stnumPortal number (portal field)6

It is mandatory to report all the codes obtained in the response. For some countries, the Postal Code may not be returned.

Example Request:

https://lb.cercalia.com/suggest/SuggestServlet?ctc=ESP0057088L&pcode=17003&stc=ESP17079200000578980&stnum=6&key=YOUR_API_KEY

Response

The answer is always returned in JSON format.

The response is always returned with UTF-8 encoding.

The answer includes the coordinates, in geographical format.

Example Response:

{
    "response": {
        "coord": {
            "x": 2.8254442,
            "y": 41.97306
        },
        "desc": "Carrer de Joaquim Botet i Sisó, 6 (Girona)",
        "housenumber": "6",
        "name": "Carrer de Joaquim Botet i Sisó, 6",
        "postalcode": "17003"
    },
    "responseHeader": {
        "QTime": 0,
        "params": {
            "ctc": "ESP0057088L",
            "key": "380d274a5c9d99feaec6e28c46a5434b6dfaa23198cc36c48758a7111079879b",
            "pcode": "17003",
            "stc": "ESP17079200000578980",
            "stnum": "6"
        },
        "status": 0
    }
}