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
  • wgs84 - Latitude and longitude in the WGS-84 projection (EPSG:4326).
  • lks - x- and y- coordinates in the TM Baltic93 CRS (EPSG:25884).
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
400 Wrong input data. Server can’t respond due to client error.
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"
}