Addresses


https://api.apontador.com.br/v2/addresses

Method: GET

Authorization: You can use your access_token from application or from user, but the application authenticated must be trusted.

Parameters:

  • wt: json(default) or xml, the API accepts this information in the request's header(i.e. "Accept: application/xml" or "Accept: application/json"). So you can use the parameter wt or use Accept header.
  • q: this is the term you are searching(your first filter)
  • fq: (optional) specify filters based in some fields. For more than one filter you can either use several fq parameters or use the operator AND (in upper case)
  • fl: (optional) specify the fields that will be returned for each result
  • sort: (optional) the default is relevance, you can choose distance or name desc
  • rows: (optional) the default is 10 and maximum 50
  • start: (optional) the default is 0, it's used for pagination
curl -X GET -H "Accept: application/json" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.apontador.com.br/v2/addresses?q=rua+funchal&fq=state:SP&fl=state,city,street,type,mainLocation,districts,description"

If successful, this call will return:

{
    "addressResults": {
        "addresses": [
            {
                "city": "São Paulo", 
                "description": "Rua Funchal, Itaim Bibi, São Paulo, SP", 
                "districts": [
                    "Itaim Bibi"
                ], 
                "mainLocation": {
                    "lat": "-23.5929023", 
                    "lng": "-46.6885567"
                }, 
                "state": "SP", 
                "street": "Funchal", 
                "type": "LOGRADOURO"
            }, 
            {
                "city": "Limeira", 
                "description": "Rua Funchal, Limeira, SP", 
                "mainLocation": {
                    "lat": "-22.5341694", 
                    "lng": "-47.4282824"
                }, 
                "state": "SP", 
                "street": "Funchal", 
                "type": "LOGRADOURO"
            }, 
            {
                "city": "Osasco", 
                "description": "Rua Funchal, Santo Antônio, Osasco, SP", 
                "districts": [
                    "Santo Antônio"
                ], 
                "mainLocation": {
                    "lat": "-23.5560338", 
                    "lng": "-46.8002964"
                }, 
                "state": "SP", 
                "street": "Funchal", 
                "type": "LOGRADOURO"
            }, 
            {
                "city": "Guarujá", 
                "description": "Rua Funchal, Jardim Santa Maria, Guarujá, SP", 
                "districts": [
                    "Jardim Santa Maria"
                ], 
                "mainLocation": {
                    "lat": "-23.9903309", 
                    "lng": "-46.2797021"
                }, 
                "state": "SP", 
                "street": "Funchal", 
                "type": "LOGRADOURO"
            }, 
            {
                "city": "Santos", 
                "description": "Rua Madeira do Funchal, Saboó, Santos, SP", 
                "districts": [
                    "Saboó", 
                    "Nova Cintra"
                ], 
                "mainLocation": {
                    "lat": "-23.9385955", 
                    "lng": "-46.3429874"
                }, 
                "state": "SP", 
                "street": "Madeira do Funchal", 
                "type": "LOGRADOURO"
            }
        ], 
        "header": {
            "found": 5, 
            "rows": 5, 
            "start": 0
        }
    }
}