Reverse geocode v1

Please note Sygic does no longer issue new Sygic Maps API keys. This documentation is for existing customers only. If you wish to include maps & navigation into your project, please refer to Sygic Maps SDK.

Overview

Reverse geocoding returns location information based on provided GPS coordinates.

Request

API Reference

https://geocoding.api.sygic.com/v1/api/reversegeocode?key=yourAPIkey

Request authorization is done via parameter key, which must be included in the request URL.

Methods

  • GET

Live example

https://geocoding.api.sygic.com/v1/api/reversegeocode?location=51.50105925961465,-0.12856364250183108&key=yourAPIkey

This example demonstrates the use of the Reverse geocoding service. Click on icons to see the code on Github or play with it in JSFiddle:

  • Parameters

    Parameter Data type Values Description
    location string {latitude},{longitude} Latitude and longitude of a place to be reverse geocoded.

    Example: location=51.50105925961465,-0.12856364250183108

    Default output format is JSON and there is no need to specify it anywhere in the URL request.

    Response

    GET https://geocoding.api.sygic.com/v1/api/reversegeocode?location=51.50105925961465,-0.12856364250183108&key=yourAPIkey

    Response

    {
        "results": [{
                "components": [{
                        "type": "house_number",
                        "value": "10"
                    }, {
                        "type": "route",
                        "value": "Great George Street"
                    }, {
                        "type": "admin_level_1",
                        "value": "England"
                    }, {
                        "type": "admin_level_7",
                        "value": "London"
                    }, {
                        "type": "admin_level_8",
                        "value": "London"
                    }, {
                        "type": "admin_level_9",
                        "value": "Westminster"
                    }, {
                        "type": "buildup_area",
                        "value": "London"
                    }, {
                        "type": "postal_code",
                        "value": "SW1P 3"
                    }, {
                        "type": "country",
                        "value": "United Kingdom"
                    }
                ],
                "formatted_result": "10 Great George Street, Westminster, England SW1P 3, United Kingdom",
                "location": {
                    "lat": 51.501064,
                    "lon": -0.128431
                },
                "location_type": "exact",
                "type": "address",
                "country_iso": "gbr",
                "distance": 9.15
            }, {
                "components": [{
                        "type": "admin_level_1",
                        "value": "England"
                    }, {
                        "type": "admin_level_7",
                        "value": "London"
                    }, {
                        "type": "admin_level_8",
                        "value": "London"
                    }, {
                        "type": "buildup_area",
                        "value": "London"
                    }, {
                        "type": "admin_level_9",
                        "value": "Westminster"
                    }, {
                        "type": "country",
                        "value": "United Kingdom"
                    }, {
                        "type": "postal_code",
                        "value": "SW1P 3"
                    }
                ],
                "formatted_result": "Westminster, England SW1P 3, United Kingdom",
                "location": {
                    "lat": 51.499978,
                    "lon": -0.131499
                },
                "location_type": "centroid",
                "type": "locality",
                "country_iso": "gbr"
            }
        ],
        "status": "OK",
        "copyright": "© 2018 Sygic a.s."
    }
    

    Result Types

    Type Description
    address Information about the address.
    Response might contain up to 2 address results (in case the closest address has interpolated location).
    road Information about the street.
    Road result is omitted if response contains address result. Response might contain up to 2 road results (in case the closest road doesn't have a name).
    locality Information about the country sub-area.

    Response Properties

    Property Data type Description
    components array of objects List of components making up the reverse geocoding information.
    formatted_result string Text representation of the result.
    location object Geographic location of the result in lat & lon format.
    location_type string Location information type (closest_point, centroid, interpolated, exact).
    type string Type of result. Response consists of three types of results. For details see table below.
    country_iso string ISO-3 code of the country.
    distance float Calculated distance from the request location in meters.

    Component Types

    Type Found in result type
    house_number address
    premise address
    route road, address
    postal_code locality, road, address
    country locality, road, address
    admin_level_1 .. 9 locality, road, address