Search for geographical features

This section provides an example of a request and the service response when searching for geographical features.

Request

https://search-maps.yandex.ru/v1/?text=Rai,Russia&type=geo&lang=en_US&apikey=<API key>

Response format

The response from the service is shown below (for reverse geocoding, the response format is the same).

Attention. We only guarantee support for the fields that are described in the example below. We do not recommend using other fields that are found in the response but are not covered in the documentation. Such fields might not be supported in the future.
{   
  "type": "FeatureCollection",
  "properties": {
    "ResponseMetaData": {
      "SearchRequest": {
        "request": "Rai,Russia",
        "results": 10,
        "skip": 0,
        "boundedBy": [
          [
            37.04842675,
            55.43644829
          ],
          [
            38.17590226,
            56.04690124
          ]
        ]
      },
      "SearchResponse": {
        "found": 24,
        "Point": {
          "type": "Point",
          "coordinates": [
            32.01884032,
            54.70408144
          ]
        },
        "boundedBy": [
          [
            32.00759341,
            54.70136583
          ],
          [
            32.03008723,
            54.70679686
          ]
        ],
        "display": "single"
      }
    }
  },
  "features": [
    {
      "type": "Feature",
      "properties": {
        "GeocoderMetaData": {
          "kind": "locality",
          "text": "Russia, Smolensk oblast, Smolensk region, village of Rai",
          "precision": "other"
        },
        "description": "Smolensk region, Smolensk oblast, Russia",
        "name": "village of Rai",
        "boundedBy": [
          [
            32.007593,
            54.701366
          ],
          [
            32.030087,
            54.706797
          ]
        ]
      },
      "geometry": {
        "type": "Point",
        "coordinates": [
          32.024464,
          54.704602
        ]
      }
    }         
  ]
}

Response parameters

type *
Always has the value FeatureCollection. This ensures compatibility (partially) with GeoJSON format.

Required field.

properties *
Container for metadata describing the request and response. Required field.
ResponseMetaData *
Metadata describing the request and response. Required field.
SearchRequest *
Metadata describing the request. Required field.
request *
Request string. Required field.
results
Maximum number of results to be returned.
skip
Number of results to skip.
boundedBy

Boundaries of the area that the objects to search for are presumably located in.

Set as the coordinates of the upper-left and lower-right corners of the area. Coordinates are set in the order “latitude, longitude”.

The boundaries of the area are automatically defined by the service.

SearchResponse *

Metadata describing the response. Required field.

found *
The number of objects found. Required field.
Point *

This element is used for compatibility with GeoJSON format. Required field.

type *
Geometry type. Required field.
coordinates *
Object coordinates. Required field.
boundedBy

Boundaries of the viewport for found objects. Contains the coordinates of the lower-left and upper-right corners of the area. Coordinates are set in the order “longitude, latitude”.

display

Recommendations for displaying search results. Possible values:

  • "single" — Recommends displaying the first object found.
  • "multiple" — Recommends displaying all objects found.
features *
Container for search results. Required field.
type *
Always has the value Feature. This ensures compatibility (partially) with GeoJSON format. Required field.
properties *
Metadata describing the found object. Required field.
GeocoderMetaData *
Detailed information about the found object. Required field.
kind *

Kind of toponym. Possible values:

  • "house" — building
  • "street" — street
  • "metro" — metro (subway) station
  • "district" — city district
  • "locality" — populated locality (city/village/town/...).

Required field.

text *
Complete address of the object. Required field.
precision *
Precision for matching a found house number to the house number in the query (more information). Required field.
description
Text that is recommended to set as a subheader when displaying the found object.
name
Text that is recommended to set as a title when displaying the found object.
boundedBy
Boundaries of an area that the business is located in. Contains the coordinates of the lower-left and upper-right corners of the area. Coordinates are set in the order “longitude, latitude”.
geometry *
Description of the found object's geometry. Required field.
type *
Geometry type. Required field.
coordinates *
Object coordinates. Required field.

Required