Request format

All params

https://geocode-maps.yandex.ru/1.x
  ? apikey=<string>
  & geocode=<string>
  & lang=<string>
  & [kind=<string>]
  & [rspn=<boolean>]
  & [ll=<number>, <number>]
  & [spn=<number>, <number>]
  & [bbox=<number>,<number>~<number>,<number>]
  & [results=<integer>]
  & [skip=<integer>]
  & [uri=<string>]
  & [format=<string>]

apikey

Required parameter

The key issued in the Developer's Dashboard.

Note

Key activation takes up to 15 minutes.

geocode

Required parameter

Address or coordinates of the object being searched for. The specified data determines the type of geocoding:

  • If an address is specified, it is converted to object coordinates. This process is called forward geocoding.
  • If coordinates are specified, they are converted to the object's address. This process is called reverse geocoding.

Several formats for entering coordinates are available.

lang

Required parameter

Language of the response and regional settings of the map.

Record format lang=language_region, where:

  • language — Two-letter language code. Specified in ISO 639-1 format. Sets the language for displaying the names of geographical features.
  • region — Two-letter country code. Specified in ISO 3166-1 format. Determines regional settings.

List of supported values:

  • ru_RU — Russian
  • uk_UA — Ukrainian;
  • be_BY — Belarusian
  • en_RU — response in English, Russian map features;
  • en_US — response in English, American map features;
  • tr_TR — Turkish (only for maps of Türkiye).

If the parameter has a locale value that is not in this list, the service selects the language closest to the one set.

Example: lang=uk_UA.

sco

Only if the geocode parameter sets the coordinates. Order of coordinates.

Possible values:

  • longlat — Longitude, latitude.
  • latlong — Latitude, longitude.

Default value: longlat.

kind

Only if the geocode parameter sets the coordinates. The type of required toponym. List of accepted values:

  • house — house
  • street — street
  • metro — subway station
  • district — city district
  • locality — locality (city, town, village, etc.)

If omitted, the API will choose the toponym type automatically.

rspn

Flag indicating whether the search scope should be restricted to the specified area. The area is defined by the ll and spn or bbox parameters. Possible values:

  • 0 — Do not restrict search.
  • 1 — Restrict search.

Default value: 0.

Note

If the geocode parameter sets the coordinates, the rspn parameter is ignored.

ll

Longitude and latitude of the center of the search area. The span of the search area is set in the spn parameter.

spn

The span of the search area. The center of the area is set in the ll parameter.
Set by two numbers:

  • the first is the difference between the maximum and minimum longitude of the area;
  • the second is the difference between the maximum and minimum latitude.

Note

If the geocode parameter sets the coordinates and the kind parameter value is district, the spn parameter is ignored.

bbox

An alternative method for setting the search area.

The borders are defined as the geographical coordinates of the lower-left and upper-right corners of the area (in the order "longitude, latitude").

Record format: bbox=x1,y1~x2,y2

Note

If bboxand ll+spn are used simultaneously, the bbox parameter takes priority.

Ignored if the geocode parameter sets the coordinates.

format

Geocoder's response format — json

results

Maximum number of objects to be returned. If the skip parameter is set, its value must be set explicitly.

Default value: 10.

Maximum value: 50.

skip

The number of objects to skip in the response, starting from the first one. If this parameter is set, the results parameter must also be set. The value of the skip parameter must divide evenly by the value of the results parameter.
Default value: 0.

uri

Additional information about the object. The parameter value is returned in the Geosuggest response. To use it in a request, specify a value instead of text and coordinates.

Format for geographical coordinates in the request

Geographical coordinates in the geocode parameter are set sequentially in one of the following formats:

Record format Order of coordinates Example
+-float, +-float Longitude, latitude 134.854, -25.828
float [direction], float [direction]* Any E134.854, S25.828 134.854E, 25.828S
+-deg° mm' ss", +-deg° mm' ss" Latitude, longitude -25°49′41.1″, 134°51′15.88″
deg° mm' ss" [direction], deg° mm' ss" [direction]* Any 25°49′41.1″S, 134°51′15.88″E
NMEA Any 2549.67,S, 13451.26,E

* [direction] - The letter designation of one of the four directions: N, E, W, S. - Spaces are allowed between letters and coordinates.

Spaces, commas, or semicolons can be used as delimiters. Spaces are allowed on either side of the delimiter character.

Note

The ";" character should be encoded as "%3B".