Migration from the legacy API

Change

Legacy API

Current API

FQDN

api.lbs.yandex.net

locator.api.maps.yandex.ru

path

/geolocation

/v1/locate

API key

body

json={
    "common": {
        ...
        "apikey": "YOUR_APIKEY"
        ...
    }
}

query ?apikey=YOUR_APIKEY

Body

Field

Legacy API

Current API

wifi

json={
    "wifi_networks": [
        {
            "mac": "2CD02D814C80",
            "signal_strength": -68,
            "age":500
        }
    ]
}
{
    "wifi": [
        {
            "bssid": "2CD02D814C80",
            "signal_strength": -68,
            "age": 500,
            "channel": ...
        }
    ]
}

cell

json={
    "gsm_cells": [
        {
            "countrycode": 250,
            "operatorid": 2,
            "cellid": 197403650,
            "lac": 9900,
            "signal_strength": -80,
            "age": 1000
        }
    ]
}

In the old format, cellular signals like LTE, GSM, and WDCMA were not distinguished and were all specified in
the gsm_cells parameter.

Use the fields of the corresponding
data transmission methods.

{
    "cell": [
        {
            "gsm" : {
                "mcc": 250,
                "mnc": 2,
                "cid": 197403650,
                "lac": 9900,
                "signal_strength": -80,
                "age": 1000,
                "bsic": ... ,
                "arfcn": ... ,
                "timing_advance": ...
            }
        }
    ]
}

ip

json={
    "ip": [
        {
            "address_v4": "95.108.173.231"
        }
    ]
}
{
    "ip": [
        {
            "address": "95.108.173.231"
        }
    ]
}