Geocode

Description

Geocoding service that allows you to obtain the coordinates of a specified standard address (geocoding regular) or normalized direction from the coordinates (reverse geocoding).

URL

/VERSION/resources/geocode_reverse.FORMAT

Available Format

JSON

HTTP Method

GET

Accepted Version

1

Requires

Authorization.

Headers

Not applicable

Parameters

  • access_token: (Required) access_token to user resources.
  • lat:(Optional) latitude in decimal degree.Required if specified lng
  • lng:(Optional) length in decimal degree. Required if specified lat
  • radius: (Optional) distance in meters for search when lat and lng are specifed. Default 1000meters.
  • Address:(Optional) Normalized address for geocoding. This parameter is mandatory if you want perform a regular geocoding (lat and lng are requeired in other case).

Example

https://api.topoos.com/1/resources/geocode.json?access_token=62f5280d-c954-4ee7-a0a8-68ff9c2810d8&lat=40.953107&lng=-4.123233

Reply
JSON example reply

If multiple results obtained due to ambiguities in the input parameters, several results are returned sorted from most to least likely.

[{
    "address": {
        "address": "Paseo Del Obispo 18,40001 Segovia",
        "cross_street": "Paseo Del Obispo 18",
        "state": "Segovia",
        "administrative_area": null,
        "country": null,
        "postal_code": "40001"
    },
    "location": {
        "latitude": 40.9528400134766,
        "longitude": -4.12256682821284
    },
    "bounds": null
}]