Request format
POST https://locator.api.maps.yandex.ru/v1/locate?apikey=YOUR_APIKEY
Content-Type: application/json
User-Agent: <product> / <product-version> <comment>
{
"wifi": ... ,
"cell": ... ,
"ip": ...
}
curl
curl -H "Content-Type: application/json" \
-X POST "https://locator.api.maps.yandex.ru/v1/locate?apikey=YOUR_API_KEY" \
-d '{
"wifi": [
{"age": 100,"bssid": "744d28cd6a10","signal_strength": -89},
{"age": 90,"bssid": "86d9e7c78b20","signal_strength": -84},
{"age": 110,"bssid": "b869f47255d9","signal_strength": -75}
],
"cell": [
{"gsm": {"mcc": 250,"mnc": 99,"lac": 65534,"cid": 129430793,"signal_strength": -38}}
],
"ip": [
{"address": "217.118.76.34"}
]
}'
Query
apikey |
Required parameter The key you obtained from the Developer Dashboard. |
Body
| Param | Type | Required | Description |
|---|---|---|---|
wifi |
Wifi[] | - | Array of WiFi objects |
cell |
Cell[] | - | Array of Cell objects |
ip |
Ip[] | - | Array of IP objects |
Example
{
"wifi": [
{
"bssid": "2CD02D814C80",
"signal_strength": -60,
"channel" : 345,
"age" : 100
}
],
"cell": [
{
"lte": {
"mcc": 54157923,
"mnc": 29,
"tac": 27837,
"ci": 40,
"signal_strength": -60,
}
},
{
"gsm": {
"mcc": 14157933,
"mnc": 99,
"lac": 27864,
"cid": 248,
"signal_strength": -60,
}
}
],
"ip": [
{"address": "95.108.173.231"}
]
}
WiFi
| Param | Type | Required | Description |
|---|---|---|---|
bssid |
string | + | The MAC address of the WiFi node |
signal_strength |
number | + | The current signal strength, dBm |
channel |
number | - | The channel over which you communicate with the access point |
age |
number | - | The time in milliseconds since the device was detected |
Example
{
"wifi": [
{
"bssid": "2CD02D814C80",
"signal_strength": -60,
"channel" : 345,
"age" : 100
}
]
}
Cell
| Param | Type | Required | Description |
|---|---|---|---|
gsm |
GSM object | - | GSM (2G) networks |
wcdma |
WCDMA object | - | WCDMA (3G) networks |
lte |
LTE object | - | LTE (4G) networks |
Note
One cell object must contain one of the gsm, wcdma, lte objects.
GSM
| Param | Type | Required | Description |
|---|---|---|---|
mcc |
number | + | Mobile Country Code |
mnc |
number | + | Mobile Network Code |
lac |
number | + | Location Area Code |
cid |
number | + | Cell ID |
signal_strength |
number | + | The current signal strength, dBm |
bsic |
number | - | Base Station Identity Code |
arfcn |
number | - | Absolute RF Channel Number |
age |
number | - | The time in milliseconds since the device was detected |
timing_advance |
number | - | The timing advance value |
WCDMA
| Param | Type | Required | Description |
|---|---|---|---|
mcc |
number | + | Mobile Country Code |
mnc |
number | + | Mobile Network Code |
lac |
number | + | Location Area Code |
cid |
number | + | Cell ID |
signal_strength |
number | + | The current signal strength, dBm |
psc |
number | - | UMTS Primary Scrambling Code |
uarfcn |
number | - | UMTS Absolute RF Channel Number |
age |
number | - | The time in milliseconds since this cell became primary |
LTE
| Param | Type | Required | Description |
|---|---|---|---|
mcc |
number | + | Mobile Country Code |
mnc |
number | + | Mobile Network Code |
tac |
number | + | Tracking Area Code |
ci |
number | + | Cell ID |
signal_strength |
number | + | The current signal strength, dBm |
pci |
number | - | Physical Cell ID |
earfcn |
number | - | Absolute RF Channel Number |
age |
number | - | The time in milliseconds since this cell became primary |
timing_advance |
number | - | The timing advance value |
Example
{
"cell": [
{
"lte": {
"age": 452,
"earfcn": 1602,
"ci": 268435455,
"mcc": 0,
"tac": 65535,
"mnc": 0,
"pci": 124,
"signal_strength": -67
}
},
{
"wcdma": {
"age": 452,
"uarfcn": 2850,
"cid": 248700418,
"mcc": 250,
"lac": 7702,
"mnc": 2,
"psc": 261,
"signal_strength": -84
}
},
{
"gsm": {
"mcc": 250,
"mnc": 99,
"lac": 65534,
"cid": 129430793,
"signal_strength": -38
}
}
]
}
IP
| Param | Type | Required | Description |
|---|---|---|---|
address |
string | + | The IPv4 or IPv6 address of the device |
Example
{
"ip": [
{
"address": "95.108.173.231"
}
]
}