Response
In response to the request, Yandex Locator returns:
Location response
Response example
{
"position": {
"latitude": 55.743675,
"longitude": 37.5646301,
"altitude": 0.0,
"precision": 701.71643,
"altitude_precision": 30.0,
"type": "gsm"
}
}
Keys
Object |
Description |
|
Contains the point's coordinates in the WGS-84 system and other location data. |
|
Latitude in degrees with an accuracy of seven decimal places. |
|
Longitude in degrees with an accuracy of seven decimal places. |
|
Height above the world ocean's surface. |
|
Accuracy radius in meters. |
|
The maximum deviation from the specified height in meters. |
|
The method used for determining the location:
|
Error message
If Yandex Locator can't process the request, you receive an error message:
{
"error": {
"code": _code_,
"message": "_message text_"
}
}
2
: Internal service error.6
: Couldn't determine location.7
: Invalid JSON structure.8
: Invalid access key.
Keys
Object |
Description |
|
Error code:
|
|
Error message text. |
Examples of error messages
-
Couldn't determine location.
{ "error": { "code": 6, "message": "Location not found" } }
Information about the cells, Wi-Fi access points, and subnets that own the IP address is missing in the service. This error also occurs if the data format is invalid.
-
Couldn't process JSON.
{ "error": { "code": 7, "message": "JSON request is invalid" } }
The passed JSON array has an invalid structure. For example, some required elements, brackets, or closing tags may be missing.
-
Invalid access key.
{ "error": { "code": 8, "message": "invalid api_key" } }
Make sure that the key specified in the request is valid.
Error code:
Error message text.
Contains the point's coordinates in the WGS-84 system and other data.
Latitude in degrees with an accuracy of seven decimal places.
Longitude in degrees with an accuracy of seven decimal places.
Height above the world ocean's surface.
Accuracy radius in meters.
100,000
means Yandex Locator couldn't determine the location accurately.
The maximum deviation from the specified height in meters.
The method used to determine the location: