Neighbourhoods API
The API returns the neighbourhood either of Riga (Rīga) or Jurmala (Jūrmala) which matches the given coordinates.
API URL
The request URL should match the following pattern:
https://api.kartes.lv/v3//districts?
The response is given in JSON.
The HTTP GET request method is used.
Query parameters
The request consists of the following GET parameters:
Parameter | Description | Possible values |
---|---|---|
cs | CRS |
|
x | x-coordinate in the TM Baltic93 or longitude in the WGS-84 | |
y | y-coordinate in the TM Baltic93 or latitude in the WGS-84 |
Response parameters
The response consists of the name of the neighbourhood.
Error codes
Status code | Description |
---|---|
200 | Wrong coordinate system!. |
200 | Incorrect parameters passed!. |
404 | No location found. The URL is not recognized; the resource does not exist. |
5xx | Server error. |
Examples
Input:
https://api.kartes.lv/v3//districts?y=56.9375018&x=24.1455704
Response:
{
"name": "Maskavas forštate"
}